defillama-mcp
Enables querying live DeFi data from DefiLlama, including chain and protocol TVL, token prices, yield pools, and stablecoin supply, through MCP tools.
README
DefiLlama MCP
An MCP server that gives Claude, Cursor, and any MCP-compatible agent live DeFi data from DefiLlama — chain and protocol TVL, token prices, yield/farming pools, and stablecoin supply.
No API key. No signup. The public DefiLlama API is free.
Most "MCP for X" repos are half-finished and break on the second request. This one ships with tests and graceful error handling so an agent can actually rely on it.
What your agent can do
Ask things like:
- "Which chains have the most TVL right now?"
- "What's Aave's TVL and how did it move this week?"
- "Find the highest-APY stablecoin pools on Ethereum with at least $10M TVL."
- "Price of BTC and ETH?" (
coingecko:bitcoin,coingecko:ethereum) - "List the biggest stablecoins by circulating supply."
Tools
| Tool | What it does |
|---|---|
get_chains_tvl |
TVL across all blockchains, ranked |
search_protocols |
Search protocols by name / symbol / category, ranked by TVL |
get_protocol |
TVL, 1d/7d change, chains, category for one protocol |
get_token_prices |
Current USD price for one or more tokens (DefiLlama coin ids) |
get_yield_pools |
Top yield pools by APY, filter by chain / project / min TVL |
get_stablecoins |
Largest stablecoins by circulating supply + peg type |
Install
No install needed. It runs straight from npm via npx.
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"defillama": {
"command": "npx",
"args": ["-y", "defillama-mcp"]
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"defillama": {
"command": "npx",
"args": ["-y", "defillama-mcp"]
}
}
}
Restart the client and the defillama tools appear.
Coin ids for prices
get_token_prices uses DefiLlama coin ids, comma-separated:
- By CoinGecko id:
coingecko:bitcoin,coingecko:ethereum - By contract:
chain:0xcontract, e.g.ethereum:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2(WETH)
Develop
npm install
npm run dev # run from TypeScript source over stdio
npm test # run the unit tests
npm run build # compile to dist/
License
MIT — see LICENSE.
Hire me
I build custom MCP servers and AI systems (multi-agent, RAG, automation). Need a connector for your own API, or a full AI integration?
- Hire me on Upwork: https://www.upwork.com/freelancers/~01946645ed245c263d
- Or open an issue on this repo.
Built by Gleb.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.