agent402-mcp 0.10.1 → 0.11.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.
- package/README.md +4 -3
- package/index.js +10 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agent402-mcp
|
|
2
2
|
|
|
3
|
-
MCP server for [Agent402](https://agent402.tools) — **1,
|
|
3
|
+
MCP server for [Agent402](https://agent402.tools) — **1,346 pay-per-call web tools** and **42 curated multi-tool skill packs** for AI agents, paid per call in USDC via the [x402 protocol](https://www.x402.org), or **with compute (proof-of-work)** when no wallet is configured. Built by [Mike Petrillo](https://github.com/MikeyPetrillo).
|
|
4
4
|
|
|
5
5
|
Your agent gets browser rendering, screenshots, PDF text extraction, URL→markdown, live web search **+ web answers with citations**, live **financial/crypto/macro data** (Yahoo stock quotes, CoinGecko, FRED, ECB FX, World Bank, yield curve), **SEC EDGAR filings** (10-K/10-Q text, XBRL, insider, 13F, IPO calendar), **deterministic stats & forecasting** (Pearson correlation, OLS, Holt-Winters), **compression** (gzip/brotli), DNS/TLS/WHOIS + email-deliverability checks, wallet-keyed shared memory, and ~1,000 utility/conversion tools — plus 42 **skill packs** like `security-audit`, `trend-analysis`, `structured-scrape`, `decode-blob`, and `forecasting-bake-off` callable as MCP prompts. Payment handled invisibly underneath the MCP calls. No signup, no API key.
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ With a funded wallet (USDC on Base, Solana, Polygon, or Arbitrum) — every tool
|
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Without a wallet — the ~1,
|
|
28
|
+
Without a wallet — the ~1,156 pure-CPU tools work free via proof-of-work (the network/browser/memory tools will ask for a wallet):
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
@@ -41,7 +41,7 @@ Claude Code: `claude mcp add agent402 -- npx -y agent402-mcp`
|
|
|
41
41
|
|
|
42
42
|
- On startup the server reads the live catalog from `https://agent402.tools/api/pricing` + `/openapi.json`.
|
|
43
43
|
- The high-value tools (`extract`, `render`, `screenshot`, `pdf`, `meta`, `dns`, `http-check`, `tls-cert`, `whois`, the `memory-*` coordination tools, `hash`) are exposed as first-class MCP tools.
|
|
44
|
-
- The
|
|
44
|
+
- The rest of the ~1,346-tool catalog is reachable via `search_tools` (find by description) + `call_tool` (call by slug) — keeping your context window small.
|
|
45
45
|
- When a call hits HTTP 402: with a wallet key set (`AGENT_KEY` for Base/Polygon/Arbitrum, `SOLANA_AGENT_KEY` for Solana), the server signs an x402 USDC payment on a chain the seller accepts and retries; without a key it solves the tool's proof-of-work challenge (~0.2 s of CPU) on the eligible tools.
|
|
46
46
|
- `payment_info` tells the model which mode it's in and what a wallet would unlock.
|
|
47
47
|
- `top_x402_sellers` returns the live x402 leaderboard — which sellers are settling the most USDC (primarily on Base) in the last ~24h, derived from on-chain transfers. Free to call (no payment, no proof-of-work). Useful for agents discovering the wider x402 economy beyond this single service's catalog.
|
|
@@ -70,6 +70,7 @@ automatically:
|
|
|
70
70
|
| `AGENT402_TOOLS` | curated set | Comma-separated slugs to expose as first-class tools. |
|
|
71
71
|
| `AGENT402_MAX_PER_CALL` | unlimited | Refuse any single call priced above this many USD (e.g. `0.01`). |
|
|
72
72
|
| `AGENT402_BUDGET` | unlimited | Hard cap on total USDC spent per session (e.g. `1.00`). |
|
|
73
|
+
| `AGENT402_NETWORKS` | _(unset)_ | Restrict + order the chains to pay on — e.g. `robinhood` (USDG on Robinhood Chain), `base,solana`, or a raw CAIP-2 like `eip155:4663`. Unset = the client picks (effectively Base on multi-chain sellers). |
|
|
73
74
|
|
|
74
75
|
Spend controls are enforced **before a payment is signed** — a runaway model is
|
|
75
76
|
refused, not billed. `payment_info` reports the caps, what's been spent, and
|
package/index.js
CHANGED
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
// AGENT402_TOOLS comma-separated slugs to expose first-class (overrides default)
|
|
19
19
|
// AGENT402_MAX_PER_CALL refuse any single call priced above this many USD (e.g. 0.01)
|
|
20
20
|
// AGENT402_BUDGET hard cap on total USDC spent this session (e.g. 1.00)
|
|
21
|
+
// AGENT402_NETWORKS restrict + order the chains to pay on (e.g. "robinhood" for USDG on
|
|
22
|
+
// Robinhood Chain, "base,solana", or a raw CAIP-2 like eip155:4663) — optional
|
|
21
23
|
import { createHash } from "node:crypto";
|
|
24
|
+
import { parseNetworkPrefs, withNetworkPreference } from "./networks.js";
|
|
22
25
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
23
26
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
24
27
|
import {
|
|
@@ -35,7 +38,7 @@ const AGENT_KEY = process.env.AGENT_KEY || "";
|
|
|
35
38
|
// settle on whichever chain the seller offers (EVM accepts are tried first).
|
|
36
39
|
const SOLANA_AGENT_KEY = process.env.SOLANA_AGENT_KEY || "";
|
|
37
40
|
const HAS_WALLET = Boolean(AGENT_KEY || SOLANA_AGENT_KEY);
|
|
38
|
-
const VERSION = "0.
|
|
41
|
+
const VERSION = "0.11.1";
|
|
39
42
|
|
|
40
43
|
// Spend controls — enforced BEFORE a payment is ever signed, so a confused or
|
|
41
44
|
// runaway model cannot drain the wallet. Unset = unlimited (back-compat).
|
|
@@ -123,6 +126,12 @@ function getPayFetch() {
|
|
|
123
126
|
const { registerExactSvmScheme } = await import("@x402/svm/exact/client");
|
|
124
127
|
registerExactSvmScheme(client, { signer: await solanaSigner() });
|
|
125
128
|
}
|
|
129
|
+
// AGENT402_NETWORKS restricts + orders which chains this buyer will pay
|
|
130
|
+
// on (e.g. "robinhood" settles USDG on chain 4663; the accept carries the
|
|
131
|
+
// asset + EIP-712 domain, so the EVM signer needs no special handling).
|
|
132
|
+
// Without it the client effectively always picks Base on multi-chain
|
|
133
|
+
// sellers, leaving non-default rails unreachable.
|
|
134
|
+
withNetworkPreference(client, parseNetworkPrefs(process.env.AGENT402_NETWORKS));
|
|
126
135
|
return wrapFetchWithPayment(fetch, client);
|
|
127
136
|
})();
|
|
128
137
|
return payFetchPromise;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent402-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"mcpName": "io.github.MikeyPetrillo/agent402",
|
|
5
5
|
"author": "Mike Petrillo <mike@agent402.tools> (https://github.com/MikeyPetrillo)",
|
|
6
6
|
"homepage": "https://agent402.tools",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/MikeyPetrillo/Agent402.git"
|
|
10
10
|
},
|
|
11
|
-
"description": "Open-source MCP server exposing Agent402.Tools' 1,
|
|
11
|
+
"description": "Open-source MCP server exposing Agent402.Tools' 1,346 self-hostable tools + 42 multi-tool skill packs (security-audit, trend-analysis, structured-scrape, decode-blob, forecasting-bake-off) for AI agents — browser, web search & answers, PDFs, OCR, images, LLM inference, image generation, code execution, TTS, STT, embeddings, live financial/crypto/macro data, SEC EDGAR filings, deterministic stats & forecasting, compression, payments. Free via proof-of-work, or pay per call in USDC via the x402 protocol.",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"bin": {
|
|
14
14
|
"agent402-mcp": "index.js"
|