Skip to main content

DeFi Yields MCP

An MCP server for AI agents to explore DeFi yield opportunities, powered by DefiLlama.

Discord GitHub License Python Version Status

Features

  • Data Fetching Tool: The get_yield_pools tool retrieves DeFi yield pool data from the DefiLlama, allowing filtering by chain (e.g., Ethereum, Solana) or project (e.g., Lido, Aave).
  • Analysis Prompt: The analyze_yields prompt generates tailored instructions for AI agents to analyze yield pool data, focusing on key metrics like APY, 30-day mean APY, and predictions.
  • Packaged for Ease: Run the server directly with uvx defi-yields-mcp.

Installation

To use the server with Claude Desktop, you can either install it automatically or manually configure the Claude Desktop configuration file.

Option 1: Automatic Installation

Install the server for Claude Desktop:

uvx mcp install -m defi_yields_mcp --name "DeFi Yields Server"

Option 2: Manual Configuration

Locate the configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the server configuration:

{
 "mcpServers": {
   "defi-yields-mcp": {
     "command": "uvx",
     "args": [ "defi-yields-mcp" ]
   }
 }
}

Restart Claude Desktop.

Examples

You can use commands like:

  • "Fetch yield pools for the Lido project."
  • "Analyze yield pools on Ethereum."
  • "What are the 30-day mean APYs for Solana pools?"

The get_yield_pools tool fetches and filters the data, while the analyze_yields prompt guides the LLM to provide a detailed analysis.

Example Output

Running the get_yield_pools tool with a filter for Ethereum:

[
  {
    "chain": "Ethereum",
    "pool": "STETH",
    "project": "lido",
    "tvlUsd": 14804019222,
    "apy": 2.722,
    "apyMean30d": 3.00669,
    "predictions": {
        "predictedClass": "Stable/Up",
        "predictedProbability": 75,
        "binnedConfidence": 3      
    }
  },
  ...
]

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for defi-yields-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for defi-yields-mcp 0.1.0
File Size Uploaded
defi_yields_mcp-0.1.0.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for defi-yields-mcp 0.1.0
File Interpreter ABI Platform
defi_yields_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / defi_yields_mcp-0.1.0.tar.gz

Download URL defi_yields_mcp-0.1.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b96dbc300c5bd73fccc68b015630950624f72a04027d8f142cd4a1392f35fc58
BLAKE2b-256 checksum
How to use checksums
bedb5fa09b7bd6f965e792d5b145c93fff180cf02c0158c8c475adef709484f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release files / defi_yields_mcp-0.1.0-py3-none-any.whl

Download URL defi_yields_mcp-0.1.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3982ab6c23277040db4e19fb8312716e8b9fa83795fd067ddd0e22607909b314
BLAKE2b-256 checksum
How to use checksums
922969fc76385ca46cc4dcfaed3af2db900d545da89ca070fa988a541e8be666
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page