DeFi MCP
MCP server for DeFi data — real-time crypto prices, token analytics, wallet balances, and on-chain data across multiple chains.
defi-mcp
MCP server for DeFi & crypto — 12 tools for token prices, wallet balances, gas fees, and DEX quotes.
Give any MCP-compatible AI (Claude, Cursor, Windsurf, Claude Code) direct access to live on-chain data. No API key required.
Tutorial: How to set up with Claude & Cursor · REST API docs
Try it now (no setup)
The server is also hosted as a free REST API. Try these right now:
# Bitcoin & Ethereum prices
curl "http://defi-mcp.your-server.example.com/api/prices?ids=bitcoin,ethereum"
# Ethereum gas prices (EIP-1559)
curl "http://defi-mcp.your-server.example.com/api/gas"
# Wallet balance across 6 EVM chains
curl "http://defi-mcp.your-server.example.com/api/balance/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/multi"
# Top 10 tokens by market cap
curl "http://defi-mcp.your-server.example.com/api/top?limit=10"
# Solana DEX quote: 1 SOL → USDC via Jupiter
curl "http://defi-mcp.your-server.example.com/api/quote/solana?input_mint=So11111111111111111111111111111111111111112&output_mint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=1000000000"
100 free requests/day, no API key needed.
Tools
| Tool | Description | Data Source |
|---|---|---|
get_token_price | Price, 24h change %, market cap for 1+ tokens | CoinGecko |
search_tokens | Search by name/symbol → CoinGecko IDs | CoinGecko |
get_token_info | Full metadata: contract addresses, ATH, supply, links | CoinGecko |
get_top_tokens | Top N tokens by market cap | CoinGecko |
get_eth_balance | Native ETH balance for any wallet | Public RPC |
get_token_balance | ERC-20 balance for wallet + contract pair | Etherscan / RPC |
get_wallet_holdings | All tokens a wallet has interacted with | Etherscan |
get_multichain_balance | Native balance across 6 EVM chains at once | Public RPCs |
get_eth_gas | Base fee + EIP-1559 priority fee suggestions | Public RPC |
get_multichain_gas | Gas prices on 6 chains simultaneously | Public RPCs |
get_dex_quote_eth | Best swap quote via 1inch (any EVM chain) | 1inch API |
get_dex_quote_sol | Best swap quote via Jupiter (Solana) | Jupiter API |
Supported chains: Ethereum, BSC, Polygon, Arbitrum, Optimism, Base + Solana (DEX)
Setup: Claude Desktop
git clone https://github.com/OzorOwn/defi-mcp
cd defi-mcp
npm install
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"defi-mcp": {
"command": "node",
"args": ["/absolute/path/to/defi-mcp/src/index.js"]
}
}
}
Restart Claude Desktop. You'll see the hammer icon indicating MCP tools are available.
Setup: Cursor
Add to your project's .cursor/mcp.json:
{
"mcpServers": {
"defi-mcp": {
"command": "node",
"args": ["/absolute/path/to/defi-mcp/src/index.js"]
}
}
}
Or: Cursor Settings → Features → MCP Servers → Add new → stdio → node /path/to/defi-mcp/src/index.js
Setup: Claude Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"defi-mcp": {
"command": "node",
"args": ["/absolute/path/to/defi-mcp/src/index.js"]
}
}
}
Works with any MCP host — Windsurf, Continue.dev, Cline, or any stdio-based MCP client.
Example Prompts
Once connected, ask your AI naturally:
"What's the current price of ETH and BTC?"
→ calls get_token_price(["ethereum", "bitcoin"])
"How much ETH does vitalik.eth hold?"
→ calls get_eth_balance("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
"Compare gas prices across all supported chains"
→ calls get_multichain_gas()
"How much USDC would I get for 1 SOL on Jupiter?"
→ calls get_dex_quote_sol("So11...", "EPjF...", 1000000000)
"Show me the top 20 tokens by market cap"
→ calls get_top_tokens(20)
"What tokens has this wallet interacted with? 0xABC..."
→ calls get_wallet_holdings("0xABC...")
REST API
All 12 tools are also available as a REST API at http://defi-mcp.your-server.example.com.
| Endpoint | Tool |
|---|---|
GET /api/prices?ids=bitcoin,ethereum&vs=usd | get_token_price |
GET /api/search/:query | search_tokens |
GET /api/token/:id | get_token_info |
GET /api/top?limit=20 | get_top_tokens |
GET /api/balance/:address | get_eth_balance |
GET /api/balance/:address/token/:token | get_token_balance |
GET /api/holdings/:address | get_wallet_holdings |
GET /api/balance/:address/multi | get_multichain_balance |
GET /api/gas | get_eth_gas |
GET /api/gas/all | get_multichain_gas |
GET /api/quote/evm?chain_id=1&from=...&to=...&amount=... | get_dex_quote_eth |
GET /api/quote/solana?input_mint=...&output_mint=...&amount=... | get_dex_quote_sol |
POST /api/call | Universal tool invocation: {"tool": "...", "args": {...}} |
Free tier: 100 requests/day per IP, no key required.
API key (higher limits): POST /api/keys/create → get a key with 200 free credits. See the Getting Started guide.
Environment Variables
| Variable | Required | Description |
|---|---|---|
COINGECKO_API_KEY | No | Pro key for higher rate limits |
ETHERSCAN_API_KEY | No | Needed for get_wallet_holdings; balance falls back to RPC |
ONEINCH_API_KEY | No | Required for get_dex_quote_eth (free at portal.1inch.dev) |
ETH_RPC_URL | No | Override default public Ethereum RPC |
BSC_RPC_URL | No | Override default public BSC RPC |
All tools work without API keys using public endpoints (rate limits apply).
Architecture
src/
├── index.js — MCP stdio server (12 tools via @modelcontextprotocol/sdk)
├── http.js — Fastify REST API (same tools, production server)
├── tools/
│ ├── prices.js — CoinGecko: prices, search, metadata, rankings
│ ├── gas.js — EVM RPC: gas prices, multi-chain
│ ├── wallets.js — EVM RPC + Etherscan: balances, holdings
│ └── dex.js — 1inch (EVM) + Jupiter (Solana): swap quotes
└── utils/
└── http.js — fetch wrapper with retry + exponential backoff
Part of Agent Gateway
This MCP server is one of 39 services available through Agent Gateway — a unified API for AI agent infrastructure including wallet management, code execution, memory storage, scheduling, image processing, and more.
- Full API Catalog — Browse all 39 services
- Getting Started Guide — Create an API key and start building
- Tutorial: DeFi MCP Server Setup — Step-by-step guide with examples
- Tutorial: AI Agent + Crypto Wallet — Build an autonomous portfolio agent
License
MIT
İlgili Sunucular
tip.md x402 + CDP
An MCP server for the tip.md platform that enables AI agents to facilitate crypto tipping using x402 payment collection and CDP automatic disbursement.
Decompose
Decompose text into classified semantic units — authority, risk, attention, entities. No LLM. Deterministic.
IcoGenie MCP
MCP server for AI-powered SVG icon generation. Generate production-ready icons from text descriptions. Supports single icons, bundles, style customization, and regeneration.
Bible Study
Study the Bible in its original languages, trace themes across both testaments, and compare five translations — all in one conversation. Ask any question about what Scripture says and get grounded, cited answers: What does the Bible say about suffering? Topical search surfaces Job as the Bible's principal witness on suffering (with explanations of why it matters and suggested starting passages), Psalms on lament, Romans on justification — whole books and narratives alongside individual verses. What is the Hebrew word behind lovingkindness in Psalm 23? Compare how KJV and WEB translate John 3:16. Trace the word grace through Paul's letters. Covers 155,510 verses across KJV, WEB, ASV, YLT, and Darby with 606,140 cross-references, 17,543 Strong's entries, BDB and Thayer lexicon definitions, and Nave's 5,319 topical categories.
Horus Flow MCP
Institutional-grade orderflow intelligence for AI agents. Detects spoofing, buy-absorption, and liquidity events with a 15-30s lead time over price action. Audited by Manus AI (0.85 confidence)
suprsonic-mcp
One API key, dozens of capabilities for your AI agent. Zero provider auth.
Suppr-MCP (超能文献)
Suppr - AI-powered document translation and academic search service. Supports high-quality translation of PDF, DOCX, PPTX and other formats in 11 languages with optimized mathematical formula handling. Includes PubMed-integrated intelligent literature search for researchers. https://suppr.wilddata.cn/
KnowMint MCP Server
AI agent knowledge marketplace MCP server. Agents autonomously discover, purchase (x402/Solana), and retrieve human experiential knowledge.
Time MCP Server
Provides current time and timezone conversion capabilities using IANA timezone names, with automatic system timezone detection.
Sitecore MCP server
MCP server for work with Sitecore