@apiosk/mcp 1.3.0 → 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,7 +1,25 @@
1
+ <!-- mcp-name: io.github.obcraft/apiosk-mcp -->
2
+ <p align="center">
3
+ <img src="https://apiosk.com/logo.svg" alt="Apiosk" width="120" />
4
+ </p>
5
+
1
6
  # Apiosk MCP Server
2
7
 
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.
9
+
10
+ `payments` · `finance` · `x402` · `commerce` · `crypto`
11
+
12
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.obcraft%2Fapiosk--mcp-2ea44f)](https://registry.modelcontextprotocol.io)
13
+ [![npm](https://img.shields.io/npm/v/@apiosk/mcp?label=npm%20%40apiosk%2Fmcp)](https://www.npmjs.com/package/@apiosk/mcp)
14
+ [![PyPI](https://img.shields.io/pypi/v/apiosk-mcp?label=PyPI%20apiosk-mcp)](https://pypi.org/project/apiosk-mcp/)
15
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](#license)
16
+
3
17
  Official MCP server for discovering, paying for, and publishing Apiosk APIs.
4
18
 
19
+ - **Listed in the [official MCP Registry](https://registry.modelcontextprotocol.io)** as `io.github.obcraft/apiosk-mcp`.
20
+ - **Hosted endpoint:** `https://mcp.apiosk.com/mcp` (streamable HTTP, OAuth-protected for paid tools).
21
+ - **Local stdio package:** `npx -y @apiosk/mcp` or `uvx apiosk-mcp` for wallet + publish tools.
22
+
5
23
  ## Quick Start
6
24
 
7
25
  ### Package names
@@ -46,7 +64,7 @@ uvx apiosk-mcp
46
64
  ```
47
65
 
48
66
  The PyPI launcher requires Node.js 20+ and `npx` on `PATH`. By default it runs
49
- `npx -y @apiosk/mcp@1.3.0`; 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
50
68
  override the npm package spec.
51
69
 
52
70
  ### Publishing packages
@@ -61,7 +79,7 @@ npm publish --access public
61
79
  ```bash
62
80
  python3 -m pip install --upgrade build twine
63
81
  python3 -m build
64
- python3 -m twine upload dist/apiosk_mcp-1.3.0*
82
+ python3 -m twine upload dist/apiosk_mcp-1.3.2*
65
83
  ```
66
84
 
67
85
  After both uploads are live, the MCP registry package fields are:
@@ -126,6 +144,40 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
126
144
  }
127
145
  ```
128
146
 
147
+ ### VS Code
148
+
149
+ Add the server with the CLI:
150
+
151
+ ```bash
152
+ code --add-mcp '{"name":"apiosk","command":"npx","args":["-y","@apiosk/mcp"]}'
153
+ ```
154
+
155
+ Or create `.vscode/mcp.json` in your workspace (VS Code uses a `servers` key):
156
+
157
+ ```json
158
+ {
159
+ "servers": {
160
+ "apiosk": {
161
+ "command": "npx",
162
+ "args": ["-y", "@apiosk/mcp"]
163
+ }
164
+ }
165
+ }
166
+ ```
167
+
168
+ To use the hosted endpoint instead of the local package:
169
+
170
+ ```json
171
+ {
172
+ "servers": {
173
+ "apiosk": {
174
+ "type": "http",
175
+ "url": "https://mcp.apiosk.com/mcp"
176
+ }
177
+ }
178
+ }
179
+ ```
180
+
129
181
  ### Cursor
130
182
 
131
183
  ```json
@@ -208,7 +260,7 @@ https://mcp.apiosk.com/mcp
208
260
  ```
209
261
 
210
262
  Protected tools on the hosted server use OAuth. The remote MCP surface is fully
211
- capable — discovery, payment guidance, generic **and** dynamic per-API
263
+ capable, discovery, payment guidance, generic **and** dynamic per-API
212
264
  execution, prepaid credits, and managed agent-wallet CRUD. Public tools
213
265
  (discovery + guidance) work before authorization; paid execution and managed
214
266
  tools require OAuth. Publishing stays local/portal-only because it needs a
@@ -254,20 +306,85 @@ The provider MCP should reject direct unauthenticated traffic, but it should not
254
306
  return `402 Payment Required` or inspect `X-Payment`. Payment challenges,
255
307
  credits, x402 proof verification, and revenue splits are handled by Apiosk.
256
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
+
257
362
  ## Available Tools
258
363
 
259
364
  Static tools:
260
365
 
261
366
  - `apiosk_help`
262
- - `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
263
368
  - `apiosk_explore`
264
369
  - `apiosk_search`
370
+ - `apiosk_discover`
371
+ - `apiosk_inspect_x402`
372
+ - `apiosk_fetch_paid`
265
373
  - `apiosk_get_api`
266
374
  - `apiosk_execute`
267
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
+
268
384
  Hosted remote MCP tools (in addition to dynamic per-API tools):
269
385
 
270
- - 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)
271
388
  - Prepaid credits: `apiosk_buy_credits`, `apiosk_get_credits_status`
272
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`
273
390
 
@@ -290,6 +407,16 @@ Publish tools in stdio mode:
290
407
  - `apiosk_update_api`
291
408
  - `apiosk_delete_api`
292
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
+
293
420
  Optional dashboard-managed wallet tools:
294
421
 
295
422
  - `apiosk_list_wallets`
@@ -326,7 +453,7 @@ Dynamic tools:
326
453
  ```
327
454
 
328
455
  Search, explore, and `apiosk_get_api` responses now embed a `payment` block that
329
- 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
330
457
  agent that finds, say, a weather API immediately knows whether it can pay and
331
458
  what to do next.
332
459
 
@@ -344,7 +471,7 @@ what to do next.
344
471
  { "role": "buyer", "slug": "weather-now" }
345
472
  ```
346
473
 
347
- 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)
348
475
  and a provider guide (how to publish an API and get paid). Pass `slug` to scope
349
476
  buyer guidance to one listing, or `role` to pick a side.
350
477
 
@@ -393,7 +520,7 @@ Or save a dashboard-managed connect string locally and verify it:
393
520
 
394
521
  The connect string identifies the buyer's managed wallet and connect token. The
395
522
  `APIO_WALLET_*` limits bound the USDC (x402) rail. The same connect token also
396
- 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
397
524
  rail per call. Call `apiosk_help` with `topic="rails"` for the full settlement
398
525
  model.
399
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,10 +1,13 @@
1
1
  {
2
2
  "name": "apiosk-mcp",
3
- "version": "1.3.0",
4
- "description": "Official MCP server for browsing, paying for, and publishing Apiosk APIs",
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
- "repository": "https://github.com/apiosk/apiosk-mcp",
7
+ "homepage": "https://apiosk.com",
8
+ "icon": "https://mcp.apiosk.com/logo-optimized-light.png",
9
+ "keywords": ["payments", "finance", "x402", "commerce", "crypto"],
10
+ "repository": "https://github.com/obcraft/apiosk-mcp",
8
11
  "mcp": {
9
12
  "command": "node",
10
13
  "args": ["index.mjs"]
@@ -20,7 +23,7 @@
20
23
  },
21
24
  {
22
25
  "name": "apiosk_payment_guide",
23
- "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)."
24
27
  },
25
28
  {
26
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.0",
4
- "description": "Official MCP server for browsing, paying for, and publishing Apiosk APIs",
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": {
@@ -28,9 +28,12 @@
28
28
  "apiosk",
29
29
  "api",
30
30
  "model-context-protocol",
31
- "x402",
32
31
  "agent-tools",
33
- "payments"
32
+ "payments",
33
+ "finance",
34
+ "x402",
35
+ "commerce",
36
+ "crypto"
34
37
  ],
35
38
  "author": "Apiosk",
36
39
  "license": "MIT",
@@ -41,16 +44,17 @@
41
44
  "homepage": "https://apiosk.com",
42
45
  "repository": {
43
46
  "type": "git",
44
- "url": "https://github.com/apiosk/mcp.git"
47
+ "url": "https://github.com/obcraft/apiosk-mcp.git"
45
48
  },
46
49
  "bugs": {
47
- "url": "https://github.com/apiosk/mcp/issues"
50
+ "url": "https://github.com/obcraft/apiosk-mcp/issues"
48
51
  },
49
52
  "publishConfig": {
50
53
  "access": "public"
51
54
  },
52
55
  "files": [
53
56
  "index.mjs",
57
+ "logo-optimized-light.png",
54
58
  "server.mjs",
55
59
  "well-known.mjs",
56
60
  "server.json",
@@ -64,13 +68,14 @@
64
68
  "@modelcontextprotocol/sdk": "^1.27.1",
65
69
  "express": "^5.2.1",
66
70
  "qrcode": "^1.5.4",
67
- "viem": "^2.47.0",
68
- "zod": "^4.3.6"
71
+ "viem": "^2.47.0"
69
72
  },
70
73
  "devDependencies": {
71
74
  "@flydotio/dockerfile": "^0.7.10",
72
75
  "@types/express": "^5.0.6",
73
76
  "@types/node": "^25.5.0",
77
+ "@walletconnect/ethereum-provider": "^2.23.9",
78
+ "esbuild": "^0.28.1",
74
79
  "ts-node": "^10.9.2",
75
80
  "typescript": "^5.9.3"
76
81
  }
package/server.json CHANGED
@@ -1,17 +1,91 @@
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": "Discover, pay for, execute, and publish Apiosk APIs through MCP.",
6
- "version": "1.3.0",
4
+ "title": "Apiosk Connect",
5
+ "description": "Discover, pay for, execute, and publish APIs through Apiosk.",
6
+ "version": "1.7.0",
7
+ "websiteUrl": "https://apiosk.com",
8
+ "icons": [
9
+ {
10
+ "src": "https://mcp.apiosk.com/logo-optimized-light.png",
11
+ "mimeType": "image/png",
12
+ "sizes": ["2048x2048"]
13
+ },
14
+ {
15
+ "src": "https://apiosk.com/logo.svg",
16
+ "mimeType": "image/svg+xml",
17
+ "sizes": ["any"]
18
+ },
19
+ {
20
+ "src": "https://apiosk.com/apple-touch-icon.png",
21
+ "mimeType": "image/png",
22
+ "sizes": ["180x180"]
23
+ }
24
+ ],
7
25
  "repository": {
8
26
  "url": "https://github.com/obcraft/apiosk-mcp",
9
27
  "source": "github"
10
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
+ ],
11
79
  "remotes": [
12
80
  {
13
81
  "type": "streamable-http",
14
82
  "url": "https://mcp.apiosk.com/mcp"
15
83
  }
16
- ]
84
+ ],
85
+ "_meta": {
86
+ "com.apiosk": {
87
+ "tags": ["payments", "finance", "x402", "commerce", "crypto"],
88
+ "categories": ["payments", "finance"]
89
+ }
90
+ }
17
91
  }