DefiLlama MCP server for AI agents

Live

NO AUTH

DEFI ANALYTICS

Analytics

DefiLlama gives your agent DeFi analytics: total value locked by protocol and chain, current and historical token prices, DEX and options volume, protocol fees and revenue, and stablecoin supply.

  • No credentials to manage: DefiLlama needs no sign-in, so there is nothing to vault or rotate.
  • Scoped before every call: pre-call scope check on every DefiLlama tool.
  • Audited: every call is logged to a 90-day SIEM-exportable audit chain.
DefiLlama
agent · Acme Q3
Run
What is Aave's current TVL?
S
defillama_get_protocol_tvl
88ms
DeFi research agent
Aave's current total value locked is $24.1B across all chains.
Sources: DefiLlama, 1 protocol
defillama
1 protocol
18:29
Message Claude...

Tools your DeFi research agent reaches for on DefiLlama, scope checked on every call.

CALL ANY TOOL
25 tools for DeFi analytics on DefiLlama: read protocol and chain TVL, current and historical token prices, DEX, options, and open interest overviews, fees and revenue, and stablecoin supply.
defillama_get_batch_historical_prices
Get batch historical prices
Get historical USD prices for several tokens, each at its own list of timestamps, in one call. Returns coins, keyed by coin id, each with symbol and a prices array of {timestamp, price, confidence}, one entry per requested timestamp. Use defillama_get_batch_historical_prices when coins need different timestamps. Use defillama_get_historical_prices when every coin shares one timestamp.
Parameters
Name
Type
Required
Description
coins
object
Required
JSON object whose keys are coin ids ({chain}:{address} or coingecko:{id}) and whose values are arrays of unix timestamps in seconds. Send it as an object or as the equivalent JSON text. Example: {"coingecko:ethereum": [1666869543, 1666862343], "avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e": [1666876743]}.
defillama_get_chain_dexs_overview
Get chain dexs overview
defillama_get_chain_fees_overview
Get chain fees overview
defillama_get_chain_historical_tvl
Get chain historical tvl
defillama_get_chain_options_overview
Get chain options overview
defillama_get_chain_stablecoin_market_cap_history
Get chain stablecoin market cap history
defillama_get_closest_block
Get closest block
defillama_get_current_prices
Get current prices
defillama_get_dex_summary
Get dex summary
defillama_get_dexs_overview
Get dexs overview
defillama_get_fees_summary
Get fees summary
defillama_get_first_prices
Get first prices
defillama_get_historical_prices
Get historical prices
defillama_get_historical_tvl
Get historical tvl
defillama_get_open_interest_overview
Get open interest overview
defillama_get_options_overview
Get options overview
defillama_get_options_summary
Get options summary
defillama_get_price_chart
Get price chart
defillama_get_price_percentage_change
Get price percentage change
defillama_get_protocol
Get protocol
defillama_get_protocol_tvl
Get protocol tvl
defillama_get_stablecoin_market_cap_history
Get stablecoin market cap history
defillama_list_chains
List chains
defillama_list_stablecoin_chains
List stablecoin chains
defillama_list_stablecoins
List stablecoins
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// DefiLlama tools available to this agent
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["defillama"], toolNames: [
    "defillama_get_protocol_tvl",
    "defillama_get_current_prices",
    "defillama_get_fees_summary"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Compare Aave's TVL and 30-day fees" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["defillama"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Compare Aave's TVL and 30-day fees" }],
  tools,
});

// Execute the tool call through Scalekit (DefiLlama needs no credentials)
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["defillama"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Compare Aave's TVL and 30-day fees" }],
  tools,
});

// Tool call runs through Scalekit (DefiLlama needs no credentials)
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["defillama"] }, pageSize: 100,
});

const agent = new Agent({
  name: "defi_research_agent",
  model: "gemini-2.5-pro",
  instruction: "DefiLlama tools available to this agent",
  tools,
});

await agent.run("Compare Aave's TVL and 30-day fees");
Try these prompts
Copy any prompt into your agent. Each maps directly to a DefiLlama tool. Click to copy, paste into your agent, done.
TVL
Copy the prompt
Copied
What is Aave's current TVL?
Copy the prompt
Copied
Which 10 chains have the highest TVL right now?
Copy the prompt
Copied
Show Arbitrum's daily TVL over the last 90 days.
Prices
Copy the prompt
Copied
Get the current USD price of ETH and SOL.
Copy the prompt
Copied
What was the price of ETH on January 1?
Copy the prompt
Copied
How much did these 3 tokens change in price over the last 7 days?
Volume, fees, and stablecoins
Copy the prompt
Copied
Which DEXs did the most volume on Ethereum yesterday?
Copy the prompt
Copied
Show fees and revenue for Aave over the last 30 days.
Copy the prompt
Copied
List stablecoins by circulating supply.
SEE HOW AUTH WORKS
DefiLlama needs no sign-in. Every call is still scope checked and every action is logged.
1
Authorize
Your user connects
DefiLlama
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
DefiLlama
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
DefiLlama
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
DefiLlama
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same scoped, audited pattern across other analytics and finance connectors.
GTM and RevOps Teams
Competitive intelligence briefing agent
Scans Gong calls for competitor mentions, matches each one to its Notion battlecard, and DMs every affected rep a single Slack digest per cycle. Every call runs as the PMM who owns the briefing, never a shared bot.
Test other agents
See the same scoped, audited pattern across other analytics and finance connectors.
GTM
Competitive intelligence briefing agent
Scan Gong calls for competitor mentions, match each one to its Notion battlecard, and DM every affected rep a single Slack digest.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Every call is attributed
DefiLlama needs no sign-in, so a direct integration cannot tell which user asked for which query. Scalekit logs every DefiLlama call against the user who triggered the agent.
// direct call
audit → none

// scalekit
audit → user_abc ✓
02.
Open data still needs authorization
03.
Multi-tenancy is architectural
04.
DefiLlama today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does DefiLlama need credentials?
No. DefiLlama needs no sign-in. Scalekit routes each call and logs it, so every action is attributed to the user who ran the agent.
Where are the DefiLlama credentials stored?
There are none to store. DefiLlama needs no sign-in, so nothing for this connector sits in the vault. Connectors in the same agent that do need a key use Scalekit's managed AES-256 vault, namespaced per tenant.
Can I limit what the agent does in DefiLlama?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example price tools only. Every DefiLlama tool is read-only, so the agent reads data and cannot change anything. Scalekit also enforces scope checks before every API call.
What happens when DefiLlama access is turned off?
Disable the connection in the Scalekit dashboard and the next tool call fails closed with a clear error. Other tenants are unaffected, and the change is logged.
What data does DefiLlama cover?
Public DeFi data that DefiLlama tracks: TVL for protocols and chains, token prices by contract address, DEX, options, and perpetual open interest overviews, protocol fees and revenue, and stablecoin supply by chain. defillama_get_closest_block also maps a timestamp to the nearest block on a chain.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""defillama"": {
""url"": ""https://mcp.scalekit.com/defillama"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.defillama]
url = ""https://mcp.scalekit.com/defillama""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""defillama"": {
""url"": ""https://mcp.scalekit.com/defillama"",
""type"": ""http""
}
}
}