DeFi Llama MCP Server

DeFi Llama MCP Server

Provides access to DeFi Llama's free API for querying protocol TVL, chain TVL, yields, stablecoins, bridges, DEX volumes, and fees through natural language.

Category
访问服务器

README

DeFi Llama MCP Server

An MCP server for DeFi Llama — connect any MCP-compatible client to free DeFi protocol data.

MCP Compatible TypeScript License: MIT

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

Tool Description
search_protocols Search DeFi protocols by name — returns top results with TVL, chains, category
get_protocol_tvl Get detailed TVL breakdown for a specific protocol (chain distribution, history, description)
get_tvl_by_chain Get total TVL for a specific chain (Ethereum, Arbitrum, Base, Solana, etc.)
get_yields Get yield/APY data for lending pools and staking, filter by chain / project / min TVL
get_stablecoins Get stablecoin market cap data and rankings
get_bridges Get cross-chain bridge TVL and volume data
get_dex_volumes Get DEX trading volumes across chains
get_protocol_fees Get protocol fee and revenue data

Quick Start

1. Install

npm install -g defillama-mcp-server

Or run directly with npx:

npx -y defillama-mcp-server

2. Configure your MCP client

Add to your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "defillama": {
      "command": "npx",
      "args": ["-y", "defillama-mcp-server"]
    }
  }
}

Or with global install:

{
  "mcpServers": {
    "defillama": {
      "command": "defillama-mcp-server"
    }
  }
}

3. 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

Top 5 protocols matching "aave" (by TVL):

- **Aave** (AAVE) — TVL: $12.45B | Category: Lending | Chains: Ethereum, Arbitrum, Polygon, Base, Optimism, +6 | Slug: `aave`
- **Aave v2** (AAVE) — TVL: $4.20B | Category: Lending | Chains: Ethereum, Polygon, Avalanche | Slug: `aave-v2`
- **Aave v3** (AAVE) — TVL: $8.10B | Category: Lending | Chains: Ethereum, Arbitrum, Polygon, Base, Optimism | Slug: `aave-v3`

get_yields

Top 5 yield pools (chain: Ethereum | min TVL: $10.00M | min APY: 0%):

- **Lido** — stETH on Ethereum 🟢 | APY: 3.42% (3.42% base) | TVL: $23.45B
- **Aave v3** — USDC on Ethereum 🟢 | APY: 4.85% (1.50% base + 3.35% reward) | TVL: $1.85B
- **Compound v3** — USDC on Ethereum 🟢 | APY: 5.12% (3.20% base + 1.92% reward) | TVL: $890.45M

get_tvl_by_chain

Ethereum — Chain TVL

- **Total TVL:** $115.32B
- **Native Token:** ETH
- **CoinGecko ID:** ethereum

### Top Tokens by TVL
- **ETH** (Ether): $67.23B
- **USDC** (USD Coin): $4.12B
- **USDT** (Tether): $3.45B
- **WBTC** (Wrapped BTC): $2.89B
- **WSTETH** (Wrapped stETH): $2.34B

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

git clone https://github.com/nova/defillama-mcp-server.git
cd defillama-mcp-server
npm install
npm run build
npm start

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选