@apiosk/mcp 1.3.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
+ <!-- mcp-name: io.github.obcraft/apiosk-mcp -->
1
2
  <p align="center">
2
3
  <img src="https://apiosk.com/logo.svg" alt="Apiosk" width="120" />
3
4
  </p>
4
5
 
5
6
  # Apiosk MCP Server
6
7
 
7
- **AI-native payments for tools and APIs.** Discover, pay for, execute, and publish monetized APIs directly from your agent — over USDC/x402 or prepaid credits — through the Model Context Protocol.
8
+ **AI-native payments for tools and APIs.** Discover, pay for, execute, and publish monetized APIs directly from your agent, over USDC/x402 or prepaid credits, through the Model Context Protocol.
8
9
 
9
10
  `payments` · `finance` · `x402` · `commerce` · `crypto`
10
11
 
@@ -63,7 +64,7 @@ uvx apiosk-mcp
63
64
  ```
64
65
 
65
66
  The PyPI launcher requires Node.js 20+ and `npx` on `PATH`. By default it runs
66
- `npx -y @apiosk/mcp@1.3.1`; set `APIOSK_MCP_NPM_PACKAGE=@apiosk/mcp@next` to
67
+ `npx -y @apiosk/mcp@1.3.2`; set `APIOSK_MCP_NPM_PACKAGE=@apiosk/mcp@next` to
67
68
  override the npm package spec.
68
69
 
69
70
  ### Publishing packages
@@ -78,7 +79,7 @@ npm publish --access public
78
79
  ```bash
79
80
  python3 -m pip install --upgrade build twine
80
81
  python3 -m build
81
- python3 -m twine upload dist/apiosk_mcp-1.3.1*
82
+ python3 -m twine upload dist/apiosk_mcp-1.3.2*
82
83
  ```
83
84
 
84
85
  After both uploads are live, the MCP registry package fields are:
@@ -259,7 +260,7 @@ https://mcp.apiosk.com/mcp
259
260
  ```
260
261
 
261
262
  Protected tools on the hosted server use OAuth. The remote MCP surface is fully
262
- capable — discovery, payment guidance, generic **and** dynamic per-API
263
+ capable, discovery, payment guidance, generic **and** dynamic per-API
263
264
  execution, prepaid credits, and managed agent-wallet CRUD. Public tools
264
265
  (discovery + guidance) work before authorization; paid execution and managed
265
266
  tools require OAuth. Publishing stays local/portal-only because it needs a
@@ -305,20 +306,85 @@ The provider MCP should reject direct unauthenticated traffic, but it should not
305
306
  return `402 Payment Required` or inspect `X-Payment`. Payment challenges,
306
307
  credits, x402 proof verification, and revenue splits are handled by Apiosk.
307
308
 
309
+ ## Publish Paid x402 Routes from a Coding Agent
310
+
311
+ The hosted MCP doubles as a **publisher** for coding agents (Claude Code,
312
+ Cursor, Codex, and friends): build an API, then publish it as a paid x402
313
+ endpoint on the Apiosk gateway in one tool call.
314
+
315
+ Authenticate with an Apiosk **provider API key** (`sk_live_…`, minted in the
316
+ provider portal under Settings → API keys):
317
+
318
+ ```json
319
+ {
320
+ "mcpServers": {
321
+ "apiosk": {
322
+ "url": "https://mcp.apiosk.com/mcp",
323
+ "headers": {
324
+ "Authorization": "Bearer sk_live_YOUR_PROVIDER_KEY"
325
+ }
326
+ }
327
+ }
328
+ }
329
+ ```
330
+
331
+ Tools:
332
+
333
+ - `publish_x402_route`: create a paid route: name, `upstream_url`, `price`
334
+ (USDC per call), `settlement_address`, optional `method`/`path`/schemas/tags.
335
+ Returns the `paid_url` on `gateway.apiosk.com` plus the route's status.
336
+ - `list_x402_routes`: all your routes with paid URLs, prices, and status.
337
+ - `update_x402_route`: change price, description, upstream URL, schemas,
338
+ settlement address, or status.
339
+ - `unpublish_x402_route`: disable a route (reversible).
340
+ - `test_x402_route`: fire an unpaid request at the paid URL and verify it
341
+ returns `402 Payment Required` with a valid x402 `accepts[]` offer.
342
+ - `generate_openapi_spec`: host an OpenAPI 3.1 spec for the route at
343
+ `https://mcp.apiosk.com/openapi/<route_id>.json`.
344
+ - `publish_project`: publish several routes of one project in a single call.
345
+
346
+ Lifecycle: new routes land in Apiosk's operator review queue
347
+ (`status: "pending_review"`). On approval they serve x402 payments, appear in
348
+ `https://gateway.apiosk.com/.well-known/x402`, and are auto-indexed in the
349
+ Coinbase x402 Bazaar. Settlement pays 98% of each call to your
350
+ `settlement_address` (Apiosk keeps a 2% platform fee).
351
+
352
+ Discovery endpoints for machines:
353
+
354
+ - `https://mcp.apiosk.com/.well-known/apiosk-routes.json` (alias `/discovery`)
355
+ , machine-readable index of every paid route on the gateway.
356
+ - `https://mcp.apiosk.com/openapi/<route_id>.json`: per-route OpenAPI spec.
357
+
358
+ Local stdio use: set `APIOSK_PROVIDER_TOKEN=sk_live_…` instead of the header.
359
+ Hosted server operators must configure `APIOSK_SUPABASE_SERVICE_ROLE_KEY` (the
360
+ tools verify provider keys and write listings through the gateway database).
361
+
308
362
  ## Available Tools
309
363
 
310
364
  Static tools:
311
365
 
312
366
  - `apiosk_help`
313
- - `apiosk_payment_guide` — buyer + provider guide for paying through and publishing on the gateway
367
+ - `apiosk_payment_guide`: buyer + provider guide for paying through and publishing on the gateway
314
368
  - `apiosk_explore`
315
369
  - `apiosk_search`
370
+ - `apiosk_discover`
371
+ - `apiosk_inspect_x402`
372
+ - `apiosk_fetch_paid`
316
373
  - `apiosk_get_api`
317
374
  - `apiosk_execute`
318
375
 
376
+ `apiosk_search` also returns matching x402 discovery sources in `sources`, even
377
+ when the Apiosk API catalog has no listing with that name. Each source includes
378
+ its direct REST/MCP endpoints and marks paid endpoints with
379
+ `payment_required`, `price_usdc`, and `executable_via`. `apiosk_discover` can
380
+ query the wired free sources directly; paid discovery sources such as x402scan
381
+ and Apify are returned as `apiosk_inspect_x402` → `apiosk_fetch_paid` pointers
382
+ and are never paid automatically.
383
+
319
384
  Hosted remote MCP tools (in addition to dynamic per-API tools):
320
385
 
321
- - Discovery / guidance: `apiosk_help`, `apiosk_payment_guide`, `apiosk_search`, `apiosk_explore`, `apiosk_get_api`, `apiosk_metadata`, `apiosk_execute`, `apiosk_health`
386
+ - Discovery / guidance: `apiosk_help`, `apiosk_payment_guide`, `apiosk_search`, `apiosk_explore`, `apiosk_discover`, `apiosk_inspect_x402`, `apiosk_get_api`, `apiosk_metadata`, `apiosk_execute`, `apiosk_health`
387
+ - External paid fetch: `apiosk_fetch_paid` (OAuth/connect-token protected; requires explicit live-price confirmation)
322
388
  - Prepaid credits: `apiosk_buy_credits`, `apiosk_get_credits_status`
323
389
  - Managed wallets: `apiosk_list_wallets`, `apiosk_create_wallet`, `apiosk_update_wallet`, `apiosk_delete_wallet`, `apiosk_get_wallet_activity`, `apiosk_create_wallet_connect_string`, `apiosk_list_wallet_api_keys`, `apiosk_create_wallet_api_key`, `apiosk_update_wallet_api_key`, `apiosk_delete_wallet_api_key`
324
390
 
@@ -341,6 +407,16 @@ Publish tools in stdio mode:
341
407
  - `apiosk_update_api`
342
408
  - `apiosk_delete_api`
343
409
 
410
+ x402 publisher tools (all modes, provider-token auth):
411
+
412
+ - `publish_x402_route`
413
+ - `list_x402_routes`
414
+ - `update_x402_route`
415
+ - `unpublish_x402_route`
416
+ - `test_x402_route`
417
+ - `generate_openapi_spec`
418
+ - `publish_project`
419
+
344
420
  Optional dashboard-managed wallet tools:
345
421
 
346
422
  - `apiosk_list_wallets`
@@ -377,7 +453,7 @@ Dynamic tools:
377
453
  ```
378
454
 
379
455
  Search, explore, and `apiosk_get_api` responses now embed a `payment` block that
380
- tells the agent exactly how to settle a paid call given the current auth — so an
456
+ tells the agent exactly how to settle a paid call given the current auth, so an
381
457
  agent that finds, say, a weather API immediately knows whether it can pay and
382
458
  what to do next.
383
459
 
@@ -395,7 +471,7 @@ what to do next.
395
471
  { "role": "buyer", "slug": "weather-now" }
396
472
  ```
397
473
 
398
- Returns a buyer guide (USDC/x402 or credits — tailored to the configured auth)
474
+ Returns a buyer guide (USDC/x402 or credits, tailored to the configured auth)
399
475
  and a provider guide (how to publish an API and get paid). Pass `slug` to scope
400
476
  buyer guidance to one listing, or `role` to pick a side.
401
477
 
@@ -444,7 +520,7 @@ Or save a dashboard-managed connect string locally and verify it:
444
520
 
445
521
  The connect string identifies the buyer's managed wallet and connect token. The
446
522
  `APIO_WALLET_*` limits bound the USDC (x402) rail. The same connect token also
447
- settles over prepaid credits when USDC is unavailable — the gateway picks the
523
+ settles over prepaid credits when USDC is unavailable, the gateway picks the
448
524
  rail per call. Call `apiosk_help` with `topic="rails"` for the full settlement
449
525
  model.
450
526
 
package/docs/sepa-rail.md CHANGED
@@ -1,7 +1,7 @@
1
- # Settlement rails — USDC, SEPA incasso, credits
1
+ # Settlement rails: USDC, SEPA incasso, credits
2
2
 
3
3
  Apiosk is **one mandate, any rail**. A single buyer connect token can settle a
4
- paid API call over any of three rails. The gateway picks the rail per call —
4
+ paid API call over any of three rails. The gateway picks the rail per call -
5
5
  the agent does not need to know or choose which one is used.
6
6
 
7
7
  | Rail | What it is | Best for |
@@ -12,8 +12,8 @@ the agent does not need to know or choose which one is used.
12
12
 
13
13
  ### Rail fallback order
14
14
 
15
- 1. **USDC / x402 wallet** — when the agent can produce a payment proof.
16
- 2. **SEPA incasso ledger** — when the buyer has an active SEPA mandate. No proof
15
+ 1. **USDC / x402 wallet**: when the agent can produce a payment proof.
16
+ 2. **SEPA incasso ledger**: when the buyer has an active SEPA mandate. No proof
17
17
  needed: the call is *recorded*, not blocked.
18
18
  3. **Prepaid credits** balance.
19
19
 
@@ -28,7 +28,7 @@ An incasso lets Apiosk pull euros from the buyer's bank account under a one-time
28
28
  mandate, so an agent can keep calling paid APIs without signing or funding each
29
29
  call.
30
30
 
31
- ### 1. Mandate setup — once, by a human
31
+ ### 1. Mandate setup: once, by a human
32
32
 
33
33
  In the buyer portal the buyer authorizes a recurring SEPA mandate:
34
34
 
@@ -37,9 +37,9 @@ In the buyer portal the buyer authorizes a recurring SEPA mandate:
37
37
  - **PayPal** / **card**: alternative mandates for non-NL buyers (recurring calls
38
38
  use `method=paypal` / `method=creditcard`).
39
39
 
40
- Agents never perform this step — they only need the connect token afterward.
40
+ Agents never perform this step, they only need the connect token afterward.
41
41
 
42
- ### 2. Collection terms — once, by the buyer
42
+ ### 2. Collection terms: once, by the buyer
43
43
 
44
44
  The mandate authorizes bounded collection:
45
45
 
@@ -49,7 +49,7 @@ The mandate authorizes bounded collection:
49
49
  These bound how much, and for how long, calls can accrue before a collection is
50
50
  triggered.
51
51
 
52
- ### 3. Per call — automatic, deferred
52
+ ### 3. Per call: automatic, deferred
53
53
 
54
54
  When a paid call settles over SEPA, the gateway appends a **SEPA ledger debit**
55
55
  row carrying the full breakdown and returns success immediately:
@@ -64,9 +64,9 @@ row carrying the full breakdown and returns success immediately:
64
64
  }
65
65
  ```
66
66
 
67
- No bank transaction happens yet — only a ledger entry.
67
+ No bank transaction happens yet, only a ledger entry.
68
68
 
69
- ### 4. Batch collection — background worker
69
+ ### 4. Batch collection: background worker
70
70
 
71
71
  A worker flushes a buyer's unbatched ledger into **one** Mollie SEPA Direct
72
72
  Debit when either condition is met:
@@ -83,7 +83,7 @@ edge function to create the direct debit.
83
83
  ## Economics
84
84
 
85
85
  - **Apiosk platform fee: 2% by default** of each call's gross, recorded per ledger row.
86
- - **Mollie SEPA Direct Debit fee: ~€0.30 per collection (per batch)** — not per
86
+ - **Mollie SEPA Direct Debit fee: ~€0.30 per collection (per batch)**, not per
87
87
  call. This is why sub-€25 thresholds are not offered: batching amortizes the
88
88
  fixed bank fee across many calls.
89
89
  - The provider receives gross minus the Apiosk platform fee; the Mollie fee is netted
@@ -118,13 +118,13 @@ export APIO_WALLET_PER_TX_LIMIT_USDC=1
118
118
  The `APIO_WALLET_*` limits only bound the **USDC** rail. The **SEPA mandate and
119
119
  its threshold/age terms live server-side** against the same buyer account, so the
120
120
  identical connect token transparently settles over SEPA incasso when USDC is
121
- unavailable — no extra connect-string fields are required. An agent holding only
121
+ unavailable, no extra connect-string fields are required. An agent holding only
122
122
  this connect token can therefore make paid calls with no on-chain balance; those
123
123
  calls land on the SEPA ledger and are collected in the next batch.
124
124
 
125
125
  ## Agent guidance
126
126
 
127
- - Agents do **not** set up the mandate — that is a one-time human action in the
127
+ - Agents do **not** set up the mandate: that is a one-time human action in the
128
128
  buyer portal.
129
129
  - SEPA-backed calls succeed immediately even with no wallet balance and no x402
130
130
  proof; settlement is deferred to the batch.
package/dxt.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "apiosk-mcp",
3
- "version": "1.3.1",
4
- "description": "AI-native payments: discover, pay for, execute, and publish monetized APIs through MCP.",
3
+ "version": "1.7.0",
4
+ "description": "Discover, pay for, execute, and publish APIs through Apiosk.",
5
5
  "author": "Apiosk",
6
6
  "license": "MIT",
7
7
  "homepage": "https://apiosk.com",
8
- "icon": "https://apiosk.com/logo.svg",
8
+ "icon": "https://mcp.apiosk.com/logo-optimized-light.png",
9
9
  "keywords": ["payments", "finance", "x402", "commerce", "crypto"],
10
10
  "repository": "https://github.com/obcraft/apiosk-mcp",
11
11
  "mcp": {
@@ -23,7 +23,7 @@
23
23
  },
24
24
  {
25
25
  "name": "apiosk_payment_guide",
26
- "description": "Guide for paying through the Apiosk gateway — buyer (how to settle a paid call) and provider (how to publish and get paid)."
26
+ "description": "Guide for paying through the Apiosk gateway, buyer (how to settle a paid call) and provider (how to publish and get paid)."
27
27
  },
28
28
  {
29
29
  "name": "apiosk_get_api",
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apiosk/mcp",
3
- "version": "1.3.1",
4
- "description": "AI-native payments: discover, pay for, execute, and publish monetized APIs through MCP.",
3
+ "version": "1.7.0",
4
+ "description": "Discover, pay for, execute, and publish APIs through Apiosk.",
5
5
  "mcpName": "io.github.obcraft/apiosk-mcp",
6
6
  "main": "index.mjs",
7
7
  "exports": {
@@ -54,6 +54,7 @@
54
54
  },
55
55
  "files": [
56
56
  "index.mjs",
57
+ "logo-optimized-light.png",
57
58
  "server.mjs",
58
59
  "well-known.mjs",
59
60
  "server.json",
@@ -67,13 +68,14 @@
67
68
  "@modelcontextprotocol/sdk": "^1.27.1",
68
69
  "express": "^5.2.1",
69
70
  "qrcode": "^1.5.4",
70
- "viem": "^2.47.0",
71
- "zod": "^4.3.6"
71
+ "viem": "^2.47.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@flydotio/dockerfile": "^0.7.10",
75
75
  "@types/express": "^5.0.6",
76
76
  "@types/node": "^25.5.0",
77
+ "@walletconnect/ethereum-provider": "^2.23.9",
78
+ "esbuild": "^0.28.1",
77
79
  "ts-node": "^10.9.2",
78
80
  "typescript": "^5.9.3"
79
81
  }
package/server.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.obcraft/apiosk-mcp",
4
- "title": "Apiosk",
5
- "description": "AI-native payments: discover, pay for, execute, and publish monetized APIs through MCP.",
6
- "version": "1.3.1",
4
+ "title": "Apiosk Connect",
5
+ "description": "Discover, pay for, execute, and publish APIs through Apiosk.",
6
+ "version": "1.7.0",
7
7
  "websiteUrl": "https://apiosk.com",
8
8
  "icons": [
9
+ {
10
+ "src": "https://mcp.apiosk.com/logo-optimized-light.png",
11
+ "mimeType": "image/png",
12
+ "sizes": ["2048x2048"]
13
+ },
9
14
  {
10
15
  "src": "https://apiosk.com/logo.svg",
11
16
  "mimeType": "image/svg+xml",
@@ -21,6 +26,56 @@
21
26
  "url": "https://github.com/obcraft/apiosk-mcp",
22
27
  "source": "github"
23
28
  },
29
+ "packages": [
30
+ {
31
+ "registryType": "npm",
32
+ "identifier": "@apiosk/mcp",
33
+ "version": "1.7.0",
34
+ "transport": {
35
+ "type": "stdio"
36
+ },
37
+ "environmentVariables": [
38
+ {
39
+ "name": "APIOSK_PRIVATE_KEY",
40
+ "description": "Optional wallet private key for automatic x402 payments.",
41
+ "isRequired": false,
42
+ "isSecret": true,
43
+ "format": "string"
44
+ },
45
+ {
46
+ "name": "APIOSK_CONNECT_TOKEN",
47
+ "description": "Optional dashboard-managed access token.",
48
+ "isRequired": false,
49
+ "isSecret": true,
50
+ "format": "string"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "registryType": "pypi",
56
+ "identifier": "apiosk-mcp",
57
+ "version": "1.7.0",
58
+ "transport": {
59
+ "type": "stdio"
60
+ },
61
+ "environmentVariables": [
62
+ {
63
+ "name": "APIOSK_PRIVATE_KEY",
64
+ "description": "Optional wallet private key for automatic x402 payments.",
65
+ "isRequired": false,
66
+ "isSecret": true,
67
+ "format": "string"
68
+ },
69
+ {
70
+ "name": "APIOSK_CONNECT_TOKEN",
71
+ "description": "Optional dashboard-managed access token.",
72
+ "isRequired": false,
73
+ "isSecret": true,
74
+ "format": "string"
75
+ }
76
+ ]
77
+ }
78
+ ],
24
79
  "remotes": [
25
80
  {
26
81
  "type": "streamable-http",