MCP server for Rail402. Browse, discover, and call paid APIs from Claude, Cursor, and Base MCP — payments handled autonomously via x402 on Base.
rail402-mcp is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on x402, LLM / MCP, Agent, Blockchain. It currently has 9 GitHub stars and 0 forks, and sits alongside related tools like x402-payments-mcp, AgenticDeFi-Trainer, AgenticDeFi-Trainer, AgenticDeFi-Trainer, AgenticDeFi-Trainer, AgenticDeFi-Trainer.
An MCP server that gives Claude, Cursor, and any MCP-compatible LLM direct access to the Rail402 marketplace — browse paid APIs, read their schemas, and pay for and call them with USDC on Base, all from inside the model.
| Tool | What it does |
|---|---|
list_services |
Browse the marketplace by category or free-text query. |
get_service_details |
Get a service's input/output JSON Schema, price, method, and examples. |
call_service |
Execute a paid call — settles the x402 USDC payment, returns the response. |
check_payment_status |
Verify a USDC payment transaction on Base by its hash. |
call_service requires a funded agent wallet (RAIL402_PRIVATE_KEY). The other
three tools work read-only with no wallet.
npx -y @rail402/mcp # runs the stdio MCP server
Configure via environment variables:
| Variable | Default | Purpose |
|---|---|---|
RAIL402_API_BASE |
https://rail402.app |
Marketplace API base URL. |
RAIL402_NETWORK |
base |
base or base-sepolia. |
RAIL402_PRIVATE_KEY |
(unset) | Agent wallet key; enables call_service. |
RAIL402_RPC_URL |
public Base RPC | Optional RPC override. |
Edit your claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json,
Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"rail402": {
"command": "npx",
"args": ["-y", "@rail402/mcp"],
"env": {
"RAIL402_NETWORK": "base",
"RAIL402_PRIVATE_KEY": "0xYourAgentWalletKey"
}
}
}
}
Restart Claude Desktop. Ask: "List Rail402 security APIs and call the wallet risk scorer for 0x…".
Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"rail402": {
"command": "npx",
"args": ["-y", "@rail402/mcp"],
"env": { "RAIL402_NETWORK": "base" }
}
}
}
This server ships a Base MCP–compatible skill manifest at
skill/skill.json. Register it alongside
Base MCP so an agent can use Base's wallet
and chain tools and Rail402's marketplace together:
{
"mcpServers": {
"base": { "command": "npx", "args": ["-y", "@base-org/base-mcp"] },
"rail402": { "command": "npx", "args": ["-y", "@rail402/mcp"], "env": { "RAIL402_NETWORK": "base" } }
}
}
A ready-to-edit config is included at mcp-config.json.
You: Find an analytics API for Base tokens and tell me what it costs.
Claude: (list_services category=Analytics) → "Token Analytics", 0.05 USDC on base.
(get_service_details token-analytics) → input: { address }, output: {...}
You: Run it for 0x1bc0c42215582d5a085795f4badbac3ff36d1bcb.
Claude: (call_service token-analytics {address}) → pays 0.05 USDC, returns holder stats.
RAIL402_PRIVATE_KEY in a wallet funded with only what you're willing
to let an agent spend. Treat it like a hot wallet.call_service returns a clear error).npm install
npm run dev # tsx src/index.ts
npm run typecheck
npm run build # → dist/index.js
MIT © Rail402
Give AI agents a wallet — x402 payment tools over Model Context Protocol.
Autonomous AI Agent Swarm framework with x402 self-executing wallets. Empowers LLM-driven agents to trade, bridge, and manage crypto treasuries without human intervention. The ultimate Agentic DeFi toolkit for 2026.
Autonomous AI Agent Swarm framework with x402 self-executing wallets. Empowers LLM-driven agents to trade, bridge, and manage crypto treasuries without human intervention. The ultimate Agentic DeFi toolkit for 2026.
Autonomous AI Agent Swarm framework with x402 self-executing wallets. Empowers LLM-driven agents to trade, bridge, and manage crypto treasuries without human intervention. The ultimate Agentic DeFi toolkit for 2026.
Autonomous AI Agent Swarm framework with x402 self-executing wallets. Empowers LLM-driven agents to trade, bridge, and manage crypto treasuries without human intervention. The ultimate Agentic DeFi toolkit for 2026.
Autonomous AI Agent Swarm framework with x402 self-executing wallets. Empowers LLM-driven agents to trade, bridge, and manage crypto treasuries without human intervention. The ultimate Agentic DeFi toolkit for 2026.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
Daydreams is a set of tools for building agents for commerce
Live data for AI agents — search, research, markets, crypto, X/Twitter. Pay-per-call via x402 micropayments.