
nodetrail
io.github.nodetrailio/nodetrail
Pay-per-call on-chain token and wallet facts for agents. x402 USDC scans on 62 chains.
Documentation
Nodetrail MCP server
Open source. Scanned by GitHub CodeQL, Dependabot and secret scanning.
A public Model Context Protocol (MCP) server that wraps the live Nodetrail x402 pay-per-scan API, so an AI agent can run a Nodetrail read as one tool call and pay per call with its own x402 client.
- Live endpoint:
POST https://nodetrail.io/mcp(Streamable HTTP, protocol version 2025-03-26) - Upstream: the live API at
https://nodetrail.io - Runtime: Node.js >= 18, plain
node:http, zero dependencies - Contact: support@nodetrail.io
Design: keyless, no funds
This server holds no keys and no funds and never signs or pays anything.
- The agent calls a tool without a
paymentSignature. The server forwards the request to the live API, which answers HTTP 402. - The server returns that 402 quote as the tool result: the price, every
payment rail in
accepts, the PAYMENT-REQUIRED header value, and the retry steps. - The agent's own x402 client pays one rail from the agent's own wallet.
- The agent calls the same tool again with the same arguments plus
paymentSignatureset to the base64 PAYMENT-SIGNATURE value. The server passes that header through to the API verbatim and returns the scan.
The payer is only charged if the scan is delivered. A paid request repeated
with the same payment within 24 hours returns the same result with no second
charge (the API answers with Idempotent-Replay: true).
Tools
| Tool | Upstream route | Price |
|---|---|---|
nodetrail_info | GET /api/x402/v1/info | Free |
nodetrail_scan_token | GET /api/x402/v1/scan/token | $0.01 |
nodetrail_scan_wallet | GET /api/x402/v1/scan/wallet | $0.02 |
nodetrail_scan_dev | GET /api/x402/v1/scan/dev | $0.03 |
nodetrail_scan_trio | GET /api/x402/v1/scan/trio | $0.05 |
nodetrail_launch_block | GET /api/x402/v1/launch-block | $0.02 |
nodetrail_fee_trail | GET /api/x402/v1/fee-trail | $0.05 |
Payment rails quoted by the API (the payer picks one): USDC on Base (eip155:8453), Solana, Polygon (eip155:137), Arbitrum One (eip155:42161), Arc (eip155:5042) and NEAR (near:mainnet), and USD1 on BNB Chain (eip155:56). Exact amounts and pay-to addresses are read from each 402 quote; they are not repeated here.
Scan output is facts read from public chain data, plus a Low, Elevated or High risk signal and a list of what was not checked. It is information only, not financial advice.
Run it locally
node server.mjs # listens on PORT (default 3000)
Smoke test:
curl -s http://localhost:3000/mcp -X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Tests
node --test
The tests start the server on an ephemeral port with the upstream pointed
at a local stub (the same override the NODETRAIL_API_BASE environment
variable provides) and cover: the initialize handshake, tools/list
returning all 7 tools, the free info tool proxying, a paid tool surfacing
the 402 quote when unpaid, and a paid tool forwarding the PAYMENT-SIGNATURE
header when paymentSignature is given.
Configuration
| Variable | Default | Meaning |
|---|---|---|
PORT | 3000 | Listen port when run as a plain server. |
NODETRAIL_API_BASE | https://nodetrail.io | Upstream API base. Tests only — leave unset in production so the server talks to the live mainnet API. |
The hosted server at https://nodetrail.io/mcp is already deployed. This
repository is the public, keyless source for that endpoint.
Registry file
server.json is the Official MCP Registry entry (name
io.github.nodetrailio/nodetrail, remote https://nodetrail.io/mcp,
streamable-http transport).
No installation packages available.