@aifinpay/mcp 2.11.2 → 2.11.4

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
@@ -4,8 +4,8 @@ AiFinPay MCP server for persistent agent identity, Agent Passport resolution,
4
4
  route discovery and non-signing settlement invoices. Canonical domain:
5
5
  **aifinpay.io**.
6
6
 
7
- Version **2.11.2** is prepared in this checkout, on the published agent 2.8.0
8
- and canonical skill 2.10.1 (AiFinPay/skill b8d2309, published 2026-10-19). The separate canonical producer's final immutable
7
+ Version **2.11.4** is prepared in this checkout, on the published agent 2.9.0
8
+ and canonical skill 2.10.2 (AiFinPay/skill 48285cf, published 2026-10-19). The separate canonical producer's final immutable
9
9
  source pin is a required handoff, not a moving-branch substitution.
10
10
  The published baseline checked2026-10-04 was MCP2.5.0. Package publication and
11
11
  real registry dependency/lock refresh remain release gates; a source-cohort
@@ -25,31 +25,38 @@ and only once the owner has set every limit in step 4.
25
25
  200 standard requests).
26
26
  2. **Check the setup.** Call `payment_setup_status`. It returns the wallet
27
27
  (persistent or ephemeral), whether payments are enabled, which owner limits
28
- are set, the balance when the RPC answers, and `next_step`: the first thing
28
+ are set, the balance when the RPC answers, `funding` (what a persistent
29
+ wallet needs, priced at today's rate) and `next_step`: the first thing
29
30
  still missing.
30
31
  3. **Persistent wallet.** If `wallet.persistent` is false, run
31
32
  `npx @aifinpay/mcp init`. Without a terminal it prints one JSON document;
32
33
  copy its `env` (the passphrase is only there) into the `aifinpay` server
33
34
  entry of the MCP client config, reconnect the server, then call
34
35
  `agent_reload`. Never fund an ephemeral address.
35
- 4. **Fund and enable.** Tell the owner `addresses.evm` and the amount: the
36
- batch price in POL plus the gas cap, so about `0.5 POL` for one `$0.10`
37
- batch at `$0.20`/POL plus up to `0.3 POL` gas (the SDK refuses before
38
- signing if the worst-case fee exceeds the cap). When the owner confirms
39
- funding, they add the payment settings to the same `env` and restart the
40
- aifinpay MCP server in the client (`agent_reload` does not read env):
36
+ 4. **Fund and enable.** Tell the owner `addresses.evm` and the amount from
37
+ `payment_setup_status`'s `funding`: the smallest batch (`$0.10`) in POL at
38
+ today's rate plus the gas cap (the SDK refuses before signing if the
39
+ worst-case fee exceeds the cap). The rate moves — `$0.10` was 1.08 POL on
40
+ 2026-10-19 — so never quote a remembered number; if `funding` carries a
41
+ `rate_error` instead of an `amount`, ask the owner to fund "the batch price
42
+ in POL at today's rate plus the gas cap" and name no number. When the owner
43
+ confirms funding, they add the payment settings to the same `env` and
44
+ restart the aifinpay MCP server in the client (`agent_reload` does not read
45
+ env):
41
46
 
42
47
  ```json
43
48
  {
44
49
  "AIFINPAY_PAYMENTS_ENABLED": "1",
45
50
  "AIFINPAY_GATEWAY_ORIGINS": "https://dev.ratersapp.com",
46
51
  "AIFINPAY_GATEWAY_PATH_MODE": "direct",
47
- "AIFINPAY_MAX_USD": "0.15",
48
- "AIFINPAY_DAILY_USD": "1.00",
52
+ "AIFINPAY_MAX_USD": "5",
53
+ "AIFINPAY_DAILY_USD": "20",
49
54
  "AIFINPAY_MAX_GAS_POL": "0.3"
50
55
  }
51
56
  ```
52
57
 
58
+ The USD values are a ceiling the owner sets once, not the budget: the
59
+ working limits live in the dashboard (see "Owner limits" below).
53
60
  `payment_setup_status` then reports `ready: true`.
54
61
 
55
62
  5. **Pay.** `payable_fetch({"url": "https://dev.ratersapp.com/api/agent/genres/list"})`
@@ -71,8 +78,8 @@ to the server's `env` (`init` prints the same block):
71
78
  "AIFINPAY_PAYMENTS_ENABLED": "1",
72
79
  "AIFINPAY_GATEWAY_ORIGINS": "https://merchant.example",
73
80
  "AIFINPAY_GATEWAY_PATH_MODE": "direct",
74
- "AIFINPAY_MAX_USD": "0.15",
75
- "AIFINPAY_DAILY_USD": "1.00",
81
+ "AIFINPAY_MAX_USD": "5",
82
+ "AIFINPAY_DAILY_USD": "20",
76
83
  "AIFINPAY_MAX_GAS_POL": "0.3"
77
84
  }
78
85
  ```
@@ -83,6 +90,18 @@ owner. `direct` uses the full path for self-hosted sites; `gateway` uses the
83
90
  merchant slug on the hosted gateway. Restart/reconnect the MCP process after
84
91
  changing its environment.
85
92
 
93
+ ### Owner limits: a ceiling in env, the working limits in the dashboard
94
+
95
+ `AIFINPAY_MAX_USD` and `AIFINPAY_DAILY_USD` are the ceiling the SDK requires
96
+ before it signs with the owner's key: set them once, high enough that they do
97
+ not need revisiting (the example `5` per payment and `20` per day is a ceiling,
98
+ not a budget), and leave them. The day-to-day limits belong in the dashboard:
99
+ once the agent is linked with `agent_claim_self`, the owner manages the
100
+ per-payment cap, the daily cap, pause and the allowed sites under **Controls**
101
+ at https://dash.aifinpay.io, and the backend enforces that policy on every
102
+ `/v1/quote` and `/v1/pay` for the claimed agent — no env change, no server
103
+ restart. The env ceiling still applies underneath; a payment has to pass both.
104
+
86
105
  ## Indexed wallet derivation
87
106
 
88
107
  The wallet CLI and MCP can use deterministic child wallets from one recovery
@@ -149,8 +168,8 @@ runtime/signer verification and owner limits. It persists the prepared transacti
149
168
  before sending, verifies the receipt, and reuses the purchased batch. No special
150
169
  merchant script, alternate contract or facilitator fallback is used. GET on the configured chain; EVM receipt payments use live
151
170
  mode only, in its native currency or the configured
152
- stablecoin; Amoy payment receipts are not supported. The smallest batch is $0.10 plus gas, so keep `AIFINPAY_MAX_USD`
153
- a little above the batch you expect to buy.
171
+ stablecoin; Amoy payment receipts are not supported. The smallest batch is $0.10 plus gas; `AIFINPAY_MAX_USD`
172
+ only has to be at or above the batch you expect to buy.
154
173
 
155
174
  To buy access to a whole site rather than one endpoint, call
156
175
  `payable_fetch({"url":"https://merchant.example/api/data","scope":"merchant"})`.
@@ -181,11 +200,15 @@ header on the payment requests (and on recovery of a pending payment).
181
200
  | `cursor`, `cursor-vscode` | `cursor` |
182
201
  | `windsurf` | `windsurf` |
183
202
  | `chatgpt`, `openai` | `chatgpt` |
203
+ | `codex-mcp-client` | `codex` |
184
204
  | `gemini` | `gemini` |
185
205
  | `perplexity` | `perplexity` |
186
206
 
187
207
  Names are matched exactly. Any other client sends no header; the server never
188
- guesses. Nothing in the payment, limits or receipts depends on it.
208
+ guesses. Nothing in the payment, limits or receipts depends on it. At
209
+ initialize the server logs one line to stderr with the name it received, for
210
+ example `[aifinpay-mcp] client "codex-mcp-client" → framework codex`, so a
211
+ client missing from this table can be reported with its exact name.
189
212
 
190
213
  ## Link the agent to its owner's dashboard
191
214
 
@@ -196,7 +219,8 @@ origins, signs only the claim challenge for this agent's own address, and moves
196
219
  no funds. The owner-selected payment family must be confirmed successfully;
197
220
  the second wallet is best-effort. Use the selected wallet's Fund panel for
198
221
  available networks and assets; binding does not activate a disabled network.
199
- Offer this to the owner after `init`.
222
+ Offer this to the owner after `init`: from then on the owner manages the
223
+ agent's working limits under Controls there (see "Owner limits" above).
200
224
 
201
225
  Private recovery state for all payment families lives at `AIFINPAY_HOME/payments/<evm-address>/state.json`
202
226
  (default home `~/.aifinpay`). State is mode600 in mode700 directories, atomically
@@ -427,20 +427,24 @@ if (arg === "init") {
427
427
  ` replace the example. No wildcards.\n` +
428
428
  ` AIFINPAY_GATEWAY_PATH_MODE "direct" for a site that runs its own AiFinPay\n` +
429
429
  ` paywall, "gateway" for gateway.aifinpay.io.\n` +
430
- ` AIFINPAY_MAX_USD per payment. The smallest batch is $0.10, so\n` +
431
- ` keep it a little above the batch you expect.\n` +
432
- ` AIFINPAY_DAILY_USD total over any 24 hours.\n` +
430
+ ` AIFINPAY_MAX_USD per payment, a ceiling set once (the smallest\n` +
431
+ ` batch is $0.10; the example is not a budget).\n` +
432
+ ` AIFINPAY_DAILY_USD total over any 24 hours, the same kind of ceiling.\n` +
433
+ ` Day-to-day limits: dashboard Controls, once the\n` +
434
+ ` agent is claimed (see below).\n` +
433
435
  ` AIFINPAY_MAX_GAS_POL worst-case network fee of one payment, checked\n` +
434
436
  ` before signing. It follows Polygon's gas price:\n` +
435
437
  ` at ~280 gwei it is ~0.10 POL paying in POL and\n` +
436
438
  ` ~0.21 POL paying in USDC. A lower cap refuses\n` +
437
439
  ` the payment; raise it when gas is higher.\n\n` +
438
- `Fund the EVM address on Polygon with the batch price plus the gas cap, in POL.\n` +
440
+ `Fund the EVM address on Polygon with the batch price at today's rate plus the\n` +
441
+ `gas cap, in POL; payment_setup_status prices it.\n` +
439
442
  `To pay in USDC, also set "AIFINPAY_PAY_ASSET": "USDC" and hold USDC for the\n` +
440
443
  `batch plus POL up to the gas cap. Check the balance before funding or paying.\n\n` +
441
444
  `See its balance, payments and receipts in your dashboard:\n` +
442
445
  ` https://dash.aifinpay.io → My Agents → Claim via MCP, then give the\n` +
443
- ` one-time URL to the agent (tool agent_claim_self).\n`
446
+ ` one-time URL to the agent (tool agent_claim_self). Controls there set the\n` +
447
+ ` working limits; the env values above stay as the ceiling.\n`
444
448
  );
445
449
  process.exit(0);
446
450
  }
@@ -1,3 +1,9 @@
1
1
  import type { AgentFramework } from "@aifinpay/agent";
2
2
  export declare function frameworkForClient(name: unknown): AgentFramework | undefined;
3
+ /**
4
+ * One stderr line per connection, so a client the table does not know shows up
5
+ * in the server log instead of silently sending no header. The name is the
6
+ * client's own public identifier, never a secret.
7
+ */
8
+ export declare function clientFrameworkLine(name: unknown): string;
3
9
  //# sourceMappingURL=client-framework.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-framework.d.ts","sourceRoot":"","sources":["../src/client-framework.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAqBtD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAE5E"}
1
+ {"version":3,"file":"client-framework.d.ts","sourceRoot":"","sources":["../src/client-framework.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAyBtD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAE5E;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAGzD"}
@@ -2,8 +2,11 @@
2
2
  * MCP `clientInfo.name`, as the client sent it at initialize, → the
3
3
  * AIFP-Agent-Framework the backend records. Exact names only: a client not
4
4
  * listed here sends no header rather than a guess. Entries are the names the
5
- * product owner listed plus `cursor-vscode`, which Cursor is reported to send;
6
- * confirm new ones against real initialize payloads before adding them.
5
+ * product owner listed plus `cursor-vscode`, which Cursor is reported to send,
6
+ * and `codex-mcp-client`, which Codex sends (openai/codex
7
+ * codex-rs/codex-mcp/src/rmcp_client.rs, `Implementation::new("codex-mcp-client", …)`);
8
+ * confirm new ones against real initialize payloads before adding them. The
9
+ * server logs every client's name at initialize so an unlisted one is visible.
7
10
  */
8
11
  const CLIENT_FRAMEWORKS = new Map([
9
12
  ["claude-ai", "claude"],
@@ -13,10 +16,20 @@ const CLIENT_FRAMEWORKS = new Map([
13
16
  ["windsurf", "windsurf"],
14
17
  ["chatgpt", "chatgpt"],
15
18
  ["openai", "chatgpt"],
19
+ ["codex-mcp-client", "codex"],
16
20
  ["gemini", "gemini"],
17
21
  ["perplexity", "perplexity"],
18
22
  ]);
19
23
  export function frameworkForClient(name) {
20
24
  return typeof name === "string" ? CLIENT_FRAMEWORKS.get(name) : undefined;
21
25
  }
26
+ /**
27
+ * One stderr line per connection, so a client the table does not know shows up
28
+ * in the server log instead of silently sending no header. The name is the
29
+ * client's own public identifier, never a secret.
30
+ */
31
+ export function clientFrameworkLine(name) {
32
+ const client = typeof name === "string" ? JSON.stringify(name) : "(unnamed)";
33
+ return `[aifinpay-mcp] client ${client} → framework ${frameworkForClient(name) ?? "none"}`;
34
+ }
22
35
  //# sourceMappingURL=client-framework.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-framework.js","sourceRoot":"","sources":["../src/client-framework.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAyB;IACxD,CAAC,WAAW,E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G;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAa;IAC/C,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IAC7E,OAAO,yBAAyB,MAAM,gBAAgB,kBAAkB,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE,CAAC;AAC7F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAS7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAgCvD;iFACiF;AACjF,wBAAsB,YAAY,CAAC,MAAM,GAAE,SAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2MxD;AA2BD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,+HAA+H;IAC/H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9D"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAQnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAS7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAgCvD;iFACiF;AACjF,wBAAsB,YAAY,CAAC,MAAM,GAAE,SAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+MxD;AA2BD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,+HAA+H;IAC/H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9D"}
package/dist/server.js CHANGED
@@ -16,7 +16,7 @@ import { initCommand, paymentSetupStatusTool, runPaymentSetupStatus } from "./to
16
16
  import { agentPassportResolveTool, runAgentPassportResolve, settlementRoutesTool, runSettlementRoutes, settlementInvoiceTool, runSettlementInvoice, settlementSolanaTool, runSettlementSolana, settlementCasperTool, runSettlementCasper, } from "./tools/production-control.js";
17
17
  import { deploymentInfoTool, runDeploymentInfo } from "./tools/supported-chains.js";
18
18
  import { payChain } from "./pay-chains.js";
19
- import { frameworkForClient } from "./client-framework.js";
19
+ import { clientFrameworkLine, frameworkForClient } from "./client-framework.js";
20
20
  // Every backend/public request made by this server goes through safeFetch.
21
21
  // Public deployments never lift private-network protection; local development
22
22
  // may explicitly use AIFINPAY_ALLOW_PRIVATE_FETCH=1.
@@ -83,6 +83,10 @@ export async function createServer(config = {}) {
83
83
  name: "@aifinpay/mcp",
84
84
  version: JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version,
85
85
  }, { capabilities: { tools: {}, resources: {} } });
86
+ // The client names itself at initialize. Logging it is how an unlisted name
87
+ // gets found: the 2026-10-19 Codex payment showed as "Independent" because
88
+ // "codex-mcp-client" was not in the table and nothing said what was sent.
89
+ server.oninitialized = () => log("info", clientFrameworkLine(server.getClientVersion()?.name));
86
90
  server.setRequestHandler(ListResourcesRequestSchema, async () => ({
87
91
  resources: [
88
92
  {
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAuB,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,E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MAX_USD: "5";
21
+ AIFINPAY_DAILY_USD: "20";
22
22
  AIFINPAY_MAX_GAS_POL: "0.3";
23
23
  }>;
24
+ /** Where the owner manages the working limits once the agent is claimed. */
25
+ export declare const CONTROLS_NOTE = "The USD env values are a ceiling the owner sets once, not the budget: after agent_claim_self the owner sets the working limits (per-payment cap, daily cap, pause, allowed sites) in the dashboard Controls at https://dash.aifinpay.io, and the backend enforces them on every quote and payment.";
24
26
  export declare const INIT_COMMAND = "npx @aifinpay/mcp init";
25
27
  /**
26
28
  * init, run so that it writes the keystore this server reads. An agent's shell
@@ -67,8 +69,28 @@ export interface PaymentSetupStatus {
67
69
  rpc: string;
68
70
  } | "unknown";
69
71
  balance_error?: string;
72
+ /** What to fund a persistent wallet with, priced now; absent for an ephemeral wallet. */
73
+ funding?: Funding;
70
74
  next_step: string;
71
75
  }
76
+ export interface Funding {
77
+ address: string;
78
+ chain: string;
79
+ asset: string;
80
+ batch_usd: number;
81
+ /** The native/USD rate read for this answer; absent when no price source answered. */
82
+ rate_usd?: number;
83
+ rate_source?: string;
84
+ rate_error?: string;
85
+ /** The smallest batch at that rate. */
86
+ batch_native?: string;
87
+ /** The owner's gas cap, when set. */
88
+ gas_cap?: string;
89
+ /** batch_native plus gas_cap: the amount to fund, when both are known. */
90
+ amount?: string;
91
+ /** The sentence to give the owner. Names a number only when one was read. */
92
+ advice: string;
93
+ }
72
94
  export declare function paymentSetupStatusTool(): {
73
95
  name: string;
74
96
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"payment-setup-status.d.ts","sourceRoot":"","sources":["../../src/tools/payment-setup-status.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIrE;;;;;;;;;;GAUG;AAEH,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAMtC,eAAO,MAAM,WAAW;;;;;;;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MAAM,CAAC;CAChB;AAED,wBAAgB,sBAAsB;IAElC,IAAI;IACJ,WAAW;IAKX,WAAW;QAAI,IAAI;QAAY,UAAU;QAAM,oBAAoB;;IACnE,WAAW;QAAI,YAAY;QAAQ,aAAa;QAAQ,eAAe;;EAE1E;AAED,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;GAG3F;AAYD,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOvE;AAED,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE;IAAE,WAAW,EAAE,OAAO,CAAA;CAAE,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAmG7B"}
@@ -19,16 +19,22 @@ import { payChain } from "../pay-chains.js";
19
19
  export const SMALLEST_BATCH_USD = 0.1;
20
20
  // The owner settings that let payable_fetch sign, as init prints them. README
21
21
  // "Enable native paid GET requests" shows the same block; a test keeps the two
22
- // equal and starts a server with it. The gas cap is a worst case at the current
23
- // Polygon gas price, not the fee: 0.05 POL refused every payment at ~280 gwei.
22
+ // equal and starts a server with it. The USD values are a ceiling the owner
23
+ // sets once, not the budget: the working limits (per-payment cap, daily cap,
24
+ // pause, allowed sites) live in the dashboard Controls once the agent is
25
+ // claimed, and the backend enforces those on every quote and payment. The gas
26
+ // cap is a worst case at the current Polygon gas price, not the fee: 0.05 POL
27
+ // refused every payment at ~280 gwei.
24
28
  export const PAYMENT_ENV = Object.freeze({
25
29
  AIFINPAY_PAYMENTS_ENABLED: "1",
26
30
  AIFINPAY_GATEWAY_ORIGINS: "https://merchant.example",
27
31
  AIFINPAY_GATEWAY_PATH_MODE: "direct",
28
- AIFINPAY_MAX_USD: "0.15",
29
- AIFINPAY_DAILY_USD: "1.00",
32
+ AIFINPAY_MAX_USD: "5",
33
+ AIFINPAY_DAILY_USD: "20",
30
34
  AIFINPAY_MAX_GAS_POL: "0.3",
31
35
  });
36
+ /** Where the owner manages the working limits once the agent is claimed. */
37
+ export const CONTROLS_NOTE = "The USD env values are a ceiling the owner sets once, not the budget: after agent_claim_self the owner sets the working limits (per-payment cap, daily cap, pause, allowed sites) in the dashboard Controls at https://dash.aifinpay.io, and the backend enforces them on every quote and payment.";
32
38
  export const INIT_COMMAND = "npx @aifinpay/mcp init";
33
39
  /** POSIX single quotes: the path reaches init byte for byte, spaces and quotes included. */
34
40
  function shellQuote(value) {
@@ -81,7 +87,8 @@ export function paymentSetupStatusTool() {
81
87
  return {
82
88
  name: "payment_setup_status",
83
89
  description: "Read-only checklist for paying with payable_fetch: wallet (persistent or ephemeral), whether the owner enabled payments, which owner limits are set, the wallet's native balance on the pay chain when readable, and next_step — exactly one instruction for the first unmet item. " +
84
- "First payment in five steps: (1) GET the resource and read its 402 (merchant, price, smallest batch); (2) call payment_setup_status; (3) no persistent wallet: run `npx @aifinpay/mcp init` without a terminal, put its printed env into the MCP client config, reconnect, agent_reload; (4) tell the owner the address and the amount to fund, and have the owner add the payment env (AIFINPAY_PAYMENTS_ENABLED=1, origins, USD limits, gas cap) and reconnect; (5) payable_fetch the URL. " +
90
+ "First payment in five steps: (1) GET the resource and read its 402 (merchant, price, smallest batch); (2) call payment_setup_status; (3) no persistent wallet: run `npx @aifinpay/mcp init` without a terminal, put its printed env into the MCP client config, reconnect, agent_reload; (4) tell the owner the address and the amount in `funding` (the smallest batch at today's rate plus the gas cap; if no rate could be read, ask for the batch price in the native currency at today's rate plus the gas cap and name no number), and have the owner add the payment env (AIFINPAY_PAYMENTS_ENABLED=1, origins, a USD ceiling, gas cap) and restart the server; (5) payable_fetch the URL. " +
91
+ "The env USD values are a one-time ceiling; after agent_claim_self the owner manages the working limits in the dashboard Controls. " +
85
92
  "Signs nothing, moves nothing, never asks the owner's limits from the model.",
86
93
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
87
94
  annotations: { readOnlyHint: true, openWorldHint: true, destructiveHint: false },
@@ -159,13 +166,23 @@ export async function paymentSetupStatus(ctx, options) {
159
166
  : `Run \`${initCommand(config.walletHome)}\` (without a terminal it prints JSON; copy its "env" into this server's env in the MCP client config), reconnect the server, then call agent_reload and payment_setup_status again.`);
160
167
  return status;
161
168
  }
169
+ // The amount to fund is answered before payments are enabled too: step 4
170
+ // ("tell the owner the address and the amount") happens with payments still
171
+ // off, and the 2026-10-19 quote priced $0.10 at 1.08 POL while the guide
172
+ // still said 0.5 — no fixed rate survives, so the tool reads one now.
173
+ const gasCap = status.limits.gas_cap.set && Number(status.limits.gas_cap.value) > 0 ? String(status.limits.gas_cap.value) : undefined;
174
+ const rpc = config.rpcUrl ?? chain.defaultRpc;
175
+ if (options.readBalance && chain.name !== "solana") {
176
+ status.funding = await funding(ctx, chain, rpc, gasCap);
177
+ }
162
178
  if (!config.paymentsEnabled || configError) {
163
179
  const block = JSON.stringify(paymentEnvFor(config));
164
180
  status.next_step =
165
181
  (configError && config.paymentsEnabled
166
182
  ? `Owner setting refused: ${configError}. `
167
183
  : `Payments are off until the owner enables them. `) +
168
- `Have the owner add this to the server's env in the MCP client config (their real site origin and limits, not the example), then reconnect: ${block}` +
184
+ (status.funding ? `${status.funding.advice} ` : "") +
185
+ `Have the owner add this to the server's env in the MCP client config (their real site origin, not the example; ${CONTROLS_NOTE}), then reconnect: ${block}` +
169
186
  (configError && !config.paymentsEnabled ? ` Currently missing: ${configError}` : "") +
170
187
  // The env is read once, at start. An agent that saw agent_reload succeed
171
188
  // and payments stay off concluded the settings were lost, and stopped.
@@ -174,26 +191,16 @@ export async function paymentSetupStatus(ctx, options) {
174
191
  : ` If the owner has already saved these settings, this server has not been restarted since: agent_reload does not read env. Have the client restart the aifinpay MCP server, then call payment_setup_status again.`);
175
192
  return status;
176
193
  }
177
- const gasCap = Number(status.limits.gas_cap.value);
178
- if (options.readBalance && chain.name !== "solana") {
179
- const rpc = config.rpcUrl ?? chain.defaultRpc;
194
+ if (status.funding) {
180
195
  try {
181
196
  const balance = await nativeBalance(ctx, rpc, ctx.agent.evmAddress);
182
197
  status.balance = { amount: formatNative(balance), asset: chain.native, chain: chain.name, rpc };
183
- const price = await independentNativeUsd({
184
- fetchImpl: (input, init) => ctx.agent.inner.fetchImpl(input, init),
185
- chain,
186
- rpc,
187
- }).catch(() => undefined);
188
- const batchNative = price ? SMALLEST_BATCH_USD / price.usd : 0;
189
- const needed = batchNative + gasCap;
198
+ const needed = status.funding.amount !== undefined ? Number(status.funding.amount) : Number(gasCap);
190
199
  if (Number(status.balance.amount) < needed) {
191
200
  status.next_step =
192
- `Fund ${ctx.agent.evmAddress} on ${chain.label} with about ${needed.toFixed(2)} ${chain.native}` +
193
- (price
194
- ? ` (the smallest batch is $${SMALLEST_BATCH_USD.toFixed(2)} ≈ ${batchNative.toFixed(4)} ${chain.native} plus up to ${gasCap} ${chain.native} gas; it holds ${status.balance.amount})`
195
- : ` (at least the gas cap of ${gasCap} ${chain.native} plus the batch price; it holds ${status.balance.amount})`) +
196
- `, then call payment_setup_status again.`;
201
+ status.funding.amount !== undefined
202
+ ? `Fund ${ctx.agent.evmAddress} on ${chain.label} with about ${status.funding.amount} ${chain.native} (the smallest batch is $${SMALLEST_BATCH_USD.toFixed(2)} ≈ ${status.funding.batch_native} ${chain.native} at today's rate plus up to ${gasCap} ${chain.native} gas; it holds ${status.balance.amount}), then call payment_setup_status again.`
203
+ : `Fund ${ctx.agent.evmAddress} on ${chain.label} with the batch price in ${chain.native} at today's rate plus the gas cap of ${gasCap} ${chain.native} (the rate could not be read here, so ask the owner to look it up; it holds ${status.balance.amount}), then call payment_setup_status again.`;
197
204
  return status;
198
205
  }
199
206
  }
@@ -204,12 +211,65 @@ export async function paymentSetupStatus(ctx, options) {
204
211
  status.ready = true;
205
212
  status.next_step =
206
213
  `Ready. Call payable_fetch({"url": "<HTTPS resource on ${config.gatewayOrigins.join(" or ")}>"}); ` +
207
- `it pays at most $${config.maxAmountUsd} per call and $${config.dailyAmountUsd} per 24 hours, with gas capped at ${status.limits.gas_cap.value} ${chain.native}.` +
214
+ `it pays at most $${config.maxAmountUsd} per call and $${config.dailyAmountUsd} per 24 hours, with gas capped at ${status.limits.gas_cap.value} ${chain.native}. ` +
215
+ CONTROLS_NOTE +
208
216
  (status.balance === "unknown"
209
- ? ` The wallet must hold the batch price plus up to the gas cap in ${chain.native} on ${chain.label}.`
217
+ ? ` The wallet must hold the batch price plus up to the gas cap in ${chain.native} on ${chain.label}` +
218
+ (status.funding?.amount !== undefined ? ` (about ${status.funding.amount} ${chain.native} at today's rate).` : ".")
210
219
  : "");
211
220
  return status;
212
221
  }
222
+ /**
223
+ * The amount to fund, priced now. Never a fixed rate: the number comes from
224
+ * the same independent price sources payable_fetch uses, and when none
225
+ * answers the advice says so and names no number, so the agent asks the owner
226
+ * for "the batch price at today's rate plus the gas cap" instead of inventing one.
227
+ */
228
+ async function funding(ctx, chain, rpc, gasCap) {
229
+ const address = ctx.agent.evmAddress;
230
+ const base = {
231
+ address,
232
+ chain: chain.name,
233
+ asset: chain.native,
234
+ batch_usd: SMALLEST_BATCH_USD,
235
+ ...(gasCap !== undefined ? { gas_cap: gasCap } : {}),
236
+ advice: "",
237
+ };
238
+ const batch = `the smallest batch ($${SMALLEST_BATCH_USD.toFixed(2)})`;
239
+ const cap = gasCap !== undefined ? `the gas cap of ${gasCap} ${chain.native}` : "the gas cap the owner sets";
240
+ try {
241
+ const price = await independentNativeUsd({
242
+ fetchImpl: (input, init) => ctx.agent.inner.fetchImpl(input, init),
243
+ chain,
244
+ rpc,
245
+ });
246
+ const batchNative = SMALLEST_BATCH_USD / price.usd;
247
+ const funded = {
248
+ ...base,
249
+ rate_usd: price.usd,
250
+ rate_source: price.source,
251
+ batch_native: formatAmount(batchNative, 4),
252
+ };
253
+ if (gasCap === undefined) {
254
+ funded.advice = `Fund ${address} on ${chain.label} with ${batch} ≈ ${funded.batch_native} ${chain.native} at today's rate ($${formatAmount(price.usd, 4)}/${chain.native}) plus ${cap}.`;
255
+ return funded;
256
+ }
257
+ funded.amount = formatAmount(batchNative + Number(gasCap), 2);
258
+ funded.advice = `Fund ${address} on ${chain.label} with about ${funded.amount} ${chain.native}: ${batch} ≈ ${funded.batch_native} ${chain.native} at today's rate ($${formatAmount(price.usd, 4)}/${chain.native}) plus up to ${gasCap} ${chain.native} gas.`;
259
+ return funded;
260
+ }
261
+ catch (error) {
262
+ return {
263
+ ...base,
264
+ rate_error: error.message,
265
+ advice: `The ${chain.native}/USD rate could not be read here, so name no amount: ask the owner to fund ${address} on ${chain.label} with the price of ${batch} in ${chain.native} at today's rate plus ${cap}.`,
266
+ };
267
+ }
268
+ }
269
+ /** Fixed decimals for readable amounts; more for ones that would round to zero (ETH on Base). */
270
+ function formatAmount(value, decimals) {
271
+ return value.toFixed(value >= 0.01 || value === 0 ? decimals : 6);
272
+ }
213
273
  function unready(ctx, source, chain, error) {
214
274
  return {
215
275
  ready: false,
@@ -1 +1 @@
1
- {"version":3,"file":"payment-setup-status.js","sourceRoot":"","sources":["../../src/tools/payment-setup-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAkB,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAiB,MAAM,kBAAkB,CAAC;AAE3D;;;;;;;;;;GAUG;AAEH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,8EAA8E;AAC9E,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CA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,CAAuD,CAAC;IAC3F,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1E,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,IAAI,iCAAiC,CAAC,CAAC;IAC5E,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,YAAY,CAAC,GAAW;IAC/B,MAAM,KAAK,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC;IAC/B,MAAM,QAAQ,GAAG,CAAC,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7E,OAAO,GAAG,KAAK,IAAI,QAAQ,EAAE,CAAC;AAChC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aifinpay/mcp",
3
- "version": "2.11.2",
3
+ "version": "2.11.4",
4
4
  "mcpName": "io.github.daochild/aifinpay",
5
5
  "description": "AiFinPay MCP: persistent local agent wallets, owner-configured EVM and Solana payment adapters, durable budgets and receipt recovery.",
6
6
  "type": "module",
@@ -76,8 +76,8 @@
76
76
  },
77
77
  "bugs": "https://github.com/AiFinPay/sdk/issues",
78
78
  "dependencies": {
79
- "@aifinpay/agent": "^2.8.0",
80
- "@aifinpay/skill": "^2.10.1",
79
+ "@aifinpay/agent": "^2.9.0",
80
+ "@aifinpay/skill": "^2.10.2",
81
81
  "@modelcontextprotocol/sdk": "^1.0.0",
82
82
  "bs58": "^6.0.0",
83
83
  "tweetnacl": "^1.0.3"
package/skills/SKILL.md CHANGED
@@ -6,7 +6,7 @@ description: Pay for x402-gated APIs and sites as an agent (AIFP-1 on an owner-s
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.10.1
9
+ version: 2.10.2
10
10
  author: AiFinPay Support
11
11
  metadata:
12
12
  hermes:
@@ -61,17 +61,17 @@ your language. There is no "install together" scenario.
61
61
 
62
62
  ## Version and release status
63
63
 
64
- Release target: MCP **2.11.1**, Node SDK **2.8.0**, Python **2.7.0**.
64
+ Release target: MCP **2.11.3**, Node SDK **2.9.0**, Python **2.7.0**.
65
65
  This skill describes that coordinated package cohort. Check the installed
66
66
  versions before using its additional-network instructions; a release target
67
67
  does not establish npm/PyPI publication or production network activation.
68
- Published baseline checked 2026-10-19: MCP **2.11.0**, Node SDK **2.8.0**.
68
+ Published baseline checked 2026-10-19: MCP **2.11.2**, Node SDK **2.8.0**.
69
69
  `payable_fetch` has shipped since MCP 2.2.0, and Base since MCP 2.5.0.
70
70
  Published packages remain usable within their documented capabilities.
71
71
 
72
72
  | Surface | Can it pay? |
73
73
  |---|---|
74
- | MCP `@aifinpay/mcp` 2.11.x | `payable_fetch`, only with a persistent wallet and every owner limit set; it is always listed and, until then, answers with the setup checklist instead of signing. `payment_setup_status` is the read-only checklist with one `next_step`. 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. |
74
+ | MCP `@aifinpay/mcp` 2.11.x | `payable_fetch`, only with a persistent wallet and every owner limit set; it is always listed and, until then, answers with the setup checklist instead of signing. `payment_setup_status` is the read-only checklist with one `next_step` and, from 2.11.3, `funding`: the amount to fund at today's rate. 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
75
  | Node `@aifinpay/agent` 2.8.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
76
  | Python `aifinpay-agent` 2.7.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
77
 
@@ -192,8 +192,9 @@ step — no key handling of your own, no funding of an ephemeral address.
192
192
  example `$0.10` for 200 standard requests).
193
193
  2. **Check the setup.** Call `payment_setup_status`. It returns the wallet
194
194
  (`persistent` or ephemeral), `payments_enabled`, which owner limits are
195
- set, the balance when the RPC answers, `ready`, and `next_step` — the one
196
- thing still missing. Follow `next_step`; do not skip ahead.
195
+ set, the balance when the RPC answers, `funding` (what a persistent wallet
196
+ needs, priced now), `ready`, and `next_step` — the one thing still
197
+ missing. Follow `next_step`; do not skip ahead.
197
198
  3. **Persistent wallet.** If `wallet.persistent` is false, run the exact
198
199
  command in `next_step` (it is `npx @aifinpay/mcp init`, prefixed with
199
200
  `AIFINPAY_HOME=…` when the server uses its own wallet directory — keep
@@ -208,11 +209,17 @@ step — no key handling of your own, no funding of an ephemeral address.
208
209
  its `next_step` and start a new wallet directory. Never fund an ephemeral
209
210
  address.
210
211
  4. **Fund and enable.** Tell the owner `addresses.evm` and the amount: the
211
- batch price in the pay chain's native currency plus the gas cap (on
212
- Polygon, about `0.5 POL` covers one `$0.10` batch plus a `0.3 POL` cap).
213
- When the owner confirms funding, they add the payment settings from
214
- "Paying with payable_fetch" below — with their real origin and limits —
215
- to the same `env`. **Limits are read only when the server starts**:
212
+ batch price in the pay chain's native currency at today's rate plus the
213
+ gas cap. Take it from `payment_setup_status` — its `funding` field prices
214
+ the smallest batch now and adds the owner's gas cap into `amount`. The
215
+ rate moves (on 2026-10-19 one `$0.10` batch was 1.08 POL), so never
216
+ quote a remembered number; if `funding` has a `rate_error` and no
217
+ `amount`, ask the owner to fund "the batch price in POL at today's rate
218
+ plus the gas cap" and name no number. When the owner confirms funding,
219
+ they add the payment settings from "Paying with payable_fetch" below —
220
+ with their real origin, and USD values that are a ceiling they will not
221
+ need to revisit (the working limits are set in the dashboard, see "After
222
+ creating a wallet") — to the same `env`. **Limits are read only when the server starts**:
216
223
  `agent_reload` re-reads the keystore and nothing else, so after the env
217
224
  changes the client has to restart the `aifinpay` MCP server (restart the
218
225
  client, or disable and re-enable the server in it). Until that restart
@@ -271,21 +278,28 @@ default `scope`.
271
278
 
272
279
  ## Paying with payable_fetch
273
280
 
274
- The owner configures these MCP environment values (example limits only):
281
+ The owner configures these MCP environment values once (example values; the
282
+ USD ones are a ceiling, not a budget):
275
283
 
276
284
  ```json
277
285
  {
278
286
  "AIFINPAY_PAYMENTS_ENABLED": "1",
279
287
  "AIFINPAY_GATEWAY_ORIGINS": "https://merchant.example",
280
288
  "AIFINPAY_GATEWAY_PATH_MODE": "direct",
281
- "AIFINPAY_MAX_USD": "0.15",
282
- "AIFINPAY_DAILY_USD": "1.00",
289
+ "AIFINPAY_MAX_USD": "5",
290
+ "AIFINPAY_DAILY_USD": "20",
283
291
  "AIFINPAY_MAX_GAS_POL": "0.3"
284
292
  }
285
293
  ```
286
294
 
287
- The smallest batch is **$0.10 plus gas** on **Polygon**; keep `AIFINPAY_MAX_USD`
288
- a little above the batch you expect to buy. The gas cap has to cover the
295
+ `AIFINPAY_MAX_USD` and `AIFINPAY_DAILY_USD` are the ceiling the SDK requires
296
+ before it signs with the owner's key: set once, high enough not to need
297
+ revisiting, and left alone. The day-to-day limits — per-payment cap, daily
298
+ cap, pause, allowed sites — are the dashboard **Controls** once the agent is
299
+ claimed (see "After creating a wallet" below); the backend enforces them on
300
+ every quote and payment, with no env change and no server restart. A payment
301
+ has to pass both. The smallest batch is **$0.10 plus gas** on **Polygon**;
302
+ `AIFINPAY_MAX_USD` only has to be at or above the batch. The gas cap has to cover the
289
303
  worst-case fee: at ~280 gwei that is about 0.10 POL for a POL payment and
290
304
  0.21 POL for USDC, and a lower cap refuses before anything is signed. The fee
291
305
  charged is usually a fraction of that, but the wallet must hold the batch plus
@@ -298,8 +312,9 @@ wallet or create one with `npx @aifinpay/mcp init` (on a terminal it asks for
298
312
  a passphrase; without one it generates it and prints the `env` block to put
299
313
  into the MCP client config — the server's env needs that same
300
314
  `AIFINPAY_WALLET_PASSPHRASE`, or every start mints a new ephemeral wallet);
301
- fund its EVM address on Polygon with POL, or with USDC plus some POL. Funding a wallet does not establish
302
- unlimited spend authority. Use the owner's actual approved limits and origins,
315
+ fund its EVM address on Polygon with POL, or with USDC plus some POL, in the
316
+ amount `payment_setup_status` prices. Funding a wallet does not establish
317
+ unlimited spend authority. Use the owner's actual approved origins and ceiling,
303
318
  then call `payable_fetch({"url":"https://merchant.example/api/data"})`.
304
319
 
305
320
  For another network, the owner sets `AIFINPAY_PAY_CHAIN` to an exact name in
@@ -370,10 +385,16 @@ at https://dash.aifinpay.io → My Agents:
370
385
  `agent.sign_dashboard_claim(challenge)` (Python). These sign only
371
386
  `AiFinPay-claim:polygon:<own address>:<nonce>`.
372
387
 
373
- Keep local owner spending limits in the agent's configuration (`AIFINPAY_MAX_USD`,
374
- `AIFINPAY_DAILY_USD`). Claimed-wallet controls in the dashboard are additional
375
- backend restrictions on quotes and gateway access; they do not replace local
376
- limits or control transactions sent directly outside AiFinPay.
388
+ Once the agent is claimed, the dashboard is where the owner manages its
389
+ working limits: **Controls** on the agent's page sets the per-payment cap, the
390
+ daily cap, pause and the allowed sites, and the backend enforces that policy
391
+ on every `/v1/quote` and `/v1/pay` for the claimed agent — no env change, no
392
+ server restart. The env values (`AIFINPAY_MAX_USD`, `AIFINPAY_DAILY_USD`, the
393
+ gas cap, the origins) stay as the ceiling the SDK requires before it signs;
394
+ they do not replace the dashboard, and the dashboard does not replace them —
395
+ a payment has to pass both. Dashboard controls do not reach transactions sent
396
+ directly outside AiFinPay. After `agent_claim_self`, point the owner at
397
+ Controls rather than at the config file when they want to change a limit.
377
398
 
378
399
  Discover routes on the exact requested origin: `/.well-known/x402.json` and any
379
400
  API catalog linked by that site. A dev hostname does not imply testnet. If a