mcp-onchain-data
v1.0.0
Published
MCP server providing real-time blockchain data (gas prices, token info, DEX quotes) for AI agents
Maintainers
Readme
mcp-onchain-data
MCP server providing real-time blockchain data for AI agents.
Data Source: OKX DEX API v6 (30+ chains, 1300+ tokens, 500+ DEX sources)
Tools
| Tool | Description |
|---|---|
| get_gas_prices | Real-time gas prices for Ethereum, BSC, Polygon, Arbitrum, Base |
| get_token_info | Token price, market cap, volume, 24h change (OKX + CoinGecko fallback) |
| get_dex_quote | Best DEX swap quote with routing, gas estimate, and price impact |
Quick Start
git clone https://github.com/githname123/mcp-onchain-data.git
cd mcp-onchain-data
npm install
npm run buildConfigure OKX API credentials
Create .env file:
OKX_PROJECT_ID=your_project_id
OKX_API_KEY=your_api_key
OKX_SECRET_KEY=your_secret_key
OKX_API_PASSPHRASE=your_passphraseGet credentials from OKX Developer Portal.
Use with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"onchain-data": {
"command": "node",
"args": ["/path/to/mcp-onchain-data/dist/index.js"],
"env": {
"OKX_PROJECT_ID": "your_project_id",
"OKX_API_KEY": "your_api_key",
"OKX_SECRET_KEY": "your_secret_key",
"OKX_API_PASSPHRASE": "your_passphrase"
}
}
}
}Use with OpenClaw
openclaw mcp add onchain-data -- node /path/to/mcp-onchain-data/dist/index.jsSupported Chains (30+)
Ethereum, BSC, Polygon, Arbitrum, Base, Avalanche, Optimism, zkSync, X Layer, Solana, and more.
Examples
Gas Prices
> get_gas_prices(chains: ["ethereum", "bsc"])
ETH: 0.06 Gwei | BSC: 0.05 GweiToken Info
> get_token_info(tokenAddress: "0xdAC17F958D2ee523a2206206994597C13D831ec7")
USDT: $1.00 | Market Cap: $184BDEX Quote
> get_dex_quote(fromToken: "0xEeee...EEeE", toToken: "0xdAC1...1ec7", amount: "1000000000000000000")
1 ETH = 2187.53 USDT | 13 routes | Gas: 2893014License
MIT
