Blockchain JSON-RPC on 23 EVM chains for AI agents (MCP server). Free reads, or x402 pay-per-call. npx -y nodeflare-mcp
NodeFlare MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Blockchain JSON-RPC for AI agents on **23 EVM chains** — Ethereum, Base, BNB Chain, Arbitrum, Optimism, Avalanche, HyperEVM, Polygon, and young chains like Robinhood Chain, Plasma, Ink, Zircuit, BOB and Soneium. Served from NodeFlare's own bare-metal nodes across 5 regions.
Quick start
That's it — no API key required for standard reads (block numbers, balances, transactions, eth_call).
Every tool's chain argument accepts a **slug** (eth, base, arb), a **name** (ethereum, arbitrum, bsc), or a **numeric chain ID** (1, 8453) — so agents don't have to know NodeFlare's internal slugs.
Install as a Claude Code plugin
This repo doubles as a Claude Code plugin marketplace. Installing the plugin wires up the MCP server **and** a set of slash-command recipes in one step:
Then use the recipes below (/nodeflare:balance, /nodeflare:token, …). To unlock heavy methods, export NODEFLARE_API_KEY in your shell before starting Claude Code (free key, 2M CU/month).
Recipes
Ready-made slash commands bundled with the plugin:
| Recipe | What it does |
|---|---|
| /nodeflare:chains [filter] | List supported chains, IDs and endpoint URLs |
| /nodeflare:balance [chain] [token…] | Native + ERC-20 balances, one chain or across the majors |
| /nodeflare:token [chain] [holder] | ERC-20 metadata (name/symbol/decimals/supply) + optional holder balance |
| /nodeflare:tx [chain] | Fetch a transaction + receipt and explain what it did |
| /nodeflare:logs [chain] [from] [to] | Fetch and summarise a contract's recent event logs |
| /nodeflare:gas [chain \| compare] | Current gas price on a chain, or a cheapest-first comparison |
Access tiers
The server picks its access tier from the environment:
| Env var | Tier |
|---|---|
| *(none)* | Free public endpoints — standard read methods, rate-limited per IP |
| NODEFLARE_API_KEY | Free/paid key — heavy methods, 2,000,000 compute units/month free (get one) |
| X402_PRIVATE_KEY | **Pay per call with x402** — heavy methods (eth_getLogs, trace_*, debug_*) are paid from this wallet in USDC on Base, Polygon or Arbitrum, ~$0.001/call. No account needed; gas is covered by the facilitator. |
With an x402 wallet, a blocked heavy method is retried automatically as a paid call — the tool result includes "_x402": "settled via x402" when a payment settled on-chain.
> Use a dedicated agent wallet holding a small USDC balance — never your main wallet.
Tools
| Tool | Description |
|---|---|
| list_chains | The 23 supported chains with chain IDs and endpoints |
| get_block_number | Latest block number (decimal + hex) |
| get_balance | Native-token balance — raw wei + human-readable amount in the chain's currency |
| get_transaction_receipt | Transaction receipt by hash |
| eth_call | Read-only contract call |
| get_logs | Contract event logs (heavy — key or x402 wallet) |
| rpc_call | Any JSON-RPC method on any supported chain |
| get_transaction | Transaction by hash (from, to, value, input) |
| get_block | Block by number/tag, optional full transactions |
| get_gas_price | Current gas price + EIP-1559 priority fee |