# How to connect DefiLlama to Claude

```json
{
  "title": "How to connect DefiLlama to Claude",
  "toolkit": "DefiLlama",
  "toolkit_slug": "defillama",
  "framework": "Claude Cowork",
  "framework_slug": "claude-cowork",
  "url": "https://composio.dev/toolkits/defillama/framework/claude-cowork",
  "markdown_url": "https://composio.dev/toolkits/defillama/framework/claude-cowork.md",
  "updated_at": "2026-11-27T05:37:20.870Z"
}
```

## Introduction

Claude is Anthropic's AI assistant, available on the web, in the desktop app, and on mobile. Cowork is its agent for knowledge work, and it runs on all of those surfaces too. Connected to your apps, Claude can work with your files and services to accomplish complex tasks on your behalf.
This guide walks you through the easiest and most secure way to connect your DefiLlama account to Claude via Composio Connect, enabling it to compare Ethereum and Solana protocol TVL, track Bitcoin and Ethereum token prices, find highest-yield stablecoin pools today, and more such actions on your behalf without compromising your account security.
Setup is the same on Claude Web, Desktop, and Cowork, and you only need to do it once. The connector is tied to your account, so it's available in all three.
For exact tool slugs and parameter tables, see the [tool catalog in the Composio docs](https://docs.composio.dev/toolkits/defillama).

## Also integrate DefiLlama with

- [ChatGPT](https://composio.dev/toolkits/defillama/framework/chatgpt)

## Connect DefiLlama to Claude Cowork

### Connecting DefiLlama to Claude Web, Desktop, and Cowork
Two ways to add the Composio connector. Pick whichever you prefer.
### 1. Add with one click
Click the button. Claude opens with the Composio connector filled in. Click Add, then go to step 2.
[Add to Claude](https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Composio&connectorUrl=https%3A%2F%2Fconnect.composio.dev%2Fmcp)
### Add manually
In Claude Desktop, click Customize in the left sidebar, then select Connectors and click the + icon at the top.
Click Add custom connector and paste in the Composio MCP server URL:

```bash
https://connect.composio.dev/mcp
```

## What is the DefiLlama MCP server, and what's possible with it?

The DefiLlama MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to DefiLlama. It provides structured and secure access to DeFi market data, so your agent can compare protocol and chain TVL, track token prices, review stablecoin markets, and analyze DeFi activity metrics on your behalf.
- Protocol and chain TVL analysis: Have your agent list protocols and chains, compare current TVL, review historical TVL changes, and inspect a protocol's chain breakdown.
- Token price tracking: Instruct your agent to retrieve current or historical prices, create price charts, calculate percentage changes, and compare multiple tokens across selected time periods.
- Stablecoin market monitoring: Let the agent review stablecoins, chain-level market capitalization, balance history, price history, and the current distribution of a stablecoin across chains.
- DeFi activity metrics: Direct your agent to analyze DEX volume, fees, revenue, open interest, and options volume globally, by chain, or for a specific protocol.
- Blockchain time and market context: Have your agent find the closest block for a chain and timestamp, then combine that context with protocol, token, or stablecoin data for historical analysis.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `DEFILLAMA_GET_BATCH_HISTORICAL_TOKEN_PRICES` | Get Batch Historical Token Prices | Get prices for multiple token identifiers at multiple requested Unix timestamps in one call. |
| `DEFILLAMA_GET_BLOCK_BY_TIMESTAMP` | Get Block By Timestamp | Get the closest block height on a chain for a Unix timestamp. |
| `DEFILLAMA_GET_CURRENT_TOKEN_PRICES` | Get Current Token Prices | Get current USD prices and available confidence scores for comma-separated chain:address or coingecko:id tokens. |
| `DEFILLAMA_GET_FIRST_TOKEN_PRICES` | Get First Token Prices | Get the earliest available price record for one or more token identifiers. |
| `DEFILLAMA_GET_HISTORICAL_TOKEN_PRICES` | Get Historical Token Prices | Get token prices nearest one Unix timestamp for comma-separated token identifiers. |
| `DEFILLAMA_GET_HISTORICAL_TVL` | Get Historical TVL | Return a bounded window of historical DeFi TVL across all chains or for one chain, excluding liquid staking and double-counted TVL. |
| `DEFILLAMA_GET_METRIC_OVERVIEW` | Get Metric Overview | Get global or per-chain DEX volume, fees/revenue, open interest, or options volume totals, windowed protocol rankings, and optional historical charts. |
| `DEFILLAMA_GET_PROTOCOL` | Get Protocol | Get a protocol's profile, current TVL by chain, and windowed historical TVL and token breakdowns. Use chain_filter to select a chain-specific history source; omit it for aggregate history. |
| `DEFILLAMA_GET_PROTOCOL_CURRENT_TVL` | Get Protocol Current TVL | Get the current total value locked in USD for one protocol. |
| `DEFILLAMA_GET_PROTOCOL_METRIC_SUMMARY` | Get Protocol Metric Summary | Get one protocol's metadata, historical charts, and totals for the selected DEX volume, fees/revenue, or options volume metric. |
| `DEFILLAMA_GET_STABLECOIN` | Get Stablecoin | Get one stablecoin's metadata, current balances by chain, and a bounded window of aggregate or chain-specific balance history. Use chain_filter to select a chain series; omit it for aggregate history. |
| `DEFILLAMA_GET_STABLECOIN_PRICE_HISTORY` | Get Stablecoin Price History | Get historical prices for all tracked stablecoins. DefiLlama returns the full series upstream; this tool returns a bounded local window that can be continued with next_offset. |
| `DEFILLAMA_GET_STABLECOINS_CHART` | Get Stablecoins Chart | Get windowed historical stablecoin market capitalization across all chains or for one chain, optionally filtered to one stablecoin ID. |
| `DEFILLAMA_GET_TOKEN_PRICE_CHART` | Get Token Price Chart | Get bounded windows of regular-interval price series for one or more token identifiers over the requested time range. |
| `DEFILLAMA_GET_TOKEN_PRICE_PERCENTAGE_CHANGE` | Get Token Price Percentage Change | Get percentage price changes for token identifiers over a requested period before or after a timestamp. |
| `DEFILLAMA_LIST_CHAINS_TVL` | List Chains TVL | List supported chains with current TVL and native-token identifiers in a bounded local window that can be continued with next_offset. |
| `DEFILLAMA_LIST_PROTOCOLS` | List Protocols | List DeFi protocols with identifiers, categories, chains, current TVL, and recent TVL changes. DefiLlama returns the full collection upstream; this tool returns a bounded local window that can be continued with next_offset. |
| `DEFILLAMA_LIST_STABLECOIN_CHAINS` | List Stablecoin Chains | List chains with current aggregate stablecoin market capitalization in a bounded local window that can be continued with next_offset. |
| `DEFILLAMA_LIST_STABLECOINS` | List Stablecoins | List stablecoins with IDs, peg metadata, circulating amounts, and optional current prices. DefiLlama returns the full collection upstream; this tool returns a bounded local window that can be continued with next_offset. |

## Supported Triggers

None listed.

## Troubleshooting

### 1. Why does Claude not use the Composio connector for DefiLlama?

The connector can show as connected, but Claude must use it in each DefiLlama conversation.
- Click + at the lower left of the chat, or type /.
- Hover Connectors.
- Turn on Composio.
- Ask Claude to connect to DefiLlama again.

### 2. Why does Claude show an MCP server error before DefiLlama connects?

Claude can show Couldn't reach the MCP server or Authorization with the MCP server failed when you add the connector for DefiLlama.
- Check that the connector URL is https://connect.composio.dev/mcp.
- Connectors run from Anthropic's cloud, so your device network is usually not the problem.
- Add the connector again from Customize > Connectors, then ask Claude to connect DefiLlama.
- If it fails again, send the error and the ofid_ reference id to support@composio.dev.

### 3. Why does the DefiLlama authorization link not work?

The Composio connector is one server. Your DefiLlama account connects separately when Claude asks for it.
- If the browser does not open, or the link expires, ask Claude to retry the DefiLlama connection.
- Composio creates a fresh DefiLlama authorization link.
- Open that link in your browser and finish the DefiLlama sign-in.

### 4. Why do DefiLlama actions fail after they worked before?

The DefiLlama connection can expire or lose permission.
- Ask Claude to inspect the DefiLlama connection.
- If the connection is unhealthy, disconnect it when Claude prompts you.
- Reconnect the DefiLlama account and retry the action.
- If Claude shows a permission prompt, approve it before Claude changes data in DefiLlama.
- If the action still fails with a permission error, check that the connected account has that permission in DefiLlama itself.

### 5. How do I switch to a different DefiLlama account?

Claude can manage the DefiLlama connection for you.
- Ask Claude to disconnect or delete the current DefiLlama account.
- Ask Claude to connect DefiLlama again.
- Open the new Composio authorization link for DefiLlama.
- Sign in with the other DefiLlama account in the browser.
- After the account connects, ask Claude to retry the DefiLlama task.

### 6. Why is my DefiLlama connection missing in Claude Desktop or on a Team plan?

The connector belongs to your Claude account, so your DefiLlama connection works in Claude Web, Desktop, and Cowork.
- In Claude Desktop, open Customize > Connectors.
- Next to Composio, click ⋮ and click Clear cache.
- If DefiLlama tools still do not appear, click ⋮, disconnect, remove the connector, and add it again.
- On Team or Enterprise, an Owner or Primary Owner must enable the connector before you can connect DefiLlama.

## Creating MCP Server - Stand-alone vs Composio SDK

The DefiLlama MCP server connects Claude Web, Desktop, and Cowork to your DefiLlama account through Composio. Once connected, Claude can use the available DefiLlama tools and triggers to complete tasks on your behalf.

## Complete Code

None listed.

## How to build DefiLlama MCP Agent with another framework

- [ChatGPT](https://composio.dev/toolkits/defillama/framework/chatgpt)

## Related Toolkits

- [Firecrawl](https://composio.dev/toolkits/firecrawl) - Firecrawl automates large-scale web crawling and data extraction. It helps organizations efficiently gather, index, and analyze content from online sources.
- [Tavily](https://composio.dev/toolkits/tavily) - Tavily offers powerful search and data retrieval from documents, databases, and the web. It helps teams locate and filter information instantly, saving hours on research.
- [Exa](https://composio.dev/toolkits/exa) - Exa is a data extraction and search platform for gathering and analyzing information from websites, APIs, or databases. It helps teams quickly surface insights and automate data-driven workflows.
- [Serpapi](https://composio.dev/toolkits/serpapi) - SerpApi is a real-time API for structured search engine results. It lets you automate SERP data collection, parsing, and analysis for SEO and research.
- [Excel](https://composio.dev/toolkits/excel) - Microsoft Excel is a robust spreadsheet application for organizing, analyzing, and visualizing data. It's the go-to tool for calculations, reporting, and flexible data management.
- [Peopledatalabs](https://composio.dev/toolkits/peopledatalabs) - Peopledatalabs delivers B2B data enrichment and identity resolution APIs. Supercharge your apps with accurate, up-to-date business and contact data.
- [Snowflake](https://composio.dev/toolkits/snowflake) - Snowflake is a cloud data warehouse built for elastic scaling, secure data sharing, and fast SQL analytics across major clouds.
- [Posthog](https://composio.dev/toolkits/posthog) - PostHog is an open-source analytics platform for tracking user interactions and product metrics. It helps teams refine features, analyze funnels, and reduce churn with actionable insights.
- [21risk](https://composio.dev/toolkits/_21risk) - 21RISK is a web app built for easy checklist, audit, and compliance management. It streamlines risk processes so teams can focus on what matters.
- [0xArchive](https://composio.dev/toolkits/0xarchive) - 0xArchive is a crypto data service for historical and current market data, quality signals, feedback, and webhooks. It helps teams access reliable crypto data and manage REST integrations from one API.
- [0xArchive MCP](https://composio.dev/toolkits/0xarchive_mcp) - 0xArchive MCP is a crypto market data service for Hyperliquid, HIP-3, HIP-4, spot, and Lighter markets. It combines historical and live data with quality checks and webhook management.
- [21RISK MCP](https://composio.dev/toolkits/_21risk_mcp) - 21RISK MCP is a hosted MCP server for 21RISK checklists, audits, risks, and actions. It provides a simple, secure way to access 21RISK tools and documentation.
- [Abstract](https://composio.dev/toolkits/abstract) - Abstract provides a suite of APIs for automating data validation and enrichment tasks. It helps developers streamline workflows and ensure data quality with minimal effort.
- [AccuWeather](https://composio.dev/toolkits/accu_weather) - AccuWeather is a global weather service providing current conditions, forecasts, MinuteCast precipitation, alerts, and lightning data. Use it for fast, localized forecasts and real-time weather alerts.
- [Adafruit IO](https://composio.dev/toolkits/adafruit_io) - Adafruit IO is Adafruit's cloud platform for connected device and IoT project data. It helps you store, visualize, and act on sensor feeds without running your own backend.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agentql](https://composio.dev/toolkits/agentql) - Agentql is a toolkit that connects AI agents to the web using a specialized query language. It enables structured web interaction and data extraction for smarter automations.
- [Agenty](https://composio.dev/toolkits/agenty) - Agenty is a web scraping and automation platform for extracting data and automating browser tasks—no coding needed. It streamlines data collection, monitoring, and repetitive online actions.
- [Ahrefs MCP](https://composio.dev/toolkits/ahrefs_mcp) - Ahrefs MCP is Ahrefs' hosted MCP server for SEO data and insights. Use it to access backlinks, organic metrics, keyword research, and competitor analysis.
- [Akta](https://composio.dev/toolkits/akta) - Akta is a company intelligence platform providing enrichment, news, and alternative business signals. It helps teams build targeted company lists and enrich data-driven workflows.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and DefiLlama MCP?

With a standalone DefiLlama MCP server, the agents and LLMs can only access a fixed set of DefiLlama tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from DefiLlama and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Claude Cowork?

Yes, you can. Claude Cowork fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right DefiLlama tools.

### Can I manage the permissions and scopes for DefiLlama while using Tool Router?

Yes, absolutely. You can configure which DefiLlama scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your DefiLlama data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
