x402 MCP Server
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., "@x402 MCP Serverwhat's the current price of Bitcoin?"
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.
x402 MCP Server
An MCP (Model Context Protocol) server that exposes x402 DeFi data endpoints as tools for AI agents.
What is MCP?
MCP is an open standard that lets AI applications (Claude, Cursor, OpenClaw, etc.) discover and use tools through a unified protocol. Think of it as a USB-C port for AI — any compliant client can plug into any compliant server.
This server wraps the x402 API (pay-per-call DeFi data) so that any MCP-compatible AI agent can:
Discover available data endpoints
Call them with proper parameters
Get structured results back
Related MCP server: defi-yields-mcp
Tools
Tool | Description |
| Current prices, 24h changes, top movers |
| Token holder concentration & whale risk (param: |
| Perp funding rates across exchanges + arb opportunities |
| Discover all available x402 API endpoints |
Prerequisites
The x402 API server must be running at
localhost:4020(or setX402_API_URL)Node.js 18+
Setup
cd x402-mcp-server
npm installConnect to Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"x402-defi": {
"command": "node",
"args": ["/absolute/path/to/x402-mcp-server/src/index.js"],
"env": {
"X402_API_URL": "http://localhost:4020"
}
}
}
}Connect to Cursor
Add to .cursor/mcp.json in your project (or global settings):
{
"mcpServers": {
"x402-defi": {
"command": "node",
"args": ["/absolute/path/to/x402-mcp-server/src/index.js"]
}
}
}Connect to OpenClaw
openclaw mcp add x402-defi -- node /absolute/path/to/x402-mcp-server/src/index.jsTest Locally
# Start the x402 API server first
cd ../x402-api-server && npm start &
# Test MCP server with the MCP inspector
npx @modelcontextprotocol/inspector node src/index.js
# Or pipe JSON-RPC manually:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node src/index.jsArchitecture
AI Agent (Claude/Cursor/OpenClaw)
↕ MCP (stdio, JSON-RPC)
x402 MCP Server (this)
↕ HTTP
x402 API Server (localhost:4020)
↕ x402 protocol (HTTP 402 + USDC)
DeFi Data SourcesLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceAn MCP server that delivers cryptocurrency sentiment analysis to AI agents.Last updated548MIT
- AlicenseAqualityDmaintenanceAn MCP server for AI agents to explore DeFi yield opportunities, powered by DefiLlama.Last updated115MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides AI agents with real-time access to DEX liquidity pool data, enabling smarter trading, analytics, and automated strategies.Last updated101MIT
- -license-quality-maintenanceAn MCP server that gives AI agents real-time Solana DeFi intelligence — smart money tracking, rug detection, wallet analysis, and token research.Last updated
Related MCP Connectors
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
HiveCapital MCP Server — autonomous investment layer for AI agents
Crypto market data for AI agents via x402. 16 tools: prices, funding, DeFi yields, arbitrage, TA.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/fernsugi/x402-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server