DefiLlama MCP server
136 operations0 webhooks
DefiLlama DeFi data: TVL by protocol and chain, token prices and charts, stablecoins, yields and pools, DEX and options volumes, fees and revenue, oracles, forks, treasuries and hacks; with a Pro key also yields earn and borrow, unlocks, bridges, equities, ETFs, RWA, pre-IPO and digital-asset treasuries (136 operations, 73 free without a key).
Try DefiLlama with your agent
Connect DefiLlama, then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.
Using Corsair, show me what you can do in DefiLlama on my account, then run one read-only example and show me the result.
DefiLlama tools and triggers
Tools are what your agent can do in DefiLlama through Corsair's MCP server. Triggers are the DefiLlama events a routine can start from.
Dimensions
- CategoriesRead-only
Get categories available for a dimension
dimensions.categories
- Category Chain ChartRead-only
Get category chain historical timeseries chart data
dimensions.categoryChainChart
- Category Chain Chart By ProtocolRead-only
Get category chain timeseries chart data breakdown by protocol
dimensions.categoryChainChartByProtocol
- Category Chain MetricsRead-only
Get category chain dimension data overview
dimensions.categoryChainMetrics
- Category ChartRead-only
Get category historical timeseries chart data
dimensions.categoryChart
- Category Chart By ChainRead-only
Get category timeseries chart data breakdown by chain
dimensions.categoryChartByChain
- Category Chart By ProtocolRead-only
Get category timeseries chart data breakdown by protocol
dimensions.categoryChartByProtocol
- Category MetricsRead-only
Get category dimension data overview
dimensions.categoryMetrics
- Chain ChartRead-only
Get chain historical timeseries chart data
dimensions.chainChart
- Chain Chart By ProtocolRead-only
Get chain timeseries chart data breakdown by protocol
dimensions.chainChartByProtocol
- Chain MetricsRead-only
Get chain dimension data overview
dimensions.chainMetrics
- ChartRead-only
Get historical timeseries chart data
dimensions.chart
- Chart By ChainRead-only
Get historical timeseries chart data breakdown by chain
dimensions.chartByChain
- Chart By ProtocolRead-only
Get historical timeseries chart data breakdown by protocol
dimensions.chartByProtocol
- MetricsRead-only
Get dimension data overview
dimensions.metrics
- Protocol ChartRead-only
Get protocol historical timeseries chart data
dimensions.protocolChart
- Protocol Chart By ChainRead-only
Get protocol timeseries chart data breakdown by chain
dimensions.protocolChartByChain
- Protocol Chart By LabelRead-only
Get protocol timeseries chart data breakdown by label
dimensions.protocolChartByLabel
- Protocol Chart By VersionRead-only
Get protocol timeseries chart data breakdown by version
dimensions.protocolChartByVersion
- Protocol MetricsRead-only
Get protocol dimension data overview
dimensions.protocolMetrics
Yields
- Borrow PoolsRead-only
Borrow costs APY of assets from lending markets in the legacy v1 response format (needs a DefiLlama Pro key)
yields.borrowPools
- Borrow.Market HistoryRead-only
Retrieve daily borrow-side history for a borrow market (needs a DefiLlama Pro key)
yields.borrow.marketHistory
- Borrow.MarketsRead-only
Retrieve the latest data for all borrow markets (needs a DefiLlama Pro key)
yields.borrow.markets
- Borrow.RoutesRead-only
Retrieve the latest data for all borrow routes (needs a DefiLlama Pro key)
yields.borrow.routes
- Earn.HistoryRead-only
Retrieve daily history for an earn pool (needs a DefiLlama Pro key)
yields.earn.history
- Earn.ListRead-only
Retrieve the latest data for all earn pools (needs a DefiLlama Pro key)
yields.earn.list
- Earn.QueryRead-only
Retrieve a filtered, paginated page of earn pools (needs a DefiLlama Pro key)
yields.earn.query
- Earn.VerifiedRead-only
Retrieve the latest verified data for all measured earn pools (needs a DefiLlama Pro key)
yields.earn.verified
- Earn.Verified GetRead-only
Retrieve the latest verified data for one earn pool (needs a DefiLlama Pro key)
yields.earn.verifiedGet
- Earn.Verified HistoryRead-only
Retrieve daily verified history for an earn pool (needs a DefiLlama Pro key)
yields.earn.verifiedHistory
- Lend Borrow ChartRead-only
Historical borrow cost APY from a pool on a lending market in the legacy v1 response format (needs a DefiLlama Pro key)
yields.lendBorrowChart
- LoopsRead-only
Retrieve the latest data for all loop strategies (needs a DefiLlama Pro key)
yields.loops
- Lst RatesRead-only
Exchange rates and ETH peg of liquid staking tokens (needs a DefiLlama Pro key)
yields.lstRates
- Perp Funding RatesRead-only
Funding rates and open interest of perpetual futures (needs a DefiLlama Pro key)
yields.perpFundingRates
- Pool ChartRead-only
Get historical APY and TVL of a pool in the legacy v1 response format
yields.poolChart
- PoolsRead-only
Retrieve the latest data for all pools in the legacy v1 response format
yields.pools
Equities
- CompaniesRead-only
Get list of all tracked public companies (needs a DefiLlama Pro key)
equities.companies
- DimensionsRead-only
Get financial dimensions for a company (needs a DefiLlama Pro key)
equities.dimensions
- Earnings CalendarRead-only
Get earnings calendar (needs a DefiLlama Pro key)
equities.earningsCalendar
- FilingsRead-only
Get filings for a company (needs a DefiLlama Pro key)
equities.filings
- IndustriesRead-only
Get industries (needs a DefiLlama Pro key)
equities.industries
- OhlcvRead-only
Get OHLCV candle data for a company (needs a DefiLlama Pro key)
equities.ohlcv
- OnchainRead-only
Get on-chain tradeable markets for a company (needs a DefiLlama Pro key)
equities.onchain
- Price HistoryRead-only
Get historical price data for a company (needs a DefiLlama Pro key)
equities.priceHistory
- SectorRead-only
Get details for one sector (needs a DefiLlama Pro key)
equities.sector
- SectorsRead-only
Get all sectors (needs a DefiLlama Pro key)
equities.sectors
- Sectors OverviewRead-only
Get market-wide sector overview (needs a DefiLlama Pro key)
equities.sectorsOverview
- StatementsRead-only
Get financial statements for a company (needs a DefiLlama Pro key)
equities.statements
- SummaryRead-only
Get live market summary for a company (needs a DefiLlama Pro key)
equities.summary
Tvl
- Chain AssetsRead-only
Get assets of all chains (needs a DefiLlama Pro key)
tvl.chainAssets
- ChainsRead-only
Get current TVL of all chains
tvl.chains
- ChartRead-only
Get historical TVL chart for a protocol
tvl.chart
- Chart By ChainRead-only
Get historical TVL chart for a protocol broken down by chain
tvl.chartByChain
- Chart By TokenRead-only
Get historical TVL chart for a protocol broken down by token
tvl.chartByToken
- CurrentRead-only
Simplified endpoint to get current TVL of a protocol
tvl.current
- Historical Chain TvlRead-only
Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains
tvl.historicalChainTvl
- Historical Chain Tvl By ChainRead-only
Get historical TVL (excludes liquid staking and double counted tvl) of a chain
tvl.historicalChainTvlByChain
- InflowsRead-only
Lists the amount of inflows and outflows for a protocol at a given date (needs a DefiLlama Pro key)
tvl.inflows
- MetricsRead-only
Get aggregate TVL metrics for a protocol
tvl.metrics
- ProtocolRead-only
Get historical TVL of a protocol and breakdowns by token and chain
tvl.protocol
- ProtocolsRead-only
List all protocols on defillama along with their tvl
tvl.protocols
- Token ProtocolsRead-only
Lists the amount of a certain token within all protocols. Data for the Token Usage page (needs a DefiLlama Pro key)
tvl.tokenProtocols
Oracles
- Chain ChartRead-only
Get timeseries chart data by chain
oracles.chainChart
- Chain Chart By ProtocolRead-only
Get protocol breakdown timeseries chart data by chain
oracles.chainChartByProtocol
- ChartRead-only
Get timeseries chart data for all oracles
oracles.chart
- Chart By ChainRead-only
Get timeseries chart data breakdown by chain
oracles.chartByChain
- Chart By ProtocolRead-only
Get timeseries chart data breakdown by protocol
oracles.chartByProtocol
- MetricsRead-only
Get oracle data overview
oracles.metrics
- Protocol ChartRead-only
Get timeseries chart data by protocol/oracle
oracles.protocolChart
- Protocol Chart By ChainRead-only
Get chain breakdown timeseries chart data by protocol/oracle
oracles.protocolChartByChain
Coins
- Batch HistoricalRead-only
Get historical prices for multiple tokens at multiple different timestamps
coins.batchHistorical
- BlockRead-only
Get the closest block to a timestamp
coins.block
- ChartRead-only
Get token prices at regular time intervals
coins.chart
- CurrentRead-only
Get current prices of tokens by contract address
coins.current
- FirstRead-only
Get earliest timestamp price record for coins
coins.first
- HistoricalRead-only
Get historical prices of tokens by contract address
coins.historical
- Percentage ChangeRead-only
Get percentage change in price over time
coins.percentageChange
Overview
- CategoriesRead-only
Overview of all categories accross all protocols (needs a DefiLlama Pro key)
overview.categories
- EntitiesRead-only
List all entities (needs a DefiLlama Pro key)
overview.entities
- ForksRead-only
Overview of all forks accross all protocols (needs a DefiLlama Pro key)
overview.forks
- HacksRead-only
Overview of all hacks on our Hacks dashboard
overview.hacks
- OraclesRead-only
Overview of all oracles accross all protocols (needs a DefiLlama Pro key)
overview.oracles
- RaisesRead-only
Overview of all raises on our Raises dashboard (needs a DefiLlama Pro key)
overview.raises
- TreasuriesRead-only
List all protocols on our Treasuries dashboard (needs a DefiLlama Pro key)
overview.treasuries
Stablecoins
- ChainsRead-only
Get current mcap sum of all stablecoins on each chain
stablecoins.chains
- Chart AllRead-only
Get historical mcap sum of all stablecoins
stablecoins.chartAll
- Chart By ChainRead-only
Get historical mcap sum of all stablecoins in a chain
stablecoins.chartByChain
- DominanceRead-only
Get stablecoin dominance per chain along with the info about the larges coin in a chain
stablecoins.dominance
- GetRead-only
Get historical mcap and historical chain distribution of a stablecoin
stablecoins.get
- ListRead-only
List all stablecoins along with their circulating amounts
stablecoins.list
- PricesRead-only
Get historical prices of all stablecoins
stablecoins.prices
Rwa
- ChainRead-only
List current RWA assets on a chain (needs a DefiLlama Pro key)
rwa.chain
- Chain ChartRead-only
Get historical RWA chart data for a chain (needs a DefiLlama Pro key)
rwa.chainChart
- Chart By ChainRead-only
Get historical RWA metric breakdown by chain (needs a DefiLlama Pro key)
rwa.chartByChain
- CurrentRead-only
List all current RWA assets (needs a DefiLlama Pro key)
rwa.current
- ListRead-only
List RWA ids and filter values (needs a DefiLlama Pro key)
rwa.list
- StatsRead-only
Get aggregate RWA stats by chain, category, platform, and asset group
rwa.stats
Volumes
- Dex SummaryRead-only
Get summary of dex volume with historical data
volumes.dexSummary
- DexsRead-only
List all dexs along with summaries of their volumes and dataType history data
volumes.dexs
- Dexs By ChainRead-only
List all dexs along with summaries of their volumes and dataType history data filtering by chain
volumes.dexsByChain
- OptionsRead-only
List all options dexs along with summaries of their volumes and dataType history data
volumes.options
- Options By ChainRead-only
List all options dexs along with summaries of their volumes and dataType history data filtering by chain
volumes.optionsByChain
- Options SummaryRead-only
Get summary of options dex volume with historical data
volumes.optionsSummary
Bridges
- Day StatsRead-only
Get a 24hr token and address volume breakdown for a bridge (needs a DefiLlama Pro key)
bridges.dayStats
- GetRead-only
Get summary of bridge volume and volume breakdown by chain (needs a DefiLlama Pro key)
bridges.get
- ListRead-only
List all bridges along with summaries of recent bridge volumes (needs a DefiLlama Pro key)
bridges.list
- TransactionsRead-only
Get all transactions for a bridge within a date range (needs a DefiLlama Pro key)
bridges.transactions
- VolumeRead-only
Get historical volumes for a bridge, chain, or bridge on a particular chain (needs a DefiLlama Pro key)
bridges.volume
Pre Ipo
- CompaniesRead-only
Get list of all tracked pre-IPO companies (needs a DefiLlama Pro key)
preIpo.companies
- IntegrationsRead-only
Get tradeable markets for a pre-IPO company (needs a DefiLlama Pro key)
preIpo.integrations
- RaisesRead-only
Get funding rounds for a pre-IPO company (needs a DefiLlama Pro key)
preIpo.raises
- SummaryRead-only
Get profile and latest valuation for a pre-IPO company (needs a DefiLlama Pro key)
preIpo.summary
- ValuationsRead-only
Get valuation history for a pre-IPO company (needs a DefiLlama Pro key)
preIpo.valuations
Treasury
- ChartRead-only
Get historical treasury chart for a protocol
treasury.chart
- Chart By ChainRead-only
Get historical treasury chart for a protocol broken down by chain
treasury.chartByChain
- Chart By TokenRead-only
Get historical treasury chart for a protocol broken down by token
treasury.chartByToken
- MetricsRead-only
Get aggregate treasury metrics for a protocol
treasury.metrics
Fees
- By ChainRead-only
List all protocols along with summaries of their fees and revenue and dataType history data by chain
fees.byChain
- OverviewRead-only
List all protocols along with summaries of their fees and revenue and dataType history data
fees.overview
- SummaryRead-only
Get summary of protocol fees and revenue with historical data
fees.summary
Forks
- Chart By ProtocolRead-only
Get timeseries chart data breakdown by protocol
forks.chartByProtocol
- MetricsRead-only
Get fork data overview
forks.metrics
- Protocol ChartRead-only
Get timeseries chart data by protocol
forks.protocolChart
Perps
- DerivativesRead-only
Lists all derivatives along summaries of their volumes filtering by chain (needs a DefiLlama Pro key)
perps.derivatives
- Derivatives SummaryRead-only
Volume Details about a specific perp protocol (needs a DefiLlama Pro key)
perps.derivativesSummary
- Open InterestRead-only
List all open interest dex exchanges along with summaries of their open interest
perps.openInterest
Dat
- InstitutionRead-only
Get individual institution Digital Asset Treasury details (needs a DefiLlama Pro key)
dat.institution
- InstitutionsRead-only
Get list of all institutions with Digital Asset Treasury data (needs a DefiLlama Pro key)
dat.institutions
Etfs
- FlowsRead-only
Historical Flows at the Asset Level (needs a DefiLlama Pro key)
etfs.flows
- SnapshotRead-only
Get ETFs and their metrics (aum, flows, fees...) (needs a DefiLlama Pro key)
etfs.snapshot
Unlocks
- GetRead-only
Unlocks data for a given token/protocol. You can find a list of available slugs to query by querying /emissions and then extracting the key `gecko_id` (needs a DefiLlama Pro key)
unlocks.get
- ListRead-only
List of all tokens along with basic info for each (needs a DefiLlama Pro key)
unlocks.list
Account
- UsageRead-only
Get amount of credits left in the api key, these reset on the 1st of each month (needs a DefiLlama Pro key)
account.usage
Financial Statements
- GetRead-only
Get protocol income statement report (needs a DefiLlama Pro key)
financialStatements.get
Narratives
- PerformanceRead-only
Get chart of narratives based on category performance (with individual coins weighted by mcap) (needs a DefiLlama Pro key)
narratives.performance
Token Liquidity
- HistoryRead-only
Provides the name of contracts on a determined chain (needs a DefiLlama Pro key)
tokenLiquidity.history
Connect DefiLlama to Claude, ChatGPT or Cursor
- 1
Connect DefiLlama in Corsair
Add your DefiLlama API key once in Corsair. Corsair stores the credential encrypted and makes the DefiLlama API calls for your agent, so it never goes into a prompt or a config file. Connect DefiLlama
If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs DefiLlama. On a ChatGPT personal plan, connect DefiLlama here first.
- 2
Add Corsair's MCP server to your agent
Every client uses the same address:
https://mcp.corsair.dev/mcpOpen Plugins → Add → Add custom connector, name it Corsair, paste the address, select Continue, then Add.Add a custom MCP server with the address and choose OAuth. Personal plans get read tools only.Add to CursorOr add this to~/.cursor/mcp.json. Cursor opens Corsair to sign in the first time it connects.{ "mcpServers": { "corsair": { "url": "https://mcp.corsair.dev/mcp" } } }Run this, then run/mcpin Claude Code to sign in.claude mcp add --transport http corsair https://mcp.corsair.dev/mcpCodex, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client
- 3
Sign in and choose what needs your approval
Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. Every DefiLlama operation only reads data, so it runs right away in every mode.
FAQ
Install corsair and @corsair-dev/defillama, add the DefiLlama plugin, and connect with an API key. Then call methods like corsair.defillama.api.account.usage() from your app. Corsair keeps each tenant isolated.
Yes. DefiLlama requires an API key from your DefiLlama account or developer dashboard. Create credentials with access that matches what you automate, then paste them into Corsair or connect through managed auth in Hub.
Yes. One Corsair client can hit DefiLlama, GitHub, Notion, Stripe, and the rest. Trigger DefiLlama from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.
Teams use Corsair for DefiLlama DeFi data: TVL by protocol and chain, token prices and charts, stablecoins, yields and pools, DEX and options volumes, fees and revenue, oracles, forks, treasuries and hacks; with a Pro key also yields earn and borrow, unlocks, bridges, equities, ETFs, RWA, pre-IPO and digital-asset treasuries (136 operations, 73 free without a key). Common builds include sync jobs, admin tooling, and agents that call DefiLlama APIs from your backend.
The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per DefiLlama API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.
We maintain @corsair-dev/defillama in the open repo. When DefiLlama ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.
No. Corsair does not read your DefiLlama data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store DefiLlama data on your behalf.
Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.
Yes. Put DefiLlama on a link in Strict mode and every write waits for your approval, while destructive actions are refused. Every DefiLlama operation only reads data, so there are no changes to approve today. You can change a link's mode at hub.corsair.dev/me.