agent402-mcp 0.11.4 → 0.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +10 -6
  2. package/index.js +17 -7
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # agent402-mcp
2
2
 
3
- MCP server for [Agent402](https://agent402.tools) — **1,407 pay-per-call web tools** and **100 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).
3
+ MCP server for [Agent402](https://agent402.tools) — a catalog of **500+: 400+ pay-per-call web tools + 100 curated multi-tool skill packs** for AI agents (every one tested, priced, and settled on-chain; every one earns its place), 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 [Havok Holdings LLC](https://github.com/MikeyPetrillo/Agent402).
4
4
 
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 100 **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.
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 216 deterministic pure-CPU utilities — plus 100 **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
 
7
7
  ## Quick start
8
8
 
@@ -11,7 +11,7 @@ MCP server — e.g. claude.ai → Settings → Connectors → Add custom connect
11
11
  pure-CPU tools run free there (rate-limited); for the full catalog and no rate
12
12
  limit, run this package locally with a wallet:
13
13
 
14
- With a funded wallet (USDC on Base, Solana, Polygon, or Arbitrum) — every tool available:
14
+ With a funded wallet (USDC on Base, Polygon, Arbitrum, Monad, or Solana — the underlying service also accepts Stellar and Algorand, but this package currently signs only EVM and Solana payments) — every tool available:
15
15
 
16
16
  ```json
17
17
  {
@@ -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,181 pure-CPU tools work free via proof-of-work (the network/browser/memory tools will ask for a wallet):
28
+ Without a wallet — the 216 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,8 +41,8 @@ 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 rest of the ~1,407-tool catalog is reachable via `search_tools` (find by description) + `call_tool` (call by slug) — keeping your context window small.
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.
44
+ - The rest of the 500+ endpoint catalog (400+ tools + 100 skill packs) is reachable via `search_tools` (find by description) + `call_tool` (call by slug) — keeping your context window small.
45
+ - When a call hits HTTP 402: with a wallet key set (`AGENT_KEY` for the EVM chains — Base/Polygon/Arbitrum/Monad, `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. (The service also settles USDC on Stellar and Algorand, and USDG on Robinhood Chain — 8 chains total — for callers using a raw x402 client rather than this package.)
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.
48
48
 
@@ -82,3 +82,7 @@ $0.001–$0.02 each.
82
82
  ## Test
83
83
 
84
84
  From the repo root: `node mcp/test.js` (boots a local paywalled instance and drives the MCP server with a real client; the proof-of-work path settles real challenges).
85
+
86
+ ## Legal
87
+
88
+ Use of the hosted instance at agent402.tools is subject to its [Terms of Service](https://agent402.tools/terms) (acceptable-use policy included) and [Privacy Policy](https://agent402.tools/privacy). This package is MIT-licensed; the hosted server is AGPL-3.0. Both are provided as-is without warranty, and self-hosted deployments are their operator's responsibility.
package/index.js CHANGED
@@ -38,7 +38,7 @@ const AGENT_KEY = process.env.AGENT_KEY || "";
38
38
  // settle on whichever chain the seller offers (EVM accepts are tried first).
39
39
  const SOLANA_AGENT_KEY = process.env.SOLANA_AGENT_KEY || "";
40
40
  const HAS_WALLET = Boolean(AGENT_KEY || SOLANA_AGENT_KEY);
41
- const VERSION = "0.11.2";
41
+ const VERSION = "0.11.5";
42
42
 
43
43
  // Spend controls — enforced BEFORE a payment is ever signed, so a confused or
44
44
  // runaway model cannot drain the wallet. Unset = unlimited (back-compat).
@@ -51,6 +51,9 @@ const DEFAULT_CURATED = [
51
51
  // the tools agents can't replicate locally: live search, browser, PDF, shared memory
52
52
  "search", "extract", "render", "screenshot", "pdf", "meta", "dns", "http-check", "tls-cert", "whois",
53
53
  "memory-write", "memory-read", "memory-remember", "memory-recall",
54
+ // wallet management — balance + history, first-class so directories and
55
+ // agents see the capability by name (they execute here when AGENT_KEY is set)
56
+ "wallet-balances", "wallet-balance", "wallet-transactions",
54
57
  // one cheap pure-CPU tool so wallet-less clients see the proof-of-work path work
55
58
  "hash",
56
59
  ];
@@ -335,7 +338,9 @@ let pricingInfo = null;
335
338
 
336
339
  server.setRequestHandler(ListToolsRequestSchema, async () => {
337
340
  const tools = curated.map((t) => ({
338
- name: t.slug,
341
+ // snake_case exposed name so the whole tools/list is one convention
342
+ // (meta-tools are snake_case; slugs are kebab). CallTool accepts both.
343
+ name: t.slug.replace(/-/g, "_"),
339
344
  description: `[${t.price}/call${t.computePayable ? ", or free via proof-of-work" : ", wallet required"}] ${t.description}`,
340
345
  inputSchema: t.inputSchema,
341
346
  }));
@@ -343,7 +348,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
343
348
  {
344
349
  name: "search_tools",
345
350
  description:
346
- `Search the full Agent402 catalog (${catalog.size} pay-per-call tools: encoding, crypto, data conversion, text, time, validation, math, unit conversions, network, browser, memory). Returns matching tools with price, payment options, and input schema — call them with call_tool. Also returns matching multi-tool workflow templates (skill packs) when the query is task-shaped; fetch the whole template via prompts/get { name: "<slug>", arguments: { … } }.`,
351
+ `Search the full Agent402 catalog (${catalog.size} pay-per-call tools: live market data like stock-quote at $0.003, encoding, crypto, data conversion, text, time, validation, math, unit conversions, network, browser, memory). Many pure-CPU tools are free via proof-of-work — no wallet needed. There is also an OpenAI-compatible LLM gateway at ${BASE}/v1, flat per-call (chat nano $0.003, auto $0.01, embeddings $0.002) with no API key — a funded wallet is the account; its tiers are callable here via call_tool (slugs v1-chat-nano, v1-chat-auto, v1-embeddings) when a wallet key is set. Returns matching tools with price, payment options, and input schema — call them with call_tool. Also returns matching multi-tool workflow templates (skill packs) when the query is task-shaped; fetch the whole template via prompts/get { name: "<slug>", arguments: { … } }.`,
347
352
  inputSchema: {
348
353
  type: "object",
349
354
  properties: {
@@ -356,11 +361,11 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
356
361
  {
357
362
  name: "call_tool",
358
363
  description:
359
- "Call any Agent402 tool by slug (find slugs and input schemas with search_tools). Payment is handled automatically: USDC via x402 if this server has a wallet key, otherwise proof-of-work on eligible tools.",
364
+ "Call any Agent402 tool by slug (find slugs and input schemas with search_tools). Payment is handled automatically: USDC via x402 if this server has a wallet key, otherwise free proof-of-work on eligible pure-CPU tools (no wallet needed). Wallet-keyed highlights: live market data (stock-quote $0.003) and the /v1 LLM gateway tiers (chat nano $0.003, embeddings $0.002 — no API key).",
360
365
  inputSchema: {
361
366
  type: "object",
362
367
  properties: {
363
- slug: { type: "string", description: "Tool slug from search_tools, e.g. \"convert-miles-to-kilometers\"" },
368
+ slug: { type: "string", description: "Tool slug from search_tools, e.g. \"unit-convert\"" },
364
369
  params: { type: "object", description: "Tool input parameters, matching the tool's inputSchema" },
365
370
  },
366
371
  required: ["slug"],
@@ -497,9 +502,14 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
497
502
  }],
498
503
  };
499
504
  }
500
- const tool = catalog.get(name === "call_tool" ? args.slug : name);
505
+ // Curated tools are exposed snake_case for tools/list consistency, but the
506
+ // real slug is kebab — accept either the exposed name or the raw slug.
507
+ const wanted = name === "call_tool"
508
+ ? String(args.slug ?? "")
509
+ : (catalog.has(name) ? name : name.replace(/_/g, "-"));
510
+ const tool = catalog.get(wanted);
501
511
  if (!tool) {
502
- return { content: [{ type: "text", text: `Unknown tool slug "${name === "call_tool" ? args.slug : name}". Use search_tools to find the right slug.` }], isError: true };
512
+ return { content: [{ type: "text", text: `Unknown tool slug "${wanted}". Use search_tools to find the right slug.` }], isError: true };
503
513
  }
504
514
  return await callEndpoint(tool, name === "call_tool" ? (args.params ?? {}) : args);
505
515
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent402-mcp",
3
- "version": "0.11.4",
3
+ "version": "0.11.6",
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",
@@ -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,407 self-hostable tools + 100 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 on Base, Solana, Polygon, Arbitrum & Stellar — plus USDG on Robinhood Chain (6 chains total) — via the x402 protocol.",
11
+ "description": "Open-source MCP server exposing Agent402.Tools' catalog — 500+ strong: 400+ self-hostable tools + 100 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, 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 on Base, Solana, Polygon, Arbitrum, Monad, Stellar & Algorand — plus USDG on Robinhood Chain (8 chains total) — via the x402 protocol.",
12
12
  "type": "module",
13
13
  "bin": {
14
14
  "agent402-mcp": "index.js"
@@ -50,7 +50,9 @@
50
50
  "polygon",
51
51
  "arbitrum",
52
52
  "multi-chain",
53
+ "monad",
53
54
  "stellar",
55
+ "algorand",
54
56
  "robinhood-chain"
55
57
  ],
56
58
  "license": "MIT",