Spraay x402 MCP Server
The Spraay x402 MCP Server provides 183 pay-per-call tools for AI agents, settled in USDC on Base via the x402 protocol — no API keys required. Key capabilities include:
💸 Payments & Payroll
Execute batch payments to up to 200 recipients in a single Base transaction
Run stablecoin payroll for up to 200 employees; estimate gas before executing
🔄 DeFi & Swaps
Get quotes and execute token swaps via Uniswap V3 on Base
Get cross-chain bridge quotes via LI.FI (Base, Ethereum, Arbitrum, Polygon, etc.)
Fetch real-time oracle prices, gas prices, and stablecoin FX rates
Check wallet balances (ETH + ERC-20) and resolve ENS/Basenames
📄 Invoicing & Escrow
Create, list, and manage crypto-native invoices
Create milestone-based escrow contracts; fund, release, and cancel them
🤖 AI & Compute
Chat with 200+ LLMs (GPT-4o, Claude, Llama, Gemini, Mistral, etc.)
Run GPU inference via Replicate (image, video, audio, LLMs)
Access Bittensor decentralized inference and embeddings
AI-powered wallet/transaction classification with risk scoring and smart contract explanations
🔍 Research & Search
Web search with LLM-ready extracted content (Tavily)
URL content extraction for RAG pipelines; question answering with cited sources
Search 250M+ academic papers (OpenAlex, arXiv, PubMed, Crossref, PubChem)
🔔 Communication & Webhooks
Send email, SMS, and encrypted XMTP messages
Register, test, list, and delete webhooks for real-time event notifications
🏗️ Infrastructure
Multi-chain JSON-RPC calls (EVM + Solana)
Pin and retrieve content from IPFS/Arweave
Create and manage cron jobs for recurring actions; ingest and query structured logs
🛡️ Identity & Compliance
Initiate KYC/KYB verification; create and verify authenticated sessions
Record immutable audit trails; calculate crypto tax gains/losses (FIFO/IRS 8949)
🤝 Agent Wallets, Supply Chain & Robotics
Provision agent wallets, add/revoke session keys, predict addresses
Register suppliers, create purchase orders, and settle invoices (SCTP)
Register robots, dispatch escrow-backed tasks, and track completion (RTP)
🆓 Free Utilities (no payment required)
Gas prices, token spot prices, chain status, address validation, ENS resolution, unit conversion, UUID generation, and x402 protocol discovery probes
Enables multi-chain JSON-RPC calls via the Alchemy platform to interact with various blockchain networks.
Supports decentralized storage by allowing users to pin and retrieve content on the InterPlanetary File System (IPFS) via Pinata.
Provides persistent storage for DeFi infrastructure data, including invoices, escrow milestones, audit trails, and webhook registrations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Spraay x402 MCP ServerWhat is the USDC balance of vitalik.eth?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
💧 Spraay x402 MCP Server
Full-stack DeFi infrastructure for AI agents — 183 pay-per-call tools, backed by the 192-endpoint Spraay x402 Gateway on Base, with Solana, Ethereum, XRP, and Stellar payment rails.
Connect Claude, Cursor, or any MCP client to onchain payments, batch payouts, swaps, bridging, payroll, invoicing, escrow, oracle data, analytics, 200+ AI models, GPU/compute, research APIs, search/RAG, and more. Agents pay USDC per request via the x402 protocol — no API keys, no accounts.
The tool list is generated from the live gateway manifest at build time (
npm run sync), so the authoritative catalog and pricing always live at the gateway — see Tool catalog. 24 of the gateway's endpoints are free (no payment required).
Quick Start
Install and go — no config, no API keys, no env vars. On first run the
server auto-creates a wallet, saves it to ~/.spraay/.session, and prints the
address to stderr. Fund that address with USDC on Base and start calling tools.
Read Security & Wallet Safety — these tools move real funds.
One-line install (Claude Code)
claude mcp add spraay -s user -- npx -y spraay-x402-mcpManual config (Cursor / Claude Desktop)
Cursor (.cursor/mcp.json) or Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"spraay": {
"command": "npx",
"args": ["-y", "spraay-x402-mcp"]
}
}
}That's it. The first run prints something like:
💧 Spraay created a new wallet: 0xABC…123
Private key saved to ~/.spraay/.session (keep it safe — it controls funds).
Fund this address with USDC on Base to start paying for tool calls.Optional — bring your own wallet
To sign with a key you already control instead of the auto-created one, set
EVM_PRIVATE_KEY in your environment (it overrides the session wallet).
Never paste a raw key into a committed config file — use a dedicated hot
wallet funded only with what the agent may spend. See
Security & Wallet Safety.
Remote URL (no wallet on your machine)
Settlement is handled gateway-side; your client never holds a signing key.
{
"mcpServers": {
"spraay": {
"url": "https://spraay-x402-mcp--plagtech.run.tools"
}
}
}Smithery
smithery mcp add Plagtech/Spraay-x402-mcpFrom source
git clone https://github.com/plagtech/spraay-x402-mcp
cd spraay-x402-mcp
npm install
npm run build
npm start # auto-creates a wallet on first runRelated MCP server: hyperd-mcp
Tool catalog
183 tools spanning the gateway's 33 categories. Highlights by area:
Area | What it covers |
AI & Inference | 200+ LLMs (OpenAI-compatible), wallet/tx classification, contract explanation, summaries |
Compute | Text / image / video / TTS / STT / embeddings across Replicate, Chutes, OpenRouter; batch jobs |
Compute Futures | Prepaid compute credits with tier discounts; draw down per inference |
Bittensor | Decentralized inference, image gen, and embeddings via SN64 / SN19 |
Payments | Batch payouts up to 200 recipients (Base, XRP Ledger, Stellar); estimates |
Payroll | Stablecoin payroll runs across Base, Ethereum, Solana |
Invoicing & Escrow | Crypto-native invoices and milestone escrow (persistent) |
DeFi & Data | Swaps (Uniswap V3 / Aerodrome), oracle prices/gas/FX, bridge quotes, balances, ENS/Basename |
Analytics | Wallet profiles and decoded transaction history |
Research | 250M+ papers (OpenAlex), arXiv, Crossref, PubMed, PubChem, US Census, dictionary |
Search & RAG | Web search, content extraction, question answering |
Communication | Email, SMS, XMTP messaging, webhooks |
Infrastructure | Multi-chain RPC, IPFS/Arweave storage, cron scheduling, structured logs |
Identity & Compliance | KYC/sanctions screening, auth sessions, audit trail, crypto tax (FIFO, IRS 8949) |
Supply Chain (SCTP) | Supplier registration, purchase orders, invoice verification, settlement |
Robotics (RTP) | Register robots, dispatch paid tasks, escrow-backed completion |
Trust & Safety | ProofLayer trust scores; free token-safety, address-safety, and tx-decode checks |
24 free endpoints require no payment — gas/prices/chain-status, address & batch validation, ENS resolution, unit conversion, x402 discovery probes, and model/compute discovery.
For the exact, current tool list and per-tool pricing, query the live manifest:
curl https://gateway.spraay.app/.well-known/x402.jsonPricing ranges from $0.001 (reads) to ~$0.10 (payroll, escrow release, tax), settled in USDC on Base.
How it works
An agent calls a tool (e.g.
spraay_batch_execute).The MCP server hits the Spraay x402 Gateway.
The gateway responds
402 Payment Requiredwith a USDC amount.Remote mode: settlement is handled gateway-side. Local mode:
@x402/axiossigns a USDC micropayment from the auto-created (or overridden) wallet.The gateway validates payment and returns the data.
Security & Wallet Safety
These tools can initiate real USDC payments. Treat the server like any tool with funds access.
The auto-created wallet only holds what you send it. Fund it with only as much USDC as you're willing to let the agent spend. It starts empty, so a fresh install cannot move funds until you fund it; read-only tools work regardless.
The session key lives at
~/.spraay/.session. Protect that file like any secret — anyone who reads it controls the wallet. It's written with0600permissions on POSIX systems. Back it up if the funds matter; delete it to rotate to a new wallet on the next run.Prefer the remote URL if you'd rather keep no signing key on your machine — settlement is handled gateway-side.
If you bring your own key via
EVM_PRIVATE_KEY, use a dedicated hot wallet that controls no other assets, and never put a raw private key in a config file, issue, or any committed file — keep it in your shell environment only.
The published npm package ships only dist/, README, and LICENSE (verify
with npm pack --dry-run) — no binaries, no build tooling, no install scripts.
Report security issues to security@spraay.app, not a public issue.
Requirements
Node.js 20+
MCP client — Claude Desktop, Cursor, or any MCP-compatible client
USDC on Base — fund the auto-created wallet (or your own); even $1 covers thousands of calls
Environment variables
None are required — the server runs with zero configuration. All of the following are optional overrides.
Variable | Required | Default | Description |
| No | auto-created at | Override the auto-created wallet with your own key. Use a dedicated, funded-as-needed hot wallet. |
| No |
| Override the gateway URL. |
Links
MCP server: mcp.spraay.app
Gateway: gateway.spraay.app
Manifest: gateway.spraay.app/.well-known/x402.json
x402: x402.org
License
MIT
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/plagtech/spraay-x402-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server