agent402-mcp 0.11.3 → 0.11.5
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/LICENSE +21 -0
- package/README.md +6 -6
- package/index.js +17 -7
- package/package.json +5 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Havok Holdings LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# agent402-mcp
|
|
2
2
|
|
|
3
|
-
MCP server for [Agent402](https://agent402.tools) — **
|
|
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 [Mike Petrillo](https://github.com/MikeyPetrillo).
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
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
|
|
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
|
-
|
|
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 "${
|
|
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,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent402-mcp",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.5",
|
|
4
4
|
"mcpName": "io.github.MikeyPetrillo/agent402",
|
|
5
|
-
"author": "
|
|
5
|
+
"author": "Havok Holdings LLC <mike@agent402.tools> (https://agent402.tools)",
|
|
6
6
|
"homepage": "https://agent402.tools",
|
|
7
7
|
"repository": {
|
|
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'
|
|
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",
|