@aifinpay/mcp 2.4.1 → 2.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 +161 -31
- package/dist/config.d.ts +15 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +65 -7
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/native-price.d.ts +18 -9
- package/dist/native-price.d.ts.map +1 -1
- package/dist/native-price.js +37 -32
- package/dist/native-price.js.map +1 -1
- package/dist/pay-chains.d.ts +32 -0
- package/dist/pay-chains.d.ts.map +1 -0
- package/dist/pay-chains.js +38 -0
- package/dist/pay-chains.js.map +1 -0
- package/dist/payment-identity.d.ts +17 -0
- package/dist/payment-identity.d.ts.map +1 -0
- package/dist/payment-identity.js +75 -0
- package/dist/payment-identity.js.map +1 -0
- package/dist/payment-state.d.ts +2 -1
- package/dist/payment-state.d.ts.map +1 -1
- package/dist/payment-state.js +52 -17
- package/dist/payment-state.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +11 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/agent-address.d.ts.map +1 -1
- package/dist/tools/agent-address.js +1 -1
- package/dist/tools/agent-address.js.map +1 -1
- package/dist/tools/agent-claim-self.d.ts +3 -3
- package/dist/tools/agent-claim-self.d.ts.map +1 -1
- package/dist/tools/agent-claim-self.js +65 -88
- package/dist/tools/agent-claim-self.js.map +1 -1
- package/dist/tools/agent-history.d.ts +0 -1
- package/dist/tools/agent-history.d.ts.map +1 -1
- package/dist/tools/agent-history.js +51 -52
- package/dist/tools/agent-history.js.map +1 -1
- package/dist/tools/agent-quota.d.ts.map +1 -1
- package/dist/tools/agent-quota.js +42 -11
- package/dist/tools/agent-quota.js.map +1 -1
- package/dist/tools/payable-fetch.d.ts.map +1 -1
- package/dist/tools/payable-fetch.js +178 -66
- package/dist/tools/payable-fetch.js.map +1 -1
- package/package.json +6 -6
- package/skills/SKILL.md +168 -34
- package/smithery.yaml +72 -40
package/skills/SKILL.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aifinpay
|
|
3
|
-
description: Pay for x402-gated APIs and sites as an agent (AIFP-1 on
|
|
3
|
+
description: Pay for x402-gated APIs and sites as an agent (AIFP-1 on an owner-selected EVM or accepted Solana network,
|
|
4
4
|
within owner-set limits) — including when the owner just says "buy access for
|
|
5
5
|
this site" — link the agent to its owner's AiFinPay dashboard, and read
|
|
6
6
|
wallet, payment history, prepaid quotas and Agent Passport records through
|
|
7
7
|
the AiFinPay MCP server or SDK.
|
|
8
8
|
license: MIT
|
|
9
|
-
version: 2.
|
|
9
|
+
version: 2.8.0
|
|
10
10
|
author: AiFinPay Support
|
|
11
11
|
metadata:
|
|
12
12
|
hermes:
|
|
@@ -61,20 +61,112 @@ your language. There is no "install together" scenario.
|
|
|
61
61
|
|
|
62
62
|
## Version and release status
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
Release target: MCP **2.7.0**, Node SDK **2.5.0**, Python **2.5.0**.
|
|
65
|
+
This skill describes that coordinated package cohort. Check the installed
|
|
66
|
+
versions before using its additional-network instructions; a release target
|
|
67
|
+
does not establish npm/PyPI publication or production network activation.
|
|
68
|
+
Published baseline checked 2026-10-04: MCP **2.5.0**, Node SDK **2.3.2**.
|
|
69
|
+
`payable_fetch` has shipped since MCP 2.2.0, and Base since MCP 2.5.0.
|
|
70
|
+
Published packages remain usable within their documented capabilities.
|
|
68
71
|
|
|
69
72
|
| Surface | Can it pay? |
|
|
70
73
|
|---|---|
|
|
71
|
-
| MCP `@aifinpay/mcp` 2.
|
|
72
|
-
| Node `@aifinpay/agent` 2.
|
|
73
|
-
| Python `aifinpay-agent` 2.
|
|
74
|
+
| MCP `@aifinpay/mcp` 2.7.x | `payable_fetch`, only with a persistent wallet and every owner limit set. Polygon is the default; other networks require explicit `AIFINPAY_PAY_CHAIN`. The merchant and backend must authorize and serve that network. `scope: "merchant"` buys a site-wide batch. |
|
|
75
|
+
| Node `@aifinpay/agent` 2.5.x | `fetchPaid` with a v14 journal, gas cap and owner budgets. Select another network with `v14.chain`; select a pinned stablecoin with `v14.asset`. Native payments require an independent native/USD rate. |
|
|
76
|
+
| Python `aifinpay-agent` 2.5.x | `agent.fetch_paid(url, allowed_origins=…, max_amount_usd=…, daily_amount_usd=…)`; use explicit `chain` and the chain's native gas cap for another network, or a pinned stablecoin `asset`. `agent.recover_paid(journal_path)` recovers the original transaction. |
|
|
77
|
+
|
|
78
|
+
The client descriptors below are shared by the target cohort. They do not
|
|
79
|
+
activate a deployment, enroll a merchant or prove a completed payment.
|
|
80
|
+
|
|
81
|
+
| Owner chain name | Chain ID | Native payment and gas | Pinned stablecoin symbols |
|
|
82
|
+
|---|---|---|---|
|
|
83
|
+
| `polygon` | 137 | POL | `USDC`, `USDC.e` |
|
|
84
|
+
| `base` | 8453 | ETH | `USDC` |
|
|
85
|
+
| `optimism` | 10 | ETH | `USDC` |
|
|
86
|
+
| `arbitrum` | 42161 | ETH | `USDC` |
|
|
87
|
+
| `avalanche` | 43114 | AVAX | `USDC`, `USDT` |
|
|
88
|
+
| `bnb` | 56 | BNB | `USDC`, `USDT` |
|
|
89
|
+
| `unichain` | 130 | ETH | `USDC` |
|
|
90
|
+
| `xrplevm` | 1440000 | XRP | None |
|
|
91
|
+
| `robinhood` | 4663 | ETH | `USDe`, `USDG` |
|
|
92
|
+
|
|
93
|
+
Use the exact symbols and chain names. Token addresses and decimals are pinned
|
|
94
|
+
independently per network; a token with the same symbol at another address is
|
|
95
|
+
not accepted. BNB USDC/USDT and Robinhood USDe use 18 decimals; the other pinned
|
|
96
|
+
stablecoins use 6. USD micro-units remain 6 decimals. The SDK validates exact
|
|
97
|
+
integer `token_settlement` amounts, approval, signed gross and every split leg;
|
|
98
|
+
never scale, round or edit quote fields yourself.
|
|
99
|
+
|
|
100
|
+
Read the selected issuer's `/api/payment-capabilities` and the merchant's
|
|
101
|
+
discovery/quote. A new network also requires the merchant's explicit accepted
|
|
102
|
+
network set, verified payout, a served deployment and a working verifier/rate.
|
|
103
|
+
If the backend refuses a network, retain the refusal and ask the owner to
|
|
104
|
+
resolve readiness; do not switch networks or construct a manual payment.
|
|
105
|
+
The Solana source adapter in this target cohort remains unavailable while its
|
|
106
|
+
canonical deployment is disabled. NEAR, Aptos and current Casper payment
|
|
107
|
+
executors are outside this cohort.
|
|
108
|
+
Historical BOT is not an alias for Robinhood. Wallet derivation on a network
|
|
109
|
+
does not establish payment support.
|
|
110
|
+
|
|
111
|
+
## Solana source integration and activation status
|
|
112
|
+
|
|
113
|
+
The target cohort adds native SOL and accepted classic SPL transaction, receipt
|
|
114
|
+
and recovery adapters using the existing v1.4 program/IDL. The checked
|
|
115
|
+
`@aifinpay/deployments@1.1.3` mainnet and devnet records are disabled. Installing
|
|
116
|
+
this cohort does not override that gate. Do not send a direct transaction to
|
|
117
|
+
work around a refused quote or unavailable payment capability. Mainnet also
|
|
118
|
+
requires governance acceptance; actual funded end-to-end acceptance remains
|
|
119
|
+
separate from source tests.
|
|
120
|
+
|
|
121
|
+
After a deployment is accepted and served, the owner explicitly selects Solana
|
|
122
|
+
and its network. The environment independently binds mainnet to live/prod and
|
|
123
|
+
devnet to dev; a quote cannot select the network. Example owner configuration
|
|
124
|
+
for that future accepted mainnet route (limits are examples, not permission):
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"AIFINPAY_PAY_CHAIN": "solana",
|
|
129
|
+
"AIFINPAY_SOLANA_NETWORK": "mainnet",
|
|
130
|
+
"AIFINPAY_MODE": "live",
|
|
131
|
+
"AIFINPAY_PAY_ASSET": "SOL",
|
|
132
|
+
"AIFINPAY_MAX_FEE_LAMPORTS": "10000000"
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Keep the existing enabled-payments, origin, per-payment and daily USD limits.
|
|
137
|
+
Use the existing local Solana identity, not an EVM address. Configure an
|
|
138
|
+
owner-trusted Solana RPC with `AIFINPAY_RPC_URL`. The fee limit is an integer
|
|
139
|
+
number of lamports (1 SOL = 1,000,000,000 lamports) and covers transaction fees
|
|
140
|
+
and required nonce/token account rent; it is not a POL/ETH gas cap. Keep enough
|
|
141
|
+
SOL for these costs even when paying in an accepted SPL asset. The SDK refuses
|
|
142
|
+
missing fee/rent estimates and unsupported mints or decimals. Token2022 is not
|
|
143
|
+
supported by this program. Devnet assets require separate accepted mint pins.
|
|
144
|
+
|
|
145
|
+
Node selects the family with `solanaV14: { environment, network, asset,
|
|
146
|
+
maxFeeLamports, onPrepared }`, preserving the existing EVM `v14` options. Do not
|
|
147
|
+
provide both family options. Python uses `chain="solana"`, `environment`,
|
|
148
|
+
`solana_network` and `max_fee_lamports` alongside its existing allowed origins,
|
|
149
|
+
journal and USD caps. Maintain a private persistent journal and the SDK's
|
|
150
|
+
required prepared-transaction callback; do not remove persistence to make a
|
|
151
|
+
payment proceed.
|
|
152
|
+
|
|
153
|
+
Before requesting a Solana quote, the SDK durably retains the exact owner-signed
|
|
154
|
+
authorization and request identity. After a timeout or restart, resume that same
|
|
155
|
+
admission; do not generate a fresh nonce while its outcome is unknown. An expired
|
|
156
|
+
authorization can reconcile an existing admission but cannot authorize a new
|
|
157
|
+
one. Keep issued-quote evidence separate from a prepared transaction: quote
|
|
158
|
+
expiry alone does not prove a refund of a backend reservation.
|
|
159
|
+
|
|
160
|
+
The signed Solana transaction and its base58 signature are saved before
|
|
161
|
+
broadcast. A timeout, expired blockhash or missing RPC result does not permit
|
|
162
|
+
a second payment: retain the unresolved reservation and recover the same
|
|
163
|
+
transaction/receipt. Case-sensitive payer/mint/program/network identity must
|
|
164
|
+
match throughout quote, journal, receipt and history. An on-chain nonce marker
|
|
165
|
+
or event log alone does not prove a valid paid request.
|
|
74
166
|
|
|
75
167
|
# AiFinPay agent workflow
|
|
76
168
|
|
|
77
|
-
Use the tools actually returned by MCP tools/list. MCP 2.
|
|
169
|
+
Use the tools actually returned by MCP tools/list. MCP 2.7.0 exposes
|
|
78
170
|
agent_address, agent_reload, agent_claim_self, agent_history, agent_quota,
|
|
79
171
|
agent_passport_resolve, settlement_routes, settlement_invoice and
|
|
80
172
|
deployment_info; `payable_fetch` appears when the owner has enabled payments.
|
|
@@ -99,7 +191,8 @@ into ratersapp.com", "купи доступ до цього сайту". Handle
|
|
|
99
191
|
$0.10 for 200 standard requests), that it covers every path on the origin,
|
|
100
192
|
and how it drains — each request costs its own listed `unit_price_usd`, so
|
|
101
193
|
the same $0.10 is 200 standard or 20 premium requests in any mix. Gas is
|
|
102
|
-
separate, in
|
|
194
|
+
separate, in the selected network's native currency. Use the display rules
|
|
195
|
+
in "Transaction display" below.
|
|
103
196
|
4. **Check readiness.** `payable_fetch` must be in your tools and the origin
|
|
104
197
|
must be in `AIFINPAY_GATEWAY_ORIGINS`; the tool names a refused origin. If
|
|
105
198
|
either is missing, show the owner the exact change — the environment block
|
|
@@ -154,28 +247,57 @@ fund its EVM address on Polygon with POL, or with USDC plus some POL. Funding a
|
|
|
154
247
|
unlimited spend authority. Use the owner's actual approved limits and origins,
|
|
155
248
|
then call `payable_fetch({"url":"https://merchant.example/api/data"})`.
|
|
156
249
|
|
|
157
|
-
|
|
250
|
+
For another network, the owner sets `AIFINPAY_PAY_CHAIN` to an exact name in
|
|
251
|
+
the table and `AIFINPAY_MAX_GAS` in its native currency. For Base, for example,
|
|
252
|
+
the currency is ETH; the owner must choose a cap that covers the current
|
|
253
|
+
worst-case estimate. `AIFINPAY_MAX_GAS_POL` is refused outside Polygon rather
|
|
254
|
+
than interpreted as another currency. Fund the same EVM address **on the
|
|
255
|
+
selected network** with its native currency for gas and the selected asset
|
|
256
|
+
for the batch. A quote for another network is refused; only the owner changes
|
|
257
|
+
the network or limits.
|
|
258
|
+
|
|
259
|
+
Stablecoin payments budget approval and settlement together. Base, Optimism
|
|
260
|
+
and Unichain include L1 data and operator fees in the worst-case gas estimate;
|
|
261
|
+
an unavailable required fee read stops payment before signing. Arbitrum and
|
|
262
|
+
Robinhood use the Nitro estimate that already includes parent-chain data and
|
|
263
|
+
do not add that fee twice. A refusal never authorizes raising a gas cap.
|
|
264
|
+
|
|
265
|
+
It supports GET resources and authorized AIFP-1 v1.4 payments on the selected
|
|
266
|
+
supported EVM network. It verifies
|
|
158
267
|
the quote, price, deployment, signer and receipt, saves the transaction before
|
|
159
268
|
broadcasting, and reuses the purchased batch. No custom merchant script is
|
|
160
269
|
needed. Other protocol/version/asset paths fail closed.
|
|
161
270
|
|
|
162
|
-
A pending result retains the original transaction
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
271
|
+
A pending result retains the original signed transaction and network.
|
|
272
|
+
Retrying recovers its receipt without sending a replacement transaction.
|
|
273
|
+
Unknown broadcasts keep their budget reservation indefinitely; confirmed
|
|
274
|
+
spend is never refunded by a later receipt or HTTP failure. Daily confirmed
|
|
275
|
+
spend uses a rolling 24-hour window. Unresolved access stays guarded even if
|
|
276
|
+
the owner later changes networks. Use one shared local filesystem for the
|
|
277
|
+
wallet's ledger/journal across local processes; this is not a multi-host lock.
|
|
278
|
+
Do not delete journals, remove an unknown lock, replace a wallet, bypass a
|
|
279
|
+
reservation or downgrade with unresolved state. Reconcile with the original
|
|
280
|
+
transaction and verified receipt/revert evidence first. A legacy journal
|
|
281
|
+
without its network can be adopted only when actual signed bytes match the
|
|
282
|
+
owner-selected chain, payer, pinned target and exact call. Insufficient
|
|
283
|
+
evidence requires manual receipt reconciliation. Quote signing expiry does
|
|
284
|
+
not itself require a second settlement. Raw transactions and receipt JWTs
|
|
285
|
+
remain private.
|
|
166
286
|
|
|
167
287
|
### Network access
|
|
168
288
|
|
|
169
|
-
In a sandbox that allowlists outbound hosts, allow `api.aifinpay.io` and
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
289
|
+
In a sandbox that allowlists outbound hosts, allow `api.aifinpay.io` and an RPC
|
|
290
|
+
for the owner-selected pay chain (`AIFINPAY_RPC_URL` overrides its default).
|
|
291
|
+
Stablecoin payments need the issuer, merchant and that RPC. For the independent
|
|
292
|
+
native/USD check MCP uses the pinned Chainlink feed on Polygon or Base, then
|
|
293
|
+
`api.coinbase.com`, then `api.coingecko.com`. Other networks use those independent
|
|
294
|
+
HTTP price sources. An implausible, stale or future-dated rate is refused. If no rate is available,
|
|
174
295
|
`payable_fetch` stops before paying and nothing is spent; tell the owner which
|
|
175
296
|
hosts to allow rather than inventing a workaround. With the Node SDK, pass your
|
|
176
297
|
own `nativeUsdPrice`: Chainlink POL/USD on Polygon, Coinbase `POL-USD`, or
|
|
177
298
|
CoinGecko `polygon-ecosystem-token` (never `matic-network`, frozen since
|
|
178
|
-
February 2026)
|
|
299
|
+
February 2026); on Base, ETH/USD from Chainlink on Base, Coinbase `ETH-USD` or
|
|
300
|
+
CoinGecko `ethereum`.
|
|
179
301
|
|
|
180
302
|
## After creating a wallet: link it to the owner's dashboard
|
|
181
303
|
|
|
@@ -184,14 +306,19 @@ agent's balance, payments and receipts, and can set a daily-spend email alert,
|
|
|
184
306
|
at https://dash.aifinpay.io → My Agents:
|
|
185
307
|
|
|
186
308
|
- **MCP:** the owner clicks **Claim via MCP**, gets a one-time URL and gives it
|
|
187
|
-
to you; call `agent_claim_self({"magic_link_url": "…"})`.
|
|
309
|
+
to you; call `agent_claim_self({"magic_link_url": "…"})`. The owner-selected
|
|
310
|
+
payment family must be bound successfully; the other wallet is best-effort.
|
|
311
|
+
Binding a wallet does not activate a disabled payment network. Use the
|
|
312
|
+
selected wallet's **Fund** panel for available networks and assets.
|
|
188
313
|
- **Node / Python:** the owner uses **Add agent by address** and gives you the
|
|
189
314
|
challenge; return `agent.signDashboardClaim(challenge)` (Node) or
|
|
190
315
|
`agent.sign_dashboard_claim(challenge)` (Python). These sign only
|
|
191
316
|
`AiFinPay-claim:polygon:<own address>:<nonce>`.
|
|
192
317
|
|
|
193
|
-
|
|
194
|
-
`AIFINPAY_DAILY_USD`)
|
|
318
|
+
Keep local owner spending limits in the agent's configuration (`AIFINPAY_MAX_USD`,
|
|
319
|
+
`AIFINPAY_DAILY_USD`). Claimed-wallet controls in the dashboard are additional
|
|
320
|
+
backend restrictions on quotes and gateway access; they do not replace local
|
|
321
|
+
limits or control transactions sent directly outside AiFinPay.
|
|
195
322
|
|
|
196
323
|
Discover routes on the exact requested origin: `/.well-known/x402.json` and any
|
|
197
324
|
API catalog linked by that site. A dev hostname does not imply testnet. If a
|
|
@@ -253,17 +380,23 @@ Use agent_history. Do not guess /v1/history, /v1/payments or /v1/wallet/tx.
|
|
|
253
380
|
|
|
254
381
|
Canonical AIFP-1 economics are gross-inclusive: the agent pays the quoted
|
|
255
382
|
price, AiFinPay takes **1 %** (100 bps) from it, and the merchant receives
|
|
256
|
-
**99 %**. No fixed fee is implied.
|
|
257
|
-
|
|
258
|
-
|
|
383
|
+
**99 %**. No fixed fee is implied. Production served Polygon and Base
|
|
384
|
+
(splitter v1.4) at the 2026-10-04 baseline check. Additional client descriptors
|
|
385
|
+
do not prove production activation; check issuer capabilities and merchant
|
|
386
|
+
authorization. This source cohort adds a Solana v1.4 adapter with explicit
|
|
387
|
+
network, asset and fee/rent limits; current published Solana deployment records
|
|
388
|
+
remain disabled. The smallest paid batch is $0.10, plus network fees and any
|
|
389
|
+
required account rent.
|
|
259
390
|
|
|
260
391
|
(The older "98.99 / 1 / 0.01" figure was the v1.2 fee-on-top model.)
|
|
261
392
|
|
|
262
393
|
Routes:
|
|
263
394
|
|
|
264
395
|
- GET /v1/agents/:address/transactions?chain=polygon&limit=25&offset=0:
|
|
265
|
-
public facts from indexed AiFinPay
|
|
266
|
-
|
|
396
|
+
public facts from indexed AiFinPay settlements in the durable ledger on
|
|
397
|
+
backends with that network's indexer. Select the configured network with
|
|
398
|
+
`chain`; a source descriptor does not prove indexing coverage. Excludes
|
|
399
|
+
arbitrary wallet transfers and may lag the chain.
|
|
267
400
|
- GET /v1/agents/:address/receipts?limit=25&offset=0: retained prepaid-batch
|
|
268
401
|
metadata, including test payments. Never includes the spendable receipt JWT.
|
|
269
402
|
- GET /v1/agents/:address/statement?days=7: retained billing statement.
|
|
@@ -358,8 +491,9 @@ retype from memory:
|
|
|
358
491
|
`setBudget({ per_call_usd, daily_usd })`, discovery + `fetchPaid`
|
|
359
492
|
- `wallet-budget-paid.mjs` (JavaScript, ESM): same flow, no types
|
|
360
493
|
- `wallet-budget-call.py` (Python): `from_seed(os.environ["SEED_HASH"])`,
|
|
361
|
-
`call(provider, body, cost=…)` cap; fails closed on paid
|
|
362
|
-
`
|
|
494
|
+
`call(provider, body, cost=…)` cap; this legacy snippet fails closed on paid
|
|
495
|
+
402s. For a paid purchase use the current SDK `fetch_paid` guide or Node
|
|
496
|
+
`fetchPaid`, with explicit origin, amount and gas limits.
|
|
363
497
|
|
|
364
498
|
Browse: `https://github.com/AiFinPay/sdk/tree/main/examples/agent-snippets`
|
|
365
499
|
|
|
@@ -413,8 +547,8 @@ terminal for that request: do not lower units below the server minimum, edit
|
|
|
413
547
|
quotes, or construct a manual nonce, receipt or transaction workaround.
|
|
414
548
|
|
|
415
549
|
This dev quote tool never broadcasts. The new low-level SDK executor supports
|
|
416
|
-
native Amoy v1.4
|
|
417
|
-
A full paid testnet receipt flow is not
|
|
550
|
+
native Amoy v1.4; this MCP exposes no Amoy paid receipt executor.
|
|
551
|
+
A full paid testnet receipt flow is not claimed. A prepaid batch means one settlement funding
|
|
418
552
|
multiple API calls, not an arbitrary batch of on-chain transfers.
|
|
419
553
|
|
|
420
554
|
After any actual settlement, retain its quote and transaction reference.
|
package/smithery.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
name: aifinpay
|
|
2
2
|
displayName: AiFinPay
|
|
3
|
-
description:
|
|
4
|
-
version: 2.
|
|
3
|
+
description: Payment infrastructure for AI agents. A persistent non-custodial agent wallet, Agent Passport resolution, route discovery and non-signing settlement invoices; with owner-set limits, payable_fetch buys prepaid access to AIFP-1 merchants on Polygon or Base, in POL/ETH or a pinned stablecoin.
|
|
4
|
+
version: 2.5.0
|
|
5
5
|
license: MIT
|
|
6
6
|
homepage: https://aifinpay.io
|
|
7
7
|
repository: https://github.com/AiFinPay/sdk
|
|
@@ -19,19 +19,11 @@ categories:
|
|
|
19
19
|
tags:
|
|
20
20
|
- payments
|
|
21
21
|
- ai-agents
|
|
22
|
-
-
|
|
22
|
+
- payment-infrastructure
|
|
23
|
+
- aifp-1
|
|
23
24
|
- polygon
|
|
24
|
-
- solana
|
|
25
|
-
- avalanche
|
|
26
|
-
- arbitrum
|
|
27
|
-
- bnb
|
|
28
|
-
- base
|
|
29
|
-
- unichain
|
|
30
|
-
- optimism
|
|
31
25
|
- stablecoins
|
|
32
26
|
- usdc
|
|
33
|
-
- usdt
|
|
34
|
-
- stripe-for-ai
|
|
35
27
|
- non-custodial
|
|
36
28
|
- agent-passport
|
|
37
29
|
- settlement
|
|
@@ -63,47 +55,77 @@ configSchema:
|
|
|
63
55
|
AIFINPAY_AGENT_SECRET:
|
|
64
56
|
type: string
|
|
65
57
|
title: Agent secret (base58)
|
|
66
|
-
description: Legacy Ed25519 secret for the agent identity.
|
|
67
|
-
AIFINPAY_MAX_USD:
|
|
68
|
-
type: string
|
|
69
|
-
title: Max USD per call
|
|
70
|
-
description: Hard cap per paid call. Refuses to settle anything above this. Does not enable signing.
|
|
71
|
-
default: "0.10"
|
|
72
|
-
AIFINPAY_BASE_URL:
|
|
73
|
-
type: string
|
|
74
|
-
title: API base URL
|
|
75
|
-
description: Override the AiFinPay backend endpoint.
|
|
76
|
-
default: https://aifinpay.io
|
|
77
|
-
AIFINPAY_TIMEOUT_MS:
|
|
78
|
-
type: string
|
|
79
|
-
title: Request timeout (ms)
|
|
80
|
-
description: SDK request timeout in milliseconds.
|
|
81
|
-
default: "30000"
|
|
82
|
-
AIFINPAY_MODE:
|
|
83
|
-
type: string
|
|
84
|
-
title: Runtime mode
|
|
85
|
-
description: Set to "dev" to expose dev_payment_quote tool. Requires a separate dev backend URL.
|
|
58
|
+
description: Legacy Ed25519 secret for the agent identity. The Solana, EVM and Casper addresses derive deterministically from it. With no wallet source the server uses an ephemeral identity that must not be funded. Signing happens locally inside the MCP process; the secret is never transmitted to AiFinPay servers.
|
|
86
59
|
AIFINPAY_HOME:
|
|
87
60
|
type: string
|
|
88
61
|
title: Wallet home directory
|
|
89
|
-
description: Directory of the
|
|
62
|
+
description: Directory of the agent.json keystore written by `npx @aifinpay/mcp init` (default ~/.aifinpay).
|
|
90
63
|
AIFINPAY_WALLET_PASSPHRASE:
|
|
91
64
|
type: string
|
|
92
65
|
title: Wallet passphrase
|
|
93
|
-
description: Passphrase for encrypted
|
|
66
|
+
description: Passphrase for an encrypted agent.json keystore. Without it an encrypted keystore cannot be opened and the server does not start.
|
|
67
|
+
AIFINPAY_PAYMENTS_ENABLED:
|
|
68
|
+
type: string
|
|
69
|
+
title: Enable payments
|
|
70
|
+
description: Set to "1" to register payable_fetch. Requires a persistent wallet and AIFINPAY_MAX_USD, AIFINPAY_DAILY_USD, AIFINPAY_GATEWAY_ORIGINS and a gas cap (AIFINPAY_MAX_GAS, or AIFINPAY_MAX_GAS_POL on Polygon); the server refuses to start if any is missing. Unset or "0" keeps the server read-only.
|
|
71
|
+
AIFINPAY_MAX_USD:
|
|
72
|
+
type: string
|
|
73
|
+
title: Max USD per payment
|
|
74
|
+
description: Per-payment cap for payable_fetch. Required when payments are enabled; there is no default. A tool argument can lower it for one call, never raise it.
|
|
75
|
+
AIFINPAY_DAILY_USD:
|
|
76
|
+
type: string
|
|
77
|
+
title: Max USD per 24 hours
|
|
78
|
+
description: Rolling 24-hour spending cap for payable_fetch. Required when payments are enabled.
|
|
94
79
|
AIFINPAY_GATEWAY_ORIGINS:
|
|
95
80
|
type: string
|
|
96
|
-
title:
|
|
97
|
-
description: Comma-separated exact HTTPS origins
|
|
81
|
+
title: Payable origins
|
|
82
|
+
description: Comma-separated exact HTTPS origins the agent may pay (no wildcards). Required when payments are enabled.
|
|
98
83
|
AIFINPAY_GATEWAY_PATH_MODE:
|
|
99
84
|
type: string
|
|
100
85
|
title: Gateway path mode
|
|
101
86
|
description: "Use gateway for merchant-slug identity or direct for full request-path identity."
|
|
102
87
|
default: gateway
|
|
88
|
+
AIFINPAY_PAY_CHAIN:
|
|
89
|
+
type: string
|
|
90
|
+
title: Payment chain
|
|
91
|
+
description: '"polygon" (default) or "base". Set by the owner; a quote for any other chain is refused.'
|
|
92
|
+
AIFINPAY_MAX_GAS:
|
|
93
|
+
type: string
|
|
94
|
+
title: Gas cap (native)
|
|
95
|
+
description: Gas cap per payment in the payment chain's native currency, for example "0.3" POL on Polygon or "0.0002" ETH on Base. Required when payments are enabled (or AIFINPAY_MAX_GAS_POL on Polygon).
|
|
96
|
+
AIFINPAY_MAX_GAS_POL:
|
|
97
|
+
type: string
|
|
98
|
+
title: Gas cap (POL, Polygon only)
|
|
99
|
+
description: The gas cap under its original name, in POL. Accepted on Polygon; refused on Base rather than read as ETH.
|
|
100
|
+
AIFINPAY_PAY_ASSET:
|
|
101
|
+
type: string
|
|
102
|
+
title: Payment asset
|
|
103
|
+
description: The chain's native currency (default; POL or ETH) or a stablecoin the SDK pins for that chain, such as "USDC". Gas is paid in the native currency either way.
|
|
104
|
+
AIFINPAY_RPC_URL:
|
|
105
|
+
type: string
|
|
106
|
+
title: RPC for the payment chain
|
|
107
|
+
description: Optional HTTPS RPC for the payment chain; defaults to its public RPC.
|
|
108
|
+
AIFINPAY_BASE_URL:
|
|
109
|
+
type: string
|
|
110
|
+
title: API base URL
|
|
111
|
+
description: Override the AiFinPay backend. Unset, read-only tools use https://aifinpay.io and payable_fetch quotes and receipts use https://api.aifinpay.io.
|
|
112
|
+
AIFINPAY_TIMEOUT_MS:
|
|
113
|
+
type: string
|
|
114
|
+
title: Request timeout (ms)
|
|
115
|
+
description: SDK request timeout in milliseconds.
|
|
116
|
+
default: "30000"
|
|
117
|
+
AIFINPAY_MODE:
|
|
118
|
+
type: string
|
|
119
|
+
title: Runtime mode
|
|
120
|
+
description: '"live" (default) or "dev". Dev exposes dev_payment_quote, needs a non-production AIFINPAY_BASE_URL and cannot be combined with payments.'
|
|
103
121
|
AIFINPAY_TRUSTED_HOSTS:
|
|
104
122
|
type: string
|
|
105
123
|
title: Trusted hosts
|
|
106
|
-
description: Exact hosts allowed to
|
|
124
|
+
description: Exact hosts allowed to skip the DNS pre-check, for environments that resolve only through a proxy.
|
|
125
|
+
AIFINPAY_CLAIM_ORIGINS:
|
|
126
|
+
type: string
|
|
127
|
+
title: Claim origins
|
|
128
|
+
description: Comma-separated origins agent_claim_self may contact. Defaults to the aifinpay.io dashboard and API origins; override only for staging.
|
|
107
129
|
AIFINPAY_ALLOW_PRIVATE_FETCH:
|
|
108
130
|
type: string
|
|
109
131
|
title: Allow private fetch
|
|
@@ -112,9 +134,13 @@ configSchema:
|
|
|
112
134
|
|
|
113
135
|
tools:
|
|
114
136
|
- name: agent_address
|
|
115
|
-
description: Return the agent's on-chain identities (Solana, EVM and Casper) derived from the configured
|
|
137
|
+
description: Return the agent's on-chain identities (Solana, EVM and Casper) derived from the configured wallet. Read-only.
|
|
116
138
|
- name: agent_reload
|
|
117
139
|
description: Reload the configured local wallet files after init or a file update, without starting a new conversation. Returns public addresses only.
|
|
140
|
+
- name: agent_claim_self
|
|
141
|
+
description: Link the agent to its owner's AiFinPay dashboard with a one-time URL from dash.aifinpay.io. Signs only an AiFinPay claim challenge for the agent's own address; moves no funds.
|
|
142
|
+
- name: payable_fetch
|
|
143
|
+
description: Registered only when the owner enables payments. Fetches a GET resource from an owner-approved AIFP-1 merchant, buys a prepaid batch through verified Polygon v1.4 within the owner's limits, and reuses its receipt. scope "merchant" buys one batch for the whole site.
|
|
118
144
|
- name: agent_quota
|
|
119
145
|
description: How many prepaid requests this agent has left, per service. Lists active quota batches (merchant, resource, used, remaining, expiry). Read-only.
|
|
120
146
|
- name: agent_history
|
|
@@ -122,9 +148,15 @@ tools:
|
|
|
122
148
|
- name: agent_passport_resolve
|
|
123
149
|
description: Resolve an AiFinPay Agent Passport by @username, permanent AIFP number, or immutable agent id. Returns verified public wallet bindings only.
|
|
124
150
|
- name: settlement_routes
|
|
125
|
-
description: Read AiFinPay's
|
|
151
|
+
description: Read AiFinPay's runtime-verified settlement routes. AIFP-1 is merchant monetisation (99% merchant / 1% AiFinPay / 0% creator). AIFP-2/x402 is 100% provider.
|
|
126
152
|
- name: settlement_invoice
|
|
127
|
-
description: Build and validate a non-signing
|
|
153
|
+
description: Build and validate a non-signing EVM settlement invoice. This tool never moves funds.
|
|
154
|
+
- name: settlement_solana
|
|
155
|
+
description: Build and validate a non-signing Solana settlement invoice. This tool never moves funds.
|
|
156
|
+
- name: settlement_casper
|
|
157
|
+
description: Build and validate a non-signing Casper settlement invoice. This tool never moves funds.
|
|
158
|
+
- name: deployment_info
|
|
159
|
+
description: AiFinPay deployment details across EVM, Solana and Casper — addresses, stablecoins, program IDs and settlement status. Read-only.
|
|
128
160
|
|
|
129
161
|
live_evidence:
|
|
130
162
|
- chain: polygon
|