defillama-mcp
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., "@defillama-mcp what are the top 5 chains by TVL?"
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.
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."
Related MCP server: mcp-server-defillama
Tools
Tool | What it does |
| TVL across all blockchains, ranked |
| Search protocols by name / symbol / category, ranked by TVL |
| TVL, 1d/7d change, chains, category for one protocol |
| Current USD price for one or more tokens (DefiLlama coin ids) |
| Top yield pools by APY, filter by chain / project / min TVL |
| 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:ethereumBy 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.
Available Tools
6 toolsget_chains_tvlA
Total Value Locked (TVL) across all blockchains, ranked highest first. Shows which chains hold the most DeFi capital.
Inputs: limit.
get_protocolA
Get current TVL, 1d/7d change, chains, and category for a single DeFi protocol by name (e.g. 'Aave', 'Uniswap', 'Lido').
Inputs: name (required).
get_stablecoinsA
Largest stablecoins by circulating supply, with peg type (fiat-backed, crypto-backed, algorithmic).
Inputs: limit.
get_token_pricesA
Current USD price for one or more tokens. Use DefiLlama coin ids, comma-separated: 'coingecko:bitcoin,coingecko:ethereum' or 'chain:0xcontract' (e.g. 'ethereum:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2').
Inputs: tokens (required).
get_yield_poolsA
Top DeFi yield / farming pools by APY. Optionally filter by chain (e.g. 'Ethereum'), project (e.g. 'aave'), and minimum TVL in USD to avoid tiny risky pools.
Inputs: chain, limit, project, minTvlUsd.
search_protocolsA
Search DeFi protocols by name, token symbol, or category (e.g. 'lending', 'dexes', 'aave'), ranked by TVL. Leave query empty for the top protocols overall.
Inputs: limit, query.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct data type: chain TVL, protocol search, protocol details, token prices, yield pools, and stablecoins. There is no meaningful overlap between them; even search_protocols and get_protocol are clearly separated as discovery vs. detail lookup.
All tools use the verb_noun pattern with lowercase and underscores: get_chains_tvl, get_protocol, get_token_prices, get_yield_pools, get_stablecoins, and search_protocols. The naming is uniform and predictable.
With 6 tools, the server is well-scoped and covers the primary DeFi data categories without being bloated or sparse. Each tool earns its place as a core query type for the DefiLlama domain.
The server covers the main data surfaces of DefiLlama: chain TVL, protocol info, token prices, yields, and stablecoins. Minor gaps exist, such as lack of historical data or single-chain TVL endpoints, but the current scope covers common use cases well.
Maintenance
Related MCP Connectors
DefiLlama MCP — DeFi analytics from DefiLlama (free, no auth)
Enable AI assistants to interact seamlessly with the DefiLlama API by translating MCP tool calls i…
DefiLlama MCP — TVL, yields, volumes, fees, and protocol analytics for DeFi.
DeFi TVL, stablecoin supply, perp funding, top coins and prediction-market data as agent tools.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceReal-time DeFi data for AI agents. Provides yields, TVL, prices, DEX volumes, fees, and contract data via 8 MCP endpoints, powered by DeFiLlama.-
- AlicenseBqualityDmaintenanceEnables Claude to access DeFi data via DefiLlama API, including protocol TVL, chain TVL, token prices, and stablecoin information.79MIT
- AlicenseAqualityFmaintenanceProvides access to DeFi Llama's free API for querying protocol TVL, chain TVL, yields, stablecoins, bridges, DEX volumes, and fees through natural language.817 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents to interact with DefiLlama's DeFi data aggregator, providing access to TVL, DEX volumes, protocol statistics, and more via the Model Context Protocol.239 npm3ISC