
Defillama Mcp Server
io.github.friendlygeorge由 GitHub 账号 friendlygeorge 发布v1.0.0更新于 Oct 24, 2026
MCP server for DeFi Llama — free DeFi TVL, yields, stablecoins, bridges, DEX, and fee data for AI...
概览
本地 MCP 服务器,让助手以只读方式访问 DeFi Llama 的免费公开数据:协议 TVL、收益率、稳定币、跨链桥、DEX 交易量和费用
- 可以做什么
- 搜索协议,并按协议或链读取 TVL 明细,包括链上分布和历史。按链、项目、最低 TVL 和资产类型筛选收益率与 APY 池。读取稳定币市值与排名、跨链桥 TVL 与交易量、DEX 交易量以及协议费用与收入数据。结果以 Markdown 形式返回,便于在对话中阅读。
- 适用场景
- 适合在对话中做 DeFi 研究:比较各链上的协议 TVL、筛选收益池、跟踪稳定币流动性、监控跨链桥,或比较协议费用收入,无需打开各类看板。
- 运行要求
- 通过 stdio 在本地运行,通常用 npx 从 npm 包 defillama-mcp-server 启动。需要 Node.js 18+,并能访问 DeFi Llama 的公开 API 端点。无需 API 密钥或账户。
安装
在 SourceWeft 中
- 打开 控制台中的 Defillama Mcp Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
DeFi Llama MCP Server
An MCP server for DeFi Llama — connect any MCP-compatible client to free DeFi protocol data.
[npm version] [npm downloads] [License: MIT] [MCP Compatible] [TypeScript] [Claude Desktop] [Cursor]
What is this?
An MCP (Model Context Protocol) server that gives AI assistants and agents access to DeFi Llama's free DeFi data API — protocol TVL, chain TVL, yield pools, stablecoins, cross-chain bridges, DEX volumes, and protocol fees — through natural language.
Use it with Claude Desktop, Cursor, Windsurf, Cline, Continue, or any MCP-compatible client to ask questions about DeFi protocols, track TVL movements, compare yields, and explore the on-chain economy.
Why use this?
- No API key required — DeFi Llama is a free public API
- 8 built-in tools — covers the most common DeFi data queries
- Clean markdown output — results read naturally in chat
- Rate-limited automatically — polite 500ms throttle across all endpoints
Tools
Quick Start
1. Add to your MCP client
Add this to your MCP client config (e.g. claude_desktop_config.json):
That's it. npx downloads and runs it automatically. No API key, no install step.
2. Use it
Ask your AI assistant things like:
- "What are the top DeFi protocols by TVL on Ethereum?"
- "Search for Aave and show me the chain breakdown"
- "What's the total TVL on Arbitrum?"
- "Show me the highest yield stablecoin pools on Base with at least $10M TVL"
- "List the top 5 stablecoins by market cap"
- "Which bridges have the most TVL?"
- "Show me DEX trading volumes for the last 24h"
- "What are the protocols with the most fees?"
Example Output
search_protocols
get_yields
get_tvl_by_chain
Use Cases
DeFi Research
"Search for Aave and show me the chain breakdown" — find protocols, compare TVL across chains, and understand where value is concentrated. Works with any protocol in DeFi Llama's database of 3,000+ projects.
Yield Optimization
"Show me the highest yield stablecoin pools on Base with at least $10M TVL" — filter yield opportunities by chain, project, minimum TVL, and asset type. Find safe yields without hunting through dashboards.
Chain Analysis
"What's the total TVL on Arbitrum?" — get chain-level stats including top tokens by TVL. Useful for understanding where liquidity is flowing and which chains are growing.
Stablecoin Intelligence
"List the top 5 stablecoins by market cap" — track stablecoin market caps, circulating supply, and price deviations. Essential for understanding DeFi's dollar-denominated liquidity.
Cross-Chain Monitoring
"Which bridges have the most TVL?" — monitor cross-chain bridge activity and volume. Track which bridges are gaining or losing share.
Protocol Revenue Tracking
"What are the protocols with the most fees?" — analyze protocol fee generation and revenue. Useful for fundamental analysis and comparing protocol economics.
Security
- No API key required — uses DeFi Llama's free public API. No authentication needed.
- Read-only — only fetches public DeFi data from DeFi Llama's API. No writes, no mutations.
- No local file access — does not read or write any files on your machine.
- No shell access — does not execute commands or spawn processes.
- Rate-limited — automatically caps requests to be a polite API citizen.
- Open source — MIT licensed. Inspect the code at GitHub.
Troubleshooting
"Protocol not found" errors
Use search_protocols first to find the correct DeFi Llama slug. Protocol slugs are lowercase with hyphens (e.g. aave-v3, lido), not ticker symbols.
Slow responses
DeFi Llama's /protocols and /pools endpoints return multi-MB responses. The server throttles to ~2 calls/second. For large queries, results may take 1-2 seconds.
Server won't start
Make sure Node.js 18+ is installed: node --version. If using npx, ensure npm is up to date: npm install -g npm@latest.
MCP client can't connect
Verify the config path is correct. Claude Desktop uses ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows. Restart the client after config changes.
Requirements
- Node.js 18+
- No API key needed (DeFi Llama is a free public API)
Rate Limits
DeFi Llama doesn't publish hard rate limits, but the server automatically throttles requests to ~2 calls/second (500ms minimum interval) to be a polite citizen. The /protocols and /pools endpoints are large (multi-MB), so the throttle also helps avoid unnecessary load.
Data Sources
- Protocols & TVL:
https://api.llama.fi - Yields:
https://yields.llama.fi - Stablecoins:
https://stablecoins.llama.fi
All endpoints are free and require no authentication. Full API documentation: https://defillama.com/docs/api
Development
License
MIT
来源:README.md,提交 3771ae0
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分