x402 On-Chain Data MCP Server
Provides tools to query Ethereum blockchain data including wallet profiles, token metrics, protocol TVL, and gas prices.
Click on "Deploy 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 On-Chain Data MCP Server show gas prices"
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 On-Chain Data MCP Server
MCP (Model Context Protocol) server wrapper for the x402 On-Chain Data API. Provides pay-per-call blockchain data including wallet profiles, token metrics, protocol TVL, and gas prices.
Author
0xEtherial
Related MCP server: Onesource MCP
Features
Wallet Profiles - ETH balance, transaction history, top tokens ($0.10/call)
Token Metrics - Price, market cap, volume, liquidity ($0.05/call)
Protocol TVL - Total value locked, chain breakdown ($0.05/call)
Gas Prices - Real-time gas estimates ($0.02/call)
Health Check - API status (free)
Installation
npm installConfiguration
Copy .env.example to .env and configure:
cp .env.example .envEnvironment Variables
Variable | Description | Default |
| x402 On-Chain API base URL |
|
Usage
Start the MCP Server
node server.jsAvailable Tools
1. x402_wallet_score
Get comprehensive wallet profile.
Parameters:
address(string, required): Ethereum wallet address
Example:
{
"name": "x402_wallet_score",
"arguments": {
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD5e"
}
}Returns: ETH balance, transaction count, first/last transaction, top 5 tokens
2. x402_token_metrics
Get token price and market data.
Parameters:
address(string, required): Token contract address
Example:
{
"name": "x402_token_metrics",
"arguments": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
}Returns: Price, market cap, 24h volume, liquidity, FDV
3. x402_protocol_tvl
Get DeFi protocol TVL data.
Parameters:
slug(string, required): Protocol identifier (e.g., "uniswap", "aave")
Example:
{
"name": "x402_protocol_tvl",
"arguments": {
"slug": "uniswap"
}
}Returns: TVL, 24h change, chain breakdown
4. x402_gas_prices
Get current Ethereum gas prices.
Parameters: None
Example:
{
"name": "x402_gas_prices",
"arguments": {}
}Returns: Slow/standard/fast gwei + USD estimates
5. x402_health
Check API health status.
Parameters: None
Example:
{
"name": "x402_health",
"arguments": {}
}Returns: API health status
Integration with AI Clients
Claude Desktop
Open Claude Desktop configuration:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the MCP server to
claude_desktop_config.json:
{
"mcpServers": {
"x402-onchain": {
"command": "node",
"args": ["/absolute/path/to/mcp-wrapper/server.js"],
"env": {
"API_BASE_URL": "https://nominated-safe-pairs-favorites.trycloudflare.com"
}
}
}
}Restart Claude Desktop
The x402 tools will appear in Claude's available tools
Cursor
Open Cursor settings (Cmd+,)
Navigate to "Features" → "Model Context Protocol"
Add new server:
Name: x402-onchain
Command:
node /absolute/path/to/mcp-wrapper/server.jsEnvironment:
API_BASE_URL=https://nominated-safe-pairs-favorites.trycloudflare.com
Restart Cursor
Windsurf
Open Windsurf settings
Go to "AI" → "MCP Servers"
Click "Add Server"
Configure:
Name: x402-onchain
Command:
nodeArgs:
["/absolute/path/to/mcp-wrapper/server.js"]Env:
{"API_BASE_URL": "https://nominated-safe-pairs-favorites.trycloudflare.com"}
Save and restart Windsurf
Pricing
All endpoints use the x402 payment protocol (pay-per-call):
Endpoint | Cost | Description |
| $0.10 | Wallet profile + top tokens |
| $0.05 | Token price + metrics |
| $0.05 | Protocol TVL data |
| $0.02 | Gas price estimates |
| Free | Health check |
Error Handling
The server returns structured error responses:
{
"error": true,
"status": 404,
"message": "Wallet not found"
}Development
Requirements
Node.js >= 18.0.0
npm
Install Dependencies
npm installRun Locally
API_BASE_URL=http://localhost:8900 node server.jsLicense
MIT
Links
Available Tools
5 toolsx402_gas_pricesA
Get current Ethereum gas prices with slow/standard/fast gwei estimates and USD cost estimates. Cost: $0.02 per call via x402 payment protocol.
Inputs: no named parameters.
x402_healthB
Check API health status. Free endpoint - no payment required.
Inputs: no named parameters.
x402_protocol_tvlA
Get DeFi protocol TVL data including total value locked, 24h change, and chain breakdown. Cost: $0.05 per call via x402 payment protocol.
Inputs: slug (required).
x402_token_metricsA
Get token data including price, market cap, 24h volume, liquidity, and FDV. Cost: $0.05 per call via x402 payment protocol.
Inputs: address (required).
x402_wallet_scoreA
Get comprehensive wallet profile including ETH balance, transaction count, first/last transaction timestamps, and top 5 tokens held. Cost: $0.10 per call via x402 payment protocol.
Inputs: address (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct on-chain data category: wallet profile, token metrics, protocol TVL, gas prices, and health status. There is no overlap or ambiguity between the tool purposes.
All tool names follow a consistent `x402_` prefix followed by a descriptive noun phrase in snake_case. The naming pattern is uniform and predictable across the entire set.
The server offers 5 focused tools covering a reasonable breadth of on-chain data. This is well-scoped for its stated purpose and each tool earns its place.
The core on-chain data endpoints are covered (wallet, token, TVL, gas), plus a health check. Minor gaps exist such as block or transaction details, but the primary domain surface is solid.
Maintenance
Related MCP Connectors
Pay-per-call on-chain data for AI agents: token, wallet, risk, whale, NFT, tx. No API keys.
Pay-per-call DeFi and macro intel for AI agents. x402 USDC tools via streamable HTTP /api/mcp.
8 pay-per-call web intel tools over MCP. Free discovery, calls settle in USDC on Base (x402).
Crypto MCP with 21 tools for market data, DeFi, analytics, and sentiment. Post-paid USDC billing.
Related MCP Servers
- AlicenseAqualityBmaintenanceEight crypto and DeFi data tools for AI agents: prices, gas, one ParaSwap route quote, GoPlus token security and top-holder samples, DefiLlama yields, Hyperliquid/dYdX funding, and observed wallet balances. Inspect prices free; pay 0.001–0.008 USDC per call on Base through x402. No API key or subscription.8107 npmMIT
- AlicenseAqualityBmaintenanceMCP server with 43 tools for blockchain data — token lookups, wallet balances, live chain queries across 10+ networks, and full API documentation search.27254 npmApache 2.0
- FlicenseNot gradedqualityCmaintenancePay-per-call MCP server for checking MEV exposure, sandwich attacks, and pool MEV density on EVM chains, with no signup or API key required.-
- FlicenseNot gradedqualityCmaintenanceMCP server for EVM MEV history, offering pay-per-call endpoints to check wallet MEV exposure, sandwich transactions, and pool MEV density on Ethereum, Base, Arbitrum, Optimism, and Polygon.-