agentdefi — Claude Code MCP server: what it does, how to install
agentdefi connects DefiLlama market data to your coding assistant, exposing protocol TVL figures, pool yields, and chain rankings.
no license 2,977 installs updated 2026-05-29
claude mcp add --transport http agentdefi https://agentdefi--heavysword1.run.toolsWhat agentdefi does
The server routes DefiLlama metrics straight into your agent through an HTTP endpoint. It exposes three functions: get_defi_protocols fetches protocols ranked by total value locked, with options to narrow results by chain, slug, or minimum TVL threshold.
Yield analysis is handled by get_yield_pools, which scans liquidity pools filtered by ticker symbol, project, or target APY. The third tool, get_chain_tvl, tracks ecosystem TVL standings or pulls historical volume for a designated network.
Because the tool relies on https://agentdefi--heavysword1.run.tools, it will fail in network environments that block outbound HTTP traffic.
What it helps with
- Retrieve protocol rankings sorted by total value locked
- Filter yield pools by token symbol and minimum APY percentage
- Pull historical TVL trajectories for a target blockchain
- Look up specific DeFi projects by their slug identifier
Example prompts for the agent
- Find liquidity pools containing ETH with an APY above 5%
- List the leading protocols on Base filtered by minimum TVL
- Show historical total value locked for Polygon
How to install agentdefi
Platform CLI: remote server
claude mcp add --transport http agentdefi https://agentdefi--heavysword1.run.toolsPlatform CLI: remote server
codex mcp add agentdefi --url https://agentdefi--heavysword1.run.toolsConfig file
{
"mcpServers": {
"agentdefi": {
"url": "https://agentdefi--heavysword1.run.tools"
}
}
}Config file
{
"servers": {
"agentdefi": {
"type": "http",
"url": "https://agentdefi--heavysword1.run.tools"
}
}
}Platform CLI: remote server
gemini mcp add -t http agentdefi https://agentdefi--heavysword1.run.toolsStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agentdefi
How to install agentdefi in Claude Code?
Run claude mcp add --transport http agentdefi https://agentdefi--heavysword1.run.tools. This registers the remote HTTP endpoint without local compilation.
What does agentdefi do?
It feeds DefiLlama market intelligence directly to your assistant. Agents can query TVL statistics across 7,500+ protocols and yield metrics across 19,000+ pools.
What query filters are available in agentdefi?
You can filter protocols by blockchain, project slug, or minimum TVL. Yield searches accept parameters for token symbols, project names, and threshold APY rates.