agent402-mcp 0.13.6 → 0.13.8
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 +7 -7
- package/index.js +3 -3
- package/output-schemas.js +7 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# agent402-mcp
|
|
2
2
|
|
|
3
|
-
MCP server for [Agent402](https://agent402.tools), the applied layer of [Agentic Finance](https://agent402.tools/agentic-finance) - a catalog of **500
|
|
3
|
+
MCP server for [Agent402](https://agent402.tools), the applied layer of [Agentic Finance](https://agent402.tools/agentic-finance) - a catalog of **500+ pay-per-call web tools and curated multi-tool skill packs** for AI agents, paid per call in USDC via the [x402 protocol](https://www.x402.org), **with compute (proof-of-work)** when no wallet is configured, or through a prepaid credits key already issued. (The hosted API is dual-stack: it also accepts [MPP](https://agent402.tools/what-is-mpp) clients on the same 402, settling on Base/Celo or natively on Tempo; this package pays via x402 or credits.) 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** (US equity quotes and daily bars from Databento, 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 the pure-CPU utilities - plus
|
|
5
|
+
Your agent gets browser rendering, screenshots, PDF text extraction, URL→markdown, live web search **+ web answers with citations**, live **financial/crypto/macro data** (US equity quotes and daily bars from Databento, 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 the pure-CPU utilities - plus **skill packs** like `security-audit`, `trend-analysis`, `structured-scrape`, `decode-blob`, and `forecasting-bake-off` callable as MCP prompts, and the **report products** (deep research, company dossier, 13F fund report, domain audit, token risk, FDA recall, insider flow, market brief) as ordinary catalog slugs. Payment handled invisibly underneath the MCP calls. No signup, no API key.
|
|
6
6
|
|
|
7
7
|
## Quick start
|
|
8
8
|
|
|
@@ -10,10 +10,10 @@ Your agent gets browser rendering, screenshots, PDF text extraction, URL→markd
|
|
|
10
10
|
MCP server - e.g. claude.ai → Settings → Connectors → Add custom connector. The
|
|
11
11
|
pure-CPU tools run free there (rate-limited), and the paid tools are payable
|
|
12
12
|
right on the connector over [MPP](https://agent402.tools/what-is-mpp): a paid
|
|
13
|
-
call answers
|
|
13
|
+
call answers JSON-RPC error `-32042` carrying the challenges (`-32043` if a presented credential was refused), and an MCP client
|
|
14
14
|
wrapped with `mppx`'s `McpClient.wrap()` (USDC on Base/Celo, or native Tempo)
|
|
15
15
|
pays and retries on its own, receipt in `_meta`. For no rate limit, or to pay
|
|
16
|
-
over x402 or
|
|
16
|
+
over x402 or with a credits key already issued, run this package locally:
|
|
17
17
|
|
|
18
18
|
With a funded wallet (USDC on any EVM rail the server offers - Base, Polygon, Arbitrum, Monad, Celo, Avalanche, Sei, Optimism - or USDG on Robinhood Chain, or USDC on Solana via `SOLANA_AGENT_KEY`; the service also settles on Stellar and Algorand, which this package does not sign) - every tool available:
|
|
19
19
|
|
|
@@ -61,7 +61,7 @@ Every variable the server reads (all optional):
|
|
|
61
61
|
|
|
62
62
|
| env | default | meaning |
|
|
63
63
|
| --- | --- | --- |
|
|
64
|
-
| `AGENT_KEY` | _(unset)_ | Hex private key of an EVM wallet funded with USDC on Base (or
|
|
64
|
+
| `AGENT_KEY` | _(unset)_ | Hex private key of an EVM wallet funded with USDC on Base (or another EVM chain the server offers), or USDG on Robinhood Chain. |
|
|
65
65
|
| `SOLANA_AGENT_KEY` | _(unset)_ | Base58 secret key (or JSON byte array) of a Solana wallet funded with USDC on Solana. |
|
|
66
66
|
| `AGENT402_CREDITS_KEY` | _(unset)_ | A prepaid credits key (`a402_...`) already issued (new credits are not on sale). Sent as `Authorization: Bearer` on every catalog call; the server debits the list price only on a successful (200) call and answers `X-Credits-Balance`. Used only when no wallet key is set (a wallet key wins); in credits mode every call - pure-CPU tools included - is debited from the key. |
|
|
67
67
|
| `AGENT402_URL` | `https://agent402.tools` | Target service (point at your own deployment). |
|
|
@@ -85,8 +85,8 @@ so set `AGENT402_MAX_PER_CALL` if you want a hard per-call ceiling.
|
|
|
85
85
|
- On startup the server reads the live catalog from `https://agent402.tools/api/pricing` + `/openapi.json`.
|
|
86
86
|
- **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).
|
|
87
87
|
- **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.
|
|
88
|
-
- The rest of the 500+
|
|
89
|
-
- When a call hits HTTP 402: with a wallet key set (`AGENT_KEY` for the EVM chains
|
|
88
|
+
- 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.
|
|
89
|
+
- 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, Stellar and Algorand, plus USDG on Robinhood Chain - 12 chains total - for callers using a raw x402 client rather than this package.)
|
|
90
90
|
- `payment.info` tells the model which mode it's in and what a wallet or a credits key would unlock.
|
|
91
91
|
- `server.describe` returns orientation (flagship-first tools, install one-liners, free vs paid, discovery URLs). Call it first.
|
|
92
92
|
- `sellers.list` returns the live leaderboards - `wire: "x402"` (default) ranks x402 sellers settling the most USDC (primarily on Base) in the last ~24h from on-chain transfers; `wire: "mpp"` ranks live-verified MPP sellers by inbound USDC.e transfers on Tempo. Free to call (no payment, no proof-of-work). Useful for agents discovering the wider x402 / MPP economy beyond this single service's catalog.
|
package/index.js
CHANGED
|
@@ -53,7 +53,7 @@ const AGENT_KEY = process.env.AGENT_KEY || "";
|
|
|
53
53
|
// settle on whichever chain the seller offers (EVM accepts are tried first).
|
|
54
54
|
const SOLANA_AGENT_KEY = process.env.SOLANA_AGENT_KEY || "";
|
|
55
55
|
const HAS_WALLET = Boolean(AGENT_KEY || SOLANA_AGENT_KEY);
|
|
56
|
-
// Prepaid card credits (no wallet): a key
|
|
56
|
+
// Prepaid card credits (no wallet): a key issued at https://agent402.tools/credits.
|
|
57
57
|
// Sent as Authorization: Bearer on every catalog call; the server debits the
|
|
58
58
|
// list price only on a successful (200) call and returns X-Credits-Balance.
|
|
59
59
|
const CREDITS_KEY = (process.env.AGENT402_CREDITS_KEY || "").trim();
|
|
@@ -716,7 +716,7 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
716
716
|
payableWithCompute: computePayable,
|
|
717
717
|
walletOnly: catalog.size - computePayable,
|
|
718
718
|
workflows: skillPacks.length,
|
|
719
|
-
credits: HAS_CREDITS ? { configured: true, how: "prepaid card credits (Authorization: Bearer a402_...) - every tool pays
|
|
719
|
+
credits: HAS_CREDITS ? { configured: true, how: "prepaid card credits (Authorization: Bearer a402_...) - every wallet-only tool except the wallet-identity-bound ones (memory, usage, receipts, attest, feedback) pays from the balance, debited only on a successful call", balance: `${BASE}/api/credits/balance`, topup: `${BASE}/credits` } : { configured: false, buy: `${BASE}/credits` },
|
|
720
720
|
spendControls: (HAS_WALLET || HAS_CREDITS)
|
|
721
721
|
? {
|
|
722
722
|
maxPerCallUsd: MAX_PER_CALL === Infinity ? "unlimited" : MAX_PER_CALL,
|
|
@@ -737,7 +737,7 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
737
737
|
npm: "npx -y agent402-mcp",
|
|
738
738
|
maintainer: "Havok Holdings LLC",
|
|
739
739
|
},
|
|
740
|
-
positioning: `
|
|
740
|
+
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.`,
|
|
741
741
|
ecosystem: "Call sellers.list to see which x402 sellers (any wallet, not just this host) are settling the most USDC (primarily on Base) in the last 24h, or sellers.list with wire=mpp for MPP sellers ranked by on-chain USDC.e transfers on Tempo - discovers the live economy beyond this catalog.",
|
|
742
742
|
});
|
|
743
743
|
}
|
package/output-schemas.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
// Flagship MCP surface — the small default tools/list agents see first.
|
|
6
6
|
//
|
|
7
|
-
// Product intent
|
|
8
|
-
//
|
|
9
|
-
// tight flagship set; the long catalog stays callable via find_tool /
|
|
7
|
+
// Product intent: Agent402 is a tools and models layer for agents -
|
|
8
|
+
// deterministic utilities, a metered model gateway, finished reports. Default
|
|
9
|
+
// MCP exposure is a tight flagship set; the long catalog stays callable via find_tool /
|
|
10
10
|
// search_tools / call_tool. Keep this list aligned with mcp/index.js
|
|
11
11
|
// DEFAULT_CURATED (stdio package cannot import this file when published).
|
|
12
12
|
//
|
|
13
|
-
// Chosen from live topPaidTools + front-door
|
|
13
|
+
// Chosen from live topPaidTools + front-door choice (search/answer first):
|
|
14
14
|
// search, answer, search-news, render, stock-quote, transcribe, memory-*.
|
|
15
15
|
// Exactly 8 catalog flagships so hosted tools/list stays ~15 with meta tools
|
|
16
16
|
// (Glama's well-scoped band is 3–15).
|
|
@@ -510,7 +510,7 @@ export function mcpInitializeInstructions(baseUrl, { decide = false } = {}) {
|
|
|
510
510
|
const hosted = install.hostedUrl;
|
|
511
511
|
return [
|
|
512
512
|
"Agent402 is a tools and models layer for AI agents (Havok Holdings LLC) - the applied layer of Agentic Finance: deterministic utilities, a metered model gateway and finished reports, paid per request over x402 or MPP, or free via proof-of-work on the pure-CPU tools.",
|
|
513
|
-
"
|
|
513
|
+
"One fact: call web.search or web.answer for live web search and cited answers.",
|
|
514
514
|
"Also listed: web.news, browser.render, market.quote, audio.transcribe, memory.read, memory.write.",
|
|
515
515
|
"Long catalog (500+ tools): call catalog.find with your task, or catalog.search then catalog.call.",
|
|
516
516
|
// Only where the decide tools are listed: an instruction must never name a
|
|
@@ -518,8 +518,8 @@ export function mcpInitializeInstructions(baseUrl, { decide = false } = {}) {
|
|
|
518
518
|
...(decide ? ["A job that needs several tools: call decide.plan with the task for a call-ready plan (tools, order, fallbacks, inputs), then decide.execute to run it; the plan fee comes back as credit toward the run."] : []),
|
|
519
519
|
"Orientation: call server.describe. Payment rails / wallet setup: call payment.info.",
|
|
520
520
|
"Missing a tool: call demand.request. Ecosystem sellers: call sellers.list.",
|
|
521
|
-
`Install (
|
|
522
|
-
`
|
|
521
|
+
`Install (npm + wallet, pays for web.search, web.answer and the rest): ${install.claudeCodeNpm}`,
|
|
522
|
+
`No wallet yet (hosted, proof-of-work tools only): ${install.claudeCodeHosted}`,
|
|
523
523
|
`Cursor mcp.json: { "mcpServers": { "agent402": { "url": "${hosted}" } } }`,
|
|
524
524
|
`Why pay here (usage priced under a quoted ceiling, a failed call is not charged and the receipt proves it, keyed retries never pay twice, one key for tools + models + reports, no wallet needed for the proof-of-work tools or a report by card, proof at /status and /revenue): ${baseUrl}/why`,
|
|
525
525
|
`Docs: ${baseUrl}/llms.txt · ${baseUrl}/api/find?q=… · status ${baseUrl}/status`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent402-mcp",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.8",
|
|
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 on 12 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.",
|
|
12
|
+
"description": "Agent402 MCP server: 500+ pay-per-call tools + skill packs for AI agents over x402 (USDC or USDG on 12 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"
|