Skip to main content
Glama
DeFi Intelligence Engine

DeFi Intelligence Engine

DeFi Intelligence Engine — MCP Server

A Model Context Protocol (MCP) server providing complete DeFi intelligence — Yield, Liquid Staking, Restaking, RWA, Perpetuals, Gas Optimization, and Smart Contract Security. Risk-adjusted single recommendations with reasoning, 97% fewer tokens than raw data.

Built with the MCP SDK (FastMCP) · Transport: streamable-http · Compatible with Claude Desktop, Claude Code, OpenClaw, Cursor, Windsurf, and any MCP-compatible client.


MCP Tools (paid · 0.05 USDC via x402 on Base)

Tool

Description

get_best_yield

Best yield for USDC, USDT, ETH across 548 protocols

get_optimal_allocation

Multi-protocol capital split for max risk-adjusted yield

explain_risk

9-signal risk breakdown for any DeFiLlama protocol

compare_yields

Side-by-side protocol comparison

get_best_liquid_staking

Best LST for ETH, SOL, BNB (Lido, Rocket Pool, Jito...)

get_best_restaking

Best restaking/LRT (EigenLayer, Ether.fi, Renzo, Puffer)

get_best_rwa

Best Real World Asset protocol (Ondo, BUIDL, Maple, Centrifuge)

get_perps_overview

Top perps by 24h volume (Hyperliquid, dYdX, GMX, Drift)

compare_perps

Side-by-side perpetuals comparison

get_optimal_gas_window

Predict best time window to transact for minimum gas cost

score_contract

Smart contract security risk score via GoPlus Security API

Related MCP server: YieldOracle

MCP Tools (free)

Tool

Description

get_gas_price

Current gas prices (safe/standard/fast) for any EVM chain

get_defi_overview

Full DeFi market snapshot across all categories

yield_alert_set

Register APY threshold alert

yield_alert_check

Poll alert triggered/watching status

yield_alert_delete

Remove an alert by ID

yield_alerts_list

List all active alerts

server_info

Server metadata, all tools, resources, pricing

MCP Resources (free)

URI

Description

defi://market-overview

Real-time top yields snapshot (~168 tokens)

defi://risk-glossary

Risk term definitions for output interpretation

MCP Prompts (free)

Prompt

Usage

/yield-check

Find best yield for asset + amount

/portfolio-optimize

Optimize multi-asset DeFi allocation

/daily-briefing

Morning yield market summary

/yield-watch

Monitor APY threshold + act on trigger


Installation — Claude Desktop

{
  "mcpServers": {
    "defi-intelligence-engine": {
      "url": "https://defi-yield-engine-production.up.railway.app/mcp"
    }
  }
}

Installation — Any MCP Client

MCP Server URL : https://defi-yield-engine-production.up.railway.app/mcp
Transport      : streamable-http
Protocol       : Model Context Protocol (MCP)

Payment — x402 Protocol

Paid tools require 0.05 USDC per call on Base. No signup, no API key.

Recipient : 0x74E3ab71eC674D343aD481Ea20F489C720C11Ad4
Network   : Base (chain 8453)
Asset     : USDC
Protocol  : x402

Discovery Endpoints

Endpoint

Description

/.well-known/x402.json

x402 payment manifest (Coinbase Bazaar)

/.well-known/agent.json

A2A Agent Card (Google A2A Protocol)

/health

Health check + x402 status


Data Sources

  • DeFiLlama — 13,800+ pools, 7,000+ protocols, 500+ chains (yield, staking, RWA, perps)

  • Etherscan Gas Oracle — real-time gas prices + pattern-based prediction

  • GoPlus Security API — smart contract honeypot + risk detection

No API keys required · No user data stored · Cache: 1-5 min


Tech Stack

  • MCP SDK: FastMCP (Python)

  • Transport: Streamable HTTP (MCP standard)

  • Payment: x402 (USDC on Base)

  • Hosting: Railway

Available Tools

17 tools
compare_perpsB

Compare perpetuals protocols side-by-side by volume and activity.

Inputs: protocols (required). Returns: object

compare_yieldsB

Comparaison side-by-side risk-ajustée de plusieurs protocoles.

Inputs: asset (required), protocols (required), chain. Returns: object

explain_riskC

Analyse détaillée du risque d'un protocole spécifique pour un asset.

Inputs: protocol (required), asset (required), chain. Returns: object

get_best_liquid_stakingA

Select the best liquid staking protocol for a given asset and risk profile.

Scores protocols by TVL, audit count, age, and momentum. Returns one recommendation with reasoning and top alternatives. Covers: Lido, Rocket Pool, Coinbase cbETH, Jito, Marinade, and 50+ others.

Use this when: an agent needs to stake an asset while keeping it liquid. Do NOT use for: yield farming (use get_best_yield), restaking (use get_best_restaking).

Inputs: asset, risk_profile, chain. Returns: object

get_best_restakingA

Select the best restaking protocol by TVL and risk profile.

Covers base restaking (EigenLayer, Symbiotic, Karak) and liquid restaking tokens (EtherFi, Renzo, Puffer, Kelp). Scored by TVL, audits, and age.

Use this when: an agent wants to restake ETH or LSTs for additional yield. Do NOT use for: simple staking (use get_best_liquid_staking).

Inputs: risk_profile, restaking_type. Returns: object

get_best_rwaA

Select the best Real World Asset (RWA) protocol by TVL and risk profile.

Covers tokenized T-bills (Ondo USDY, BlackRock BUIDL), private credit (Maple, Centrifuge), and real estate protocols. Scored by TVL, audits, age.

Use this when: an agent needs stable off-chain backed yield. Do NOT use for: on-chain DeFi yields (use get_best_yield).

Inputs: risk_profile, rwa_type. Returns: object

get_best_yieldA

Select the single best DeFi yield opportunity for a given asset and risk profile.

Scores 13,800+ pools across 548 protocols and 115 chains using a 9-signal risk algorithm (TVL, APY stability, reward dependency, outlier flag, momentum). Returns ONE opinionated recommendation with reasoning + 2 alternatives. Output: ~60 tokens — 97% smaller than raw DeFiLlama data.

Use this when: an agent needs to deploy capital and wants a single actionable answer, not a list to evaluate manually. Do NOT use for: protocol comparison (use compare_yields), risk detail (use explain_risk).

Inputs: asset (required), amount_usd (required), risk_profile, chain. Returns: object

get_defi_overviewA

Complete DeFi market snapshot across all categories. FREE.

Returns top protocol per category: Yield, Liquid Staking, Restaking, RWA, and Perps top-3. Ideal first call for agents needing market context before deciding which category to explore deeper.

Use this as a starting point before calling category-specific tools. This call is FREE — use it to decide which paid tool to call next.

Returns: JSON with market leaders per category + TVL + quick stats.

Inputs: no named parameters. Returns: object

get_gas_priceA

Get current gas prices across urgency levels for a given chain. FREE.

Returns safe/standard/fast gas prices in Gwei with USD cost estimate for a standard ERC-20 transfer (21,000 gas).

Use this when: an agent needs current gas cost before executing a transaction. Follow with get_optimal_gas_window to decide whether to wait.

Inputs: chain. Returns: object

get_optimal_allocationA

Split capital optimally across multiple DeFi protocols for maximum risk-adjusted yield.

Unlike get_best_yield (one protocol), this tool returns a weighted multi-protocol allocation that maximizes APY while respecting TVL constraints and risk limits. Ideal for amounts >$10,000 where diversification improves risk-adjusted returns.

Use this when: an agent needs to deploy capital across multiple protocols. Do NOT use for: single-protocol analysis (use get_best_yield or explain_risk).

Inputs: asset (required), total_amount_usd (required), risk_profile, max_protocols, +1 more. Returns: object

get_optimal_gas_windowA

Predict the best time window to execute transactions for minimum gas cost.

Uses historical Ethereum gas patterns (hourly + day-of-week multipliers) to identify upcoming low-gas windows. Typical savings: 25-45% vs peak hours.

Best windows: 3-7 AM UTC (daily low) and weekends (-20 to -25%).

Use this when: an agent can defer a non-urgent transaction to save on gas. Combine with get_gas_price for current baseline.

Inputs: chain, urgency, horizon_hours. Returns: object

get_perps_overviewA

Get top perpetuals/derivatives protocols ranked by 24h volume.

Covers Hyperliquid, dYdX, GMX, Drift, Jupiter Perps, and 50+ others. Returns volume, open interest, and market share for each protocol.

Use this when: an agent needs derivatives market intelligence. Do NOT use for: spot DEX (use DeFiLlama DEX endpoints), yield (use get_best_yield).

Inputs: chain, top_n. Returns: object

score_contractA

Score a smart contract for security risks using GoPlus Security API.

Checks for: honeypot detection, buy/sell tax, ownership risks, proxy patterns, trading cooldowns, blacklist functions, mint capabilities, and liquidity risks.

Risk score 0-100 (100 = safest). Covers tokens and general contracts.

Use this when: an agent is about to interact with an unknown contract or token. Do NOT use for: known safe protocols (use explain_risk for Aave/Morpho/etc.).

Inputs: contract_address (required), chain. Returns: object

yield_alert_checkA

Poll a yield alert status. FREE. Safe to call frequently — uses cached data.

Returns current status (triggered/watching), current best APY vs threshold, and full recommendation if triggered.

Inputs: alert_id (required). Returns: object

yield_alert_deleteB

Delete a yield alert by ID. FREE.

Inputs: alert_id (required). Returns: object

yield_alert_setA

Register an APY threshold alert. Returns alert_id to check later. FREE.

Fires when get_best_yield finds an opportunity exceeding threshold_apy. Use yield_alert_check with alert_id to poll status. Use yield_alert_delete to remove. Alerts persist in server memory.

Use this when: an agent wants to be notified when a yield opportunity opens without continuously calling get_best_yield.

Inputs: asset (required), threshold_apy (required), risk_profile, chain. Returns: object

yield_alerts_listA

List all active yield alerts. Useful for agents managing multiple positions. FREE.

Returns: JSON with all alerts, their status, and age in seconds.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool targets a distinct category or action (e.g., best yield, gas price, contract scoring, alerts). The get_best_* series clearly differentiate by asset/protocol type, and comparison tools are separated by domain. Descriptions include usage notes to avoid confusion.

    Naming Consistency5/5

    All tool names follow snake_case with a consistent verb_noun pattern (compare_, explain_, get_, score_, yield_alert_). The get_best_ prefix is used uniformly for recommendations, and alert tools share a yield_alert_ prefix, creating a clear and predictable naming scheme.

    Tool Count5/5

    With 17 tools covering yield, staking, restaking, RWA, perps, gas, allocation, alerts, and security, the count is well-scoped for a DeFi intelligence server. Each tool serves a distinct purpose without redundancy, and the count is neither too few nor too many for the domain.

    Completeness4/5

    The tool surface covers core DeFi intelligence needs: best picks, comparisons, risk analysis, gas optimization, allocation, and alerts. Minor gaps include lack of comparison tools for liquid staking and restaking, and no direct endpoint for detailed single-protocol data beyond recommendations. Overall, it's comprehensive but not exhaustive.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers