@aifinpay/mcp 2.3.0 → 2.3.1

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/skills/SKILL.md +18 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aifinpay/mcp",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "mcpName": "io.github.daochild/aifinpay",
5
5
  "description": "AiFinPay MCP: persistent agent wallets, discovery and owner-enabled verified native Polygon v1.4 payments with durable receipt recovery.",
6
6
  "type": "module",
@@ -77,7 +77,7 @@
77
77
  "bugs": "https://github.com/AiFinPay/sdk/issues",
78
78
  "dependencies": {
79
79
  "@aifinpay/agent": "^2.2.0",
80
- "@aifinpay/skill": "^2.1.0",
80
+ "@aifinpay/skill": "^2.4.0",
81
81
  "@modelcontextprotocol/sdk": "^1.0.0",
82
82
  "bs58": "^6.0.0",
83
83
  "tweetnacl": "^1.0.3"
package/skills/SKILL.md CHANGED
@@ -5,7 +5,7 @@ description: Pay for x402-gated APIs and sites as an agent (AIFP-1 on Polygon,
5
5
  and read wallet, payment history, prepaid quotas and Agent Passport records
6
6
  through the AiFinPay MCP server or SDK.
7
7
  license: MIT
8
- version: 2.1.0
8
+ version: 2.4.0
9
9
  author: AiFinPay Support
10
10
  metadata:
11
11
  hermes:
@@ -41,7 +41,7 @@ metadata:
41
41
  wallet, within limits its owner sets, and gets a receipt that unlocks a batch of
42
42
  requests. Settlement is non-custodial: the agent's private key signs locally and
43
43
  no AiFinPay-controlled custodian touches funds. MCP `payable_fetch` (2.2.0+) and
44
- Node `fetchPaid` (2.1.0+) execute payments; the Python SDK does not yet.
44
+ Node `fetchPaid` (2.1.0+) and Python `fetch_paid` (2.2.0+) execute payments.
45
45
 
46
46
  ## Prerequisites — required packages
47
47
 
@@ -60,20 +60,20 @@ your language. There is no "install together" scenario.
60
60
 
61
61
  ## Version and release status
62
62
 
63
- Released and current: MCP **2.2.4**, Node SDK **2.1.4**, Python **2.1.1**.
63
+ Released and current: MCP **2.3.0**, Node SDK **2.2.0**, Python **2.2.1**.
64
64
  Payments are released — `payable_fetch` has shipped since MCP 2.2.0. An older
65
65
  copy of this skill that calls MCP "read-only" or payments "release pending" is
66
66
  out of date; follow this one. Install the `latest` release.
67
67
 
68
68
  | Surface | Can it pay? |
69
69
  |---|---|
70
- | MCP `@aifinpay/mcp` 2.2.x | Yes — `payable_fetch`, once the owner enables payments |
71
- | Node `@aifinpay/agent` 2.1.x | Yes — `fetchPaid` with a v14 journal, gas cap and your own POL/USD rate |
72
- | Python `aifinpay-agent` | No — use MCP or Node to pay |
70
+ | MCP `@aifinpay/mcp` 2.3.x | Yes — `payable_fetch`, once the owner enables payments; POL, or USDC with `AIFINPAY_PAY_ASSET=USDC` |
71
+ | Node `@aifinpay/agent` 2.2.x | Yes — `fetchPaid` with a v14 journal and gas cap; POL (with your own POL/USD rate) or USDC (`v14.asset: "USDC"`) |
72
+ | Python `aifinpay-agent` 2.2.x | Yes — `agent.fetch_paid(url, allowed_origins=…, max_amount_usd=…, daily_amount_usd=…)`; POL (priced independently) or USDC (`asset="USDC"`); recover an unconfirmed payment with `agent.recover_paid(journal_path)` |
73
73
 
74
74
  # AiFinPay agent workflow
75
75
 
76
- Use the tools actually returned by MCP tools/list. MCP 2.2.4 exposes
76
+ Use the tools actually returned by MCP tools/list. MCP 2.3.0 exposes
77
77
  agent_address, agent_reload, agent_claim_self, agent_history, agent_quota,
78
78
  agent_passport_resolve, settlement_routes, settlement_invoice and
79
79
  deployment_info; `payable_fetch` appears when the owner has enabled payments.
@@ -95,14 +95,18 @@ The owner configures these MCP environment values (example limits only):
95
95
  }
96
96
  ```
97
97
 
98
- The smallest batch is **$0.10 plus gas**, paid in **POL on Polygon**; keep
99
- `AIFINPAY_MAX_USD` a little above the batch you expect to buy. Use an existing
100
- persistent wallet or create one with `npx @aifinpay/mcp init` (a passphrase is
101
- required); fund its EVM address with POL. Funding a wallet does not establish
98
+ The smallest batch is **$0.10 plus gas** on **Polygon**; keep `AIFINPAY_MAX_USD`
99
+ a little above the batch you expect to buy. It is paid in **POL** by default.
100
+ To pay in **USDC** instead, the owner also sets `"AIFINPAY_PAY_ASSET": "USDC"`:
101
+ the wallet then needs USDC for the batch plus a little POL (about 0.05) for gas,
102
+ because the tool approves exactly the batch amount and then settles — two
103
+ transactions, both within `AIFINPAY_MAX_GAS_POL`. Use an existing persistent
104
+ wallet or create one with `npx @aifinpay/mcp init` (a passphrase is required);
105
+ fund its EVM address on Polygon with POL, or with USDC plus some POL. Funding a wallet does not establish
102
106
  unlimited spend authority. Use the owner's actual approved limits and origins,
103
107
  then call `payable_fetch({"url":"https://merchant.example/api/data"})`.
104
108
 
105
- It supports GET resources and native Polygon AIFP-1 v1.4 payments. It verifies
109
+ It supports GET resources and Polygon AIFP-1 v1.4 payments in POL or USDC. It verifies
106
110
  the quote, price, deployment, signer and receipt, saves the transaction before
107
111
  broadcasting, and reuses the purchased batch. No custom merchant script is
108
112
  needed. Other protocol/version/asset paths fail closed.
@@ -115,7 +119,8 @@ owner reconciliation. Raw transactions and receipt JWTs remain private.
115
119
  ### Network access
116
120
 
117
121
  In a sandbox that allowlists outbound hosts, allow `api.aifinpay.io` and a
118
- Polygon RPC. For the independent POL/USD check MCP 2.2.4 reads Chainlink on
122
+ Polygon RPC. USDC payments need nothing else. For the independent POL/USD check
123
+ on POL payments MCP 2.3.0 reads Chainlink on
119
124
  Polygon over that RPC, then `api.coinbase.com`, then `api.coingecko.com` — one
120
125
  is enough. (MCP 2.2.3 used only `api.coinbase.com`.) If no rate is available,
121
126
  `payable_fetch` stops before paying and nothing is spent; tell the owner which