DeFiLlama API

How to connect DeFiLlama to Cursor

Add the Firecrawl MCP server to Cursor once and it can call the DeFiLlama API and every other provider in Firecrawl Alexandria, with no DeFiLlama integration code.

Open Markdown

To connect DeFiLlama to Cursor, add the Firecrawl MCP server to Cursor, sign in on a Firecrawl team with Alexandria enabled, and ask for DeFiLlama data in plain language. The connection works in Cursor's agent and chat, and you set it up once.

Cursor uses DeFiLlama as an MCP tool through Firecrawl's hosted MCP server, so you don't install or host a separate MCP server for DeFiLlama.

Cursor is an AI code editor. Its agent uses MCP servers for outside tools, and the Firecrawl MCP server adds web search, scraping and every data provider in Firecrawl Alexandria.

How do I connect DeFiLlama to Cursor?

  1. Install the Firecrawl MCP server

    Open the install dialog in Cursor, check that the URL is Firecrawl's hosted server, then select Install.

    Cursor's Install MCP server dialog with the Firecrawl hosted server URL
  2. Connect your Firecrawl account

    Use the server's sign-in option in Cursor's MCP settings. Firecrawl opens in your browser: sign in, choose a team with Alexandria enabled, and approve access. A green dot next to Firecrawl means it's connected.

    Cursor's MCP list showing Firecrawl connected with its tools enabled
  3. Ask Cursor's agent for the data

    In the agent chat, ask in plain language and mention DeFiLlama or Firecrawl Alexandria. The agent finds the DeFiLlama capability that fits and runs it. For example:

    Use Firecrawl to list the ten largest stablecoins by circulating supply on Ethereum, with their symbols, peg types and reported prices.

What can Cursor do with DeFiLlama?

DeFiLlama analytics from the free llama.fi JSON APIs behind defillama.com: stablecoin supply and history, protocol and chain TVL, fees/revenue and DEX/options volume, yield pools, token prices and the hacks dataset.

Cursor can run any of DeFiLlama's 14 capabilities through Alexandria. Each call is billed in Firecrawl credits on your Firecrawl team.

  • Chain tvl history: Daily DeFi TVL history for one chain (api.llama.fi/v2/historicalChainTvl/{chain}) or for all of DeFi (`all`, api.llama.fi/v2/historicalChainTvl), newest first, capped by `limit` and optionally bounded by `from`/`to`. Costs 5 Firecrawl credits per call.
  • Chains: All chains DeFiLlama tracks with current DeFi TVL, sorted largest first, plus gas token symbol and CoinGecko/CMC ids. Source: api.llama.fi/v2/chains. Costs 5 Firecrawl credits per call.
  • Hacks: DeFiLlama's dataset of crypto hacks and exploits (api.llama.fi/hacks): date, target, classification, technique, amount lost and returned, chains. Newest first; client-side filters by name substring, chain, classification and `since`. Costs 5 Firecrawl credits per call.
  • Metrics overview: Ranking of protocols by fees/revenue, DEX volume or options volume from api.llama.fi/overview/{metric}[/{chain}] (24h/7d/30d/1y/all-time totals and changes per protocol, plus the aggregate totals). Optional chain scope and client-side name/category filters; sorted by 24h total, largest first. Costs 5 Firecrawl credits per call.
  • Price chart: Price series for up to 10 coin keys from coins.llama.fi/chart/{coins}?start=&span=&period=: `span` points at `period` spacing starting at `start`. Costs 5 Firecrawl credits per call.
  • Prices: Current or historical token prices for up to 50 coin keys from coins.llama.fi (/prices/current/{coins}, or /prices/historical/{timestamp}/{coins} when `timestamp` is given). Coins the source does not know are listed in `missing`, not treated as errors; when nothing is known the call fails with not_found. Costs 5 Firecrawl credits per call.
  • Protocol: One protocol's profile from api.llama.fi/protocol/{slug}: identity, category, chains, current TVL per chain (including the `-borrowed`, `-staking`, `-pool2` buckets DeFiLlama reports separately), the latest token breakdown, a trimmed TVL history (newest first), raises, hacks and hallmarks. Costs 5 Firecrawl credits per call.
  • Protocol metrics: One protocol's fees/revenue, DEX volume or options volume from api.llama.fi/summary/{metric}/{slug}: trailing totals, per-chain breakdown, child protocols, methodology and a trimmed daily series (newest first). Costs 5 Firecrawl credits per call.
  • Protocols: List DeFi protocols tracked by DeFiLlama with current TVL, category, chains and 1d/7d change, sorted by TVL (largest first). Optional client-side filters by name substring, category and chain. Source: api.llama.fi/protocols (one cached dump). Costs 5 Firecrawl credits per call.
  • Stablecoin chains: Current stablecoin supply per chain (USD), largest first, with the breakdown by peg type. Source: stablecoins.llama.fi/stablecoinchains. Costs 5 Firecrawl credits per call.

See all 14 capabilities and their inputs on the DeFiLlama API page.

What should I ask Cursor?

Name DeFiLlama or Firecrawl Alexandria in the prompt so Cursor reaches for it. Each example opens in Cursor with the prompt filled in.

Troubleshooting

Why can't Cursor find DeFiLlama?

If Firecrawl's tools in Cursor stop at search, scrape and parse, the connection is keyless and doesn't include Alexandria. Finish the sign-in from Cursor's MCP settings, or add an API key from a team with Alexandria enabled.

Firecrawl shows a red dot in Cursor. What should I do?

Open Cursor's MCP settings, sign in to Firecrawl again, and restart the agent chat so it loads the tools.

Use DeFiLlama in other AI apps

The same Firecrawl account reaches DeFiLlama from other AI apps. Pick one for its setup steps:

Other data providers you can connect to Cursor

Frequently Asked Questions

What is Firecrawl?

Firecrawl is the web data API to search, scrape and interact with the web at scale. It turns websites into clean, LLM-ready data for AI agents and apps. The Firecrawl MCP server brings those tools into Cursor, along with every data provider in Firecrawl Alexandria.

What is Firecrawl Alexandria?

Firecrawl Alexandria is Firecrawl's library of 550+ data providers for AI agents, DeFiLlama among them. Each provider returns structured data through documented capabilities. Cursor finds the capability that fits your question and calls it through the Firecrawl MCP server, so you don't write any integration code. Alexandria needs a Firecrawl account signed in on a team with Alexandria enabled, or an API key from such a team; keyless connections don't include it.

Is there a DeFiLlama MCP server for Cursor?

Cursor reaches DeFiLlama through Firecrawl's hosted MCP server, which serves DeFiLlama and every other Alexandria provider as tools. Add the Firecrawl MCP server once and you don't install or host a separate MCP server for DeFiLlama.

What does connecting DeFiLlama to Cursor unlock?

Cursor can run all 14 of DeFiLlama's capabilities, including Chain tvl history, Chains and Hacks, from any chat, with structured results it can sort, compare and summarize. For example, ask: "Use Firecrawl to list the ten largest stablecoins by circulating supply on Ethereum, with their symbols, peg types and reported prices." In the same conversation, Cursor can combine DeFiLlama with Firecrawl's web search and scraping and the other providers in Firecrawl Alexandria.

Do I need my own DeFiLlama account or API key to use it in Cursor?

No. Cursor calls DeFiLlama through Firecrawl Alexandria and each call is billed in Firecrawl credits, so you don't need a separate DeFiLlama account or API key.

How much does it cost to use DeFiLlama in Cursor?

Each DeFiLlama call costs 5 Firecrawl credits. The capability list on this page shows each price and its unit. The credits come from the Firecrawl team you connect to Cursor, and finding the right capability is free.

Can Cursor use other providers besides DeFiLlama?

Yes. The same Firecrawl MCP server reaches every provider in Firecrawl Alexandria, along with Firecrawl's web search and scraping, so you connect once.

Can I use DeFiLlama in other AI apps?

Yes. Connect Firecrawl to ChatGPT, Claude, Grok Bot, Muse signed in on a Firecrawl team with Alexandria enabled, or use the Firecrawl MCP server, CLI or API with an API key from that team, and the same DeFiLlama capabilities are available there. Keyless connections don't include Alexandria.

//
Get started
//
Ready to build?
Start getting web context for free and scale seamlessly as your project expands. No credit card needed.
Are you an AI agent? See setup options