drio
Open app

MCP Server for DefiLlama

Source

Catalog onlyCatalog onlySTDIO

Overview

MCP Server for DefiLlama is a Model Context Protocol server that provides access to DeFi data through the DefiLlama API, enabling users to retrieve various financial metrics related to decentralized finance.

To use the MCP Server, clone the repository from GitHub, install the necessary dependencies, build the project, and start the server using npm commands.

  • Access to a comprehensive list of DeFi protocols tracked by DefiLlama. - Retrieval of Total Value Locked (TVL) data for specific protocols and chains. - Current and historical token price data. - Information on stablecoins and their respective data.
  1. Analyzing the performance of various DeFi protocols.
  2. Monitoring TVL changes across different chains.
  3. Fetching real-time and historical token prices for investment analysis.
  4. Researching stablecoin metrics for financial insights.

Add to your AI client

Use these steps to connect MCP Server for DefiLlama in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-defillama-dcspark": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-defillama-dcspark"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-server-defillama-dcspark": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-defillama-dcspark"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-server-defillama-dcspark": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-defillama-dcspark"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-server-defillama-dcspark": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-defillama-dcspark"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-server-defillama-dcspark": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-defillama-dcspark"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-server-defillama-dcspark": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-server-defillama-dcspark"
      ]
    }
  }
}

FAQ

What is the purpose of the MCP Server?

The MCP Server allows users to access and analyze DeFi data efficiently through the DefiLlama API.

Is there any cost associated with using the MCP Server?

No, the MCP Server is open-source and free to use under the MIT license.

What technologies are used in the MCP Server?

The MCP Server is built using TypeScript and follows standard npm practices for setup and deployment.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2257,"uuid":"e56ae249-5d26-48f2-9d8b-715c53287f00","name":"mcp-server-defillama","title":"MCP Server for DefiLlama","description":"","avatar_url":"https://avatars.githubusercontent.com/u/75200801?v=4","created_at":"2025-03-09T06:54:55.760Z","updated_at":"2025-03-12T10:20:54.464Z","status":"created","author_name":"dcSpark","author_avatar_url":"https://avatars.githubusercontent.com/u/75200801?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/dcSpark/mcp-server-defillama","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"1\",\"license\":\"MIT license\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-17 19:20:46\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]