agent402-mcp 0.13.30 → 0.13.31
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 +5 -5
- package/index.js +2 -2
- package/known-assets.js +20 -2
- package/output-schemas.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ Pick one setup. Both run locally through `npx`.
|
|
|
9
9
|
**1. Free, no wallet.** Pure-CPU tools (no outbound calls, keys or models) run free. Each call solves a proof-of-work puzzle with your CPU, typically well under a second on a laptop. Tools that reach the network or a model ask for a wallet.
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
claude mcp add agent402 -s user -- npx -y agent402-mcp@0.13.
|
|
12
|
+
claude mcp add agent402 -s user -- npx -y agent402-mcp@0.13.31
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
**2. Paid, with a wallet.** Paid tools are settled in USDC on each call.
|
|
@@ -19,7 +19,7 @@ claude mcp add agent402 -s user -- npx -y agent402-mcp@0.13.30
|
|
|
19
19
|
"mcpServers": {
|
|
20
20
|
"agent402": {
|
|
21
21
|
"command": "npx",
|
|
22
|
-
"args": ["-y", "agent402-mcp@0.13.
|
|
22
|
+
"args": ["-y", "agent402-mcp@0.13.31"],
|
|
23
23
|
"env": { "AGENT_KEY": "0xYOUR_PRIVATE_KEY" }
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -30,7 +30,7 @@ claude mcp add agent402 -s user -- npx -y agent402-mcp@0.13.30
|
|
|
30
30
|
|
|
31
31
|
Use `SOLANA_AGENT_KEY` instead for USDC on Solana. Each call is capped at $4 by default; there is no session budget unless you set `AGENT402_BUDGET`.
|
|
32
32
|
|
|
33
|
-
Claude Code with a wallet: `claude mcp add agent402 -s user -e AGENT_KEY=0xYOUR_PRIVATE_KEY -- npx -y agent402-mcp@0.13.
|
|
33
|
+
Claude Code with a wallet: `claude mcp add agent402 -s user -e AGENT_KEY=0xYOUR_PRIVATE_KEY -- npx -y agent402-mcp@0.13.31`
|
|
34
34
|
(use a new wallet holding only a few dollars of USDC; never your main wallet).
|
|
35
35
|
|
|
36
36
|
Advanced setup (chains, MPP, error codes, the hosted connector) is in [Advanced](#advanced).
|
|
@@ -93,7 +93,7 @@ its variable name, not its value.
|
|
|
93
93
|
|
|
94
94
|
**Hosted connector (no install).** Add `https://agent402.tools/mcp` as a remote MCP server (for example claude.ai → Settings → Connectors → Add custom connector). Pure-CPU tools run free there, rate-limited. Paid tools are payable on the connector over [MPP](https://agent402.tools/what-is-mpp): the connector answers with an `isError` tool result whose text names every way to pay and whose `_meta["org.paymentauth/payment-required"]` carries the challenges. A presented credential that is refused answers JSON-RPC `-32043`, and a call on the tasks path answers `-32042`, both with `data.challenges`. An MCP client wrapped with `mppx`'s `McpClient.wrap()` pays and retries on its own, with the receipt in `_meta`. This package runs locally for no rate limit, or to pay over x402.
|
|
95
95
|
|
|
96
|
-
**Chains.** With a funded wallet, `AGENT_KEY` pays USDC on any EVM chain the server offers (Base, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism, Arc) or USDG on Robinhood Chain. `SOLANA_AGENT_KEY` pays USDC on Solana. The service also settles on Stellar and Algorand, which this package does not sign. Restrict or order chains with `AGENT402_NETWORKS`.
|
|
96
|
+
**Chains.** With a funded wallet, `AGENT_KEY` pays USDC on any EVM chain the server offers (Base, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism, Arc, Ink) or USDG on Robinhood Chain. `SOLANA_AGENT_KEY` pays USDC on Solana. The service also settles on Stellar and Algorand, which this package does not sign. Restrict or order chains with `AGENT402_NETWORKS`.
|
|
97
97
|
|
|
98
98
|
**Credits key.** A prepaid credits key (`AGENT402_CREDITS_KEY`) pays per successful call on Agent402's own services; the routes that buy from outside sellers (`router.execute`, `seller-payability`, `decide.execute`, the flight tools) need a wallet key. [agent402.tools/credits](https://agent402.tools/credits) says whether packs are on sale.
|
|
99
99
|
|
|
@@ -105,7 +105,7 @@ its variable name, not its value.
|
|
|
105
105
|
- **Flagship tools** are exposed as first-class MCP tools under dotted names - `web.search`, `web.answer`, `web.news`, `browser.render`, `market.quote`, `audio.transcribe`, `memory.read`, `memory.write` - search/answer is the front door. Override the set with `AGENT402_TOOLS` (slugs; a non-flagship slug is listed as its snake_case name).
|
|
106
106
|
- **Decide** (`decide.plan`, `decide.execute`, `decide.feedback`): describe a job and get a call-ready plan over the catalog and outside x402 sellers (tools in order, fallbacks, validated params, chained steps), then run it yourself or through Agent402. Listed when the server offers Decide; see https://agent402.tools/decide.
|
|
107
107
|
- The rest of the 500+ tool catalog is reachable via the meta tools `catalog.search` / `catalog.find` + `catalog.call` - keeping your context window small. The same dotted names are listed on the hosted connector; the older snake names (`search_tools`, `find_tool`, `call_tool`, `get_payment_info`, `describe_server`, `list_top_sellers`, and the flagship `search_web` …) remain accepted as CallTool aliases, so existing configs keep working.
|
|
108
|
-
- When a call hits HTTP 402: with a wallet key set (`AGENT_KEY` for the EVM chains, Robinhood Chain included; `SOLANA_AGENT_KEY` for Solana), the server signs an x402 payment on a chain the seller accepts and retries; with only a credits key it sends `Authorization: Bearer a402_…` and the server debits the balance on success; with neither it solves the tool's proof-of-work challenge (~0.2 s of CPU) on the eligible tools. (The service settles USDC on Base, Solana, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism, Arc, Stellar and Algorand, plus USDG on Robinhood Chain -
|
|
108
|
+
- When a call hits HTTP 402: with a wallet key set (`AGENT_KEY` for the EVM chains, Robinhood Chain included; `SOLANA_AGENT_KEY` for Solana), the server signs an x402 payment on a chain the seller accepts and retries; with only a credits key it sends `Authorization: Bearer a402_…` and the server debits the balance on success; with neither it solves the tool's proof-of-work challenge (~0.2 s of CPU) on the eligible tools. (The service settles USDC on Base, Solana, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism, Arc, Ink, Stellar and Algorand, plus USDG on Robinhood Chain - 14 chains total - for callers using a raw x402 client rather than this package. Where the server also offers a Circle Gateway batched accept on Arc or Base, this package pays the plain accept beside it.)
|
|
109
109
|
- Since 0.13.15 the server's requests to the catalog and to sellers (catalog reads, the 402 and the paid retry) refuse a TLS chain through one of the intermediate CAs listed in `networks.js` (keys reported recoverable in Mozilla bug 2083449), keyed on each certificate's SubjectPublicKeyInfo hash, on a dedicated dispatcher. With a proxy or custom dispatcher installed, requests go out through it unchanged.
|
|
110
110
|
- **Slow routes run as jobs** (since 0.13.17): a paid call to a route the catalog marks slow carries `Prefer: respond-async`, answers `202` with a job link, and the server polls `GET /api/jobs/{id}` (free), waiting `Retry-After` seconds between polls, until the answer is ready, reading the job's `state` and falling back to its `status`. Payment settles only on the delivered answer. A caller that sends a `progressToken` gets `notifications/progress` from the job's stage, steps and ETA. A job still running when `AGENT402_ASYNC_TIMEOUT_MS` ends comes back with its `jobUrl` instead.
|
|
111
111
|
- `payment.info` tells the model which mode it's in and what a wallet or a credits key would unlock.
|
package/index.js
CHANGED
|
@@ -1051,7 +1051,7 @@ server.setRequestHandler(CallToolRequestSchema, redacted(withCatalog(async (req,
|
|
|
1051
1051
|
claudeCodeHosted: `claude mcp add --transport http agent402 ${BASE}/mcp`,
|
|
1052
1052
|
claudeCodeNpm: `claude mcp add agent402 -s user -- npx -y agent402-mcp@${AGENT402_MCP_VERSION}`,
|
|
1053
1053
|
cursorHosted: { mcpServers: { agent402: { url: `${BASE}/mcp` } } },
|
|
1054
|
-
npm: "npx -y agent402-mcp@0.13.
|
|
1054
|
+
npm: "npx -y agent402-mcp@0.13.31",
|
|
1055
1055
|
maintainer: "Havok Holdings LLC",
|
|
1056
1056
|
},
|
|
1057
1057
|
positioning: `Flagship search/answer first, 500+ long-tail tools via catalog.find / catalog.search / catalog.call. Agent402 is the applied layer of Agentic Finance: agents that pay and get paid per request over x402 or MPP (Machine Payments Protocol), both on the same 402 - ${BASE}/agentic-finance, ${BASE}/glossary.`,
|
|
@@ -1071,7 +1071,7 @@ server.setRequestHandler(CallToolRequestSchema, redacted(withCatalog(async (req,
|
|
|
1071
1071
|
install: {
|
|
1072
1072
|
claudeCodeHosted: `claude mcp add --transport http agent402 ${BASE}/mcp`,
|
|
1073
1073
|
claudeCodeNpm: `claude mcp add agent402 -s user -- npx -y agent402-mcp@${AGENT402_MCP_VERSION}`,
|
|
1074
|
-
npm: "npx -y agent402-mcp@0.13.
|
|
1074
|
+
npm: "npx -y agent402-mcp@0.13.31",
|
|
1075
1075
|
maintainer: "Havok Holdings LLC",
|
|
1076
1076
|
},
|
|
1077
1077
|
tools: catalog.size,
|
package/known-assets.js
CHANGED
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
// and a buyer with a cap does not sign it. The table is keyed by CAIP-2 ids
|
|
13
13
|
// only: a bare v1 network name (for example "base") is not priced.
|
|
14
14
|
//
|
|
15
|
+
// An entry may also name its token's EIP-712 domain (`name` and `version`,
|
|
16
|
+
// read from the token's own name() and version()). An EVM "exact" signer
|
|
17
|
+
// signs under the domain the accept's `extra` carries, so for such an entry
|
|
18
|
+
// an accept whose `extra.name` or `extra.version` is not exactly the token's
|
|
19
|
+
// cannot be priced either, and a buyer with a cap does not sign it.
|
|
20
|
+
//
|
|
15
21
|
// The same file ships in agent402-client, agent402-mcp and agent402-openclaw;
|
|
16
22
|
// the parent repo's scripts/test-known-assets.js keeps the copies identical and
|
|
17
23
|
// checks the table against the assets the server offers.
|
|
@@ -29,6 +35,7 @@ export const KNOWN_ASSETS = Object.freeze({
|
|
|
29
35
|
"eip155:1329": [{ asset: "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392", decimals: 6, symbol: "USDC" }], // Sei
|
|
30
36
|
"eip155:10": [{ asset: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", decimals: 6, symbol: "USDC" }], // Optimism
|
|
31
37
|
"eip155:5042": [{ asset: "0x3600000000000000000000000000000000000000", decimals: 6, symbol: "USDC" }], // Arc
|
|
38
|
+
"eip155:57073": [{ asset: "0x2D270e6886d130D724215A266106e6832161EAEd", decimals: 6, symbol: "USDC", name: "USDC", version: "2" }], // Ink
|
|
32
39
|
"eip155:4663": [{ asset: "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168", decimals: 6, symbol: "USDG" }], // Robinhood Chain
|
|
33
40
|
// Solana: the USDC mint.
|
|
34
41
|
"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp": [{ asset: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", decimals: 6, symbol: "USDC" }],
|
|
@@ -56,6 +63,7 @@ export const NETWORK_NAMES = Object.freeze({
|
|
|
56
63
|
sei: ["eip155:1329"],
|
|
57
64
|
optimism: ["eip155:10"],
|
|
58
65
|
arc: ["eip155:5042"],
|
|
66
|
+
ink: ["eip155:57073"],
|
|
59
67
|
robinhood: ["eip155:4663"],
|
|
60
68
|
solana: ["solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],
|
|
61
69
|
"solana-devnet": ["solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"],
|
|
@@ -88,6 +96,15 @@ export function knownAsset(network, asset) {
|
|
|
88
96
|
return list.find((e) => sameAsset(e.asset, asset)) || null;
|
|
89
97
|
}
|
|
90
98
|
|
|
99
|
+
/** True when the accept carries the EIP-712 domain the table names for its
|
|
100
|
+
* asset (`extra.name` and `extra.version`, exactly), or when the entry names
|
|
101
|
+
* none. */
|
|
102
|
+
export function acceptDomainMatches(entry, accept) {
|
|
103
|
+
if (!entry || (entry.name == null && entry.version == null)) return true;
|
|
104
|
+
const extra = accept && typeof accept.extra === "object" && accept.extra ? accept.extra : {};
|
|
105
|
+
return extra.name === entry.name && extra.version === entry.version;
|
|
106
|
+
}
|
|
107
|
+
|
|
91
108
|
/** The base-unit amount the signer of `x402Version` signs for one accept, as
|
|
92
109
|
* a string of digits: `maxAmountRequired` under v1, `amount` under v2. With
|
|
93
110
|
* no version, the one field present (or both, when they agree). null when
|
|
@@ -111,12 +128,13 @@ export function acceptAmount(accept, x402Version = undefined) {
|
|
|
111
128
|
|
|
112
129
|
/** The USD value of one accept: the base-unit amount its version's signer
|
|
113
130
|
* signs (acceptAmount) over the KNOWN decimals of its asset. null when the
|
|
114
|
-
* asset is not known
|
|
131
|
+
* asset is not known, when the accept names a different EIP-712 domain than
|
|
132
|
+
* the table's for that asset, or when the amount cannot be read. */
|
|
115
133
|
export function acceptUsd(accept, x402Version = undefined) {
|
|
116
134
|
const raw = acceptAmount(accept, x402Version);
|
|
117
135
|
if (raw == null) return null;
|
|
118
136
|
const entry = knownAsset(accept.network, accept.asset);
|
|
119
|
-
if (!entry) return null;
|
|
137
|
+
if (!entry || !acceptDomainMatches(entry, accept)) return null;
|
|
120
138
|
return Number(raw) / 10 ** entry.decimals;
|
|
121
139
|
}
|
|
122
140
|
|
package/output-schemas.js
CHANGED
|
@@ -492,7 +492,7 @@ export function mcpJsonResult(obj) {
|
|
|
492
492
|
* Hosted URL is parameterized; npm / Claude Code / Cursor notes
|
|
493
493
|
* match docs/ecosystem-listings.md + wiki/MCP-Connector.md.
|
|
494
494
|
*/
|
|
495
|
-
export const AGENT402_MCP_VERSION = "0.13.
|
|
495
|
+
export const AGENT402_MCP_VERSION = "0.13.31";
|
|
496
496
|
|
|
497
497
|
/** A listed MCP tool description, at most `max` characters. Hosts truncate or
|
|
498
498
|
* skip long descriptions, so the listing keeps the first whole sentences; the
|
|
@@ -524,12 +524,12 @@ export function mcpInstallHints(baseUrl) {
|
|
|
524
524
|
mcpServers: {
|
|
525
525
|
agent402: {
|
|
526
526
|
command: "npx",
|
|
527
|
-
args: ["-y", "agent402-mcp@0.13.
|
|
527
|
+
args: ["-y", "agent402-mcp@0.13.31"],
|
|
528
528
|
env: { AGENT_KEY: "0xYOUR_PRIVATE_KEY" },
|
|
529
529
|
},
|
|
530
530
|
},
|
|
531
531
|
},
|
|
532
|
-
npm: "npx -y agent402-mcp@0.13.
|
|
532
|
+
npm: "npx -y agent402-mcp@0.13.31",
|
|
533
533
|
maintainer: "Havok Holdings LLC",
|
|
534
534
|
};
|
|
535
535
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent402-mcp",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.31",
|
|
4
4
|
"mcpName": "io.github.MikeyPetrillo/agent402",
|
|
5
5
|
"author": "Havok Holdings LLC <mike@agent402.tools> (https://agent402.tools)",
|
|
6
6
|
"homepage": "https://agent402.tools",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/MikeyPetrillo/Agent402.git",
|
|
10
10
|
"directory": "mcp"
|
|
11
11
|
},
|
|
12
|
-
"description": "Agent402 MCP server: 500+ pay-per-call tools + skill packs for AI agents over x402 (USDC or USDG on
|
|
12
|
+
"description": "Agent402 MCP server: 500+ pay-per-call tools + skill packs for AI agents over x402 (USDC or USDG on 14 chains) or MPP on the same 402, or free via proof-of-work - the applied layer of Agentic Finance. Catalog: browser, web search + cited answers, PDFs, OCR, images, LLM inference, image generation, code execution, STT, embeddings, live financial/crypto/macro data, SEC EDGAR filings, deterministic stats & forecasting, compression, payments. Open source, self-hostable.",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"bin": {
|
|
15
15
|
"agent402-mcp": "index.js"
|