🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

defillama-mcp

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defillama-mcp

MCP server for DefiLlama — live DeFi data (chain & protocol TVL, token prices, yield pools, stablecoins) for Claude, Cursor, and any MCP client. No API key required.

latest
npmnpm
Version
1.0.2
Version published
Weekly downloads
53
15.22%
Maintainers
1
Weekly downloads
 
Created
Source

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

Tools

ToolWhat it does
get_chains_tvlTVL across all blockchains, ranked
search_protocolsSearch protocols by name / symbol / category, ranked by TVL
get_protocolTVL, 1d/7d change, chains, category for one protocol
get_token_pricesCurrent USD price for one or more tokens (DefiLlama coin ids)
get_yield_poolsTop yield pools by APY, filter by chain / project / min TVL
get_stablecoinsLargest 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:ethereum
  • By 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.

Built by Gleb. Need an MCP connector for a specific tool or API? Open an issue.

Keywords

mcp

FAQs

Package last updated on 06 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts