{
  "markdown": "# DeFi Llama MCP Server\n\n> An MCP server for [DeFi Llama](https://defillama.com) — connect any MCP-compatible client to free DeFi protocol data.\n\n[![npm version](https://img.shields.io/npm/v/@supernova123/defillama-mcp-server)](https://www.npmjs.com/package/@supernova123/defillama-mcp-server)\n[![npm downloads](https://img.shields.io/npm/dm/@supernova123/defillama-mcp-server)](https://www.npmjs.com/package/@supernova123/defillama-mcp-server)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![MCP Compatible](https://img.shields.io/badge/MCP-compatible-blueviolet)](https://modelcontextprotocol.io)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.5-blue)](https://www.typescriptlang.org/)\n[![Claude Desktop](https://img.shields.io/badge/Claude%20Desktop-ready-orange)](https://claude.ai/download)\n[![Cursor](https://img.shields.io/badge/Cursor-compatible-blue)](https://cursor.sh)\n\n## What is this?\n\nAn [MCP (Model Context Protocol)](https://modelcontextprotocol.io) 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.\n\nUse 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.\n\n## Why use this?\n\n- **No API key required** — DeFi Llama is a free public API\n- **8 built-in tools** — covers the most common DeFi data queries\n- **Clean markdown output** — results read naturally in chat\n- **Rate-limited automatically** — polite 500ms throttle across all endpoints\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `search_protocols` | Search DeFi protocols by name — returns top results with TVL, chains, category |\n| `get_protocol_tvl` | Get detailed TVL breakdown for a specific protocol (chain distribution, history, description) |\n| `get_tvl_by_chain` | Get total TVL for a specific chain (Ethereum, Arbitrum, Base, Solana, etc.) |\n| `get_yields` | Get yield/APY data for lending pools and staking, filter by chain / project / min TVL |\n| `get_stablecoins` | Get stablecoin market cap data and rankings |\n| `get_bridges` | Get cross-chain bridge TVL and volume data |\n| `get_dex_volumes` | Get DEX trading volumes across chains |\n| `get_protocol_fees` | Get protocol fee and revenue data |\n\n## Quick Start\n\n### 1. Add to your MCP client\n\nAdd this to your MCP client config (e.g. `claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"defillama\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"defillama-mcp-server\"]\n    }\n  }\n}\n```\n\nThat's it. npx downloads and runs it automatically. No API key, no install step.\n\n### 2. Use it\n\nAsk your AI assistant things like:\n\n- \"What are the top DeFi protocols by TVL on Ethereum?\"\n- \"Search for Aave and show me the chain breakdown\"\n- \"What's the total TVL on Arbitrum?\"\n- \"Show me the highest yield stablecoin pools on Base with at least $10M TVL\"\n- \"List the top 5 stablecoins by market cap\"\n- \"Which bridges have the most TVL?\"\n- \"Show me DEX trading volumes for the last 24h\"\n- \"What are the protocols with the most fees?\"\n\n## Example Output\n\n### `search_protocols`\n\n```\nTop 5 protocols matching \"aave\" (by TVL):\n\n- **Aave** (AAVE) — TVL: $12.45B | Category: Lending | Chains: Ethereum, Arbitrum, Polygon, Base, Optimism, +6 | Slug: `aave`\n- **Aave v2** (AAVE) — TVL: $4.20B | Category: Lending | Chains: Ethereum, Polygon, Avalanche | Slug: `aave-v2`\n- **Aave v3** (AAVE) — TVL: $8.10B | Category: Lending | Chains: Ethereum, Arbitrum, Polygon, Base, Optimism | Slug: `aave-v3`\n```\n\n### `get_yields`\n\n```\nTop 5 yield pools (chain: Ethereum | min TVL: $10.00M | min APY: 0%):\n\n- **Lido** — stETH on Ethereum 🟢 | APY: 3.42% (3.42% base) | TVL: $23.45B\n- **Aave v3** — USDC on Ethereum 🟢 | APY: 4.85% (1.50% base + 3.35% reward) | TVL: $1.85B\n- **Compound v3** — USDC on Ethereum 🟢 | APY: 5.12% (3.20% base + 1.92% reward) | TVL: $890.45M\n```\n\n### `get_tvl_by_chain`\n\n```\nEthereum — Chain TVL\n\n- **Total TVL:** $115.32B\n- **Native Token:** ETH\n- **CoinGecko ID:** ethereum\n\n### Top Tokens by TVL\n- **ETH** (Ether): $67.23B\n- **USDC** (USD Coin): $4.12B\n- **USDT** (Tether): $3.45B\n- **WBTC** (Wrapped BTC): $2.89B\n- **WSTETH** (Wrapped stETH): $2.34B\n```\n\n## Use Cases\n\n### DeFi Research\n\"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.\n\n### Yield Optimization\n\"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.\n\n### Chain Analysis\n\"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.\n\n### Stablecoin Intelligence\n\"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.\n\n### Cross-Chain Monitoring\n\"Which bridges have the most TVL?\" — monitor cross-chain bridge activity and volume. Track which bridges are gaining or losing share.\n\n### Protocol Revenue Tracking\n\"What are the protocols with the most fees?\" — analyze protocol fee generation and revenue. Useful for fundamental analysis and comparing protocol economics.\n\n## Security\n\n- **No API key required** — uses DeFi Llama's free public API. No authentication needed.\n- **Read-only** — only fetches public DeFi data from DeFi Llama's API. No writes, no mutations.\n- **No local file access** — does not read or write any files on your machine.\n- **No shell access** — does not execute commands or spawn processes.\n- **Rate-limited** — automatically caps requests to be a polite API citizen.\n- **Open source** — MIT licensed. Inspect the code at [GitHub](https://github.com/friendlygeorge/defillama-mcp-server).\n\n## Troubleshooting\n\n### \"Protocol not found\" errors\nUse `search_protocols` first to find the correct DeFi Llama slug. Protocol slugs are lowercase with hyphens (e.g. `aave-v3`, `lido`), not ticker symbols.\n\n### Slow responses\nDeFi 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.\n\n### Server won't start\nMake sure Node.js 18+ is installed: `node --version`. If using npx, ensure npm is up to date: `npm install -g npm@latest`.\n\n### MCP client can't connect\nVerify 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.\n\n## Requirements\n\n- Node.js 18+\n- No API key needed (DeFi Llama is a free public API)\n\n## Rate Limits\n\nDeFi 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.\n\n## Data Sources\n\n- **Protocols & TVL:** `https://api.llama.fi`\n- **Yields:** `https://yields.llama.fi`\n- **Stablecoins:** `https://stablecoins.llama.fi`\n\nAll endpoints are free and require no authentication. Full API documentation: https://defillama.com/docs/api\n\n## Development\n\n```bash\ngit clone https://github.com/nova/defillama-mcp-server.git\ncd defillama-mcp-server\nnpm install\nnpm run build\nnpm start\n```\n\n## License\n\nMIT\n",
  "bytes": 7774,
  "sha": "b245a2333f2a7935e9d45742748ceab9e1bb8a5a1ac7f656b61ca8003eb1b7c0",
  "repo_slug": "friendlygeorge/defillama-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_friendlygeorge_defillama_mcp_s_ae8b5a2b/readme"
}