MCP.Market

Defi MCP server

by matiosera3-ops·io.github.matiosera3-ops/defi-mcp·v0.1.6·1 stars

AI agent access to on-chain DeFi data on Polygon & Arbitrum: balances, positions, prices.

C69/100grade C
What users say
No reviews yet
Be the first
Safety scan
C69/100

full report

Adoption
New

1 stars29 downloads/wk

Reviews

Write one

Nobody has reviewed Defi yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Defi tools (5)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • get_aave_position

    Get a user's Aave v3 lending/borrowing position on a given chain.

  • get_token_balance

    Get the balance of an ERC-20 token for a given wallet address.

  • get_token_price

    Get the current USD price of a token from a Chainlink price feed.

  • hello

    Say hello to someone. Use this to test the MCP server is working.

  • simulate_swap

    Simulate a Uniswap v3 swap on Polygon or Arbitrum without submitting a transaction.

Public scan report

scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it

no findings
  • Code scan12 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 94 days ago8/15
  • Maintainer identityregistry namespace matches repository owner6/10
Overall 69/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Defi compares

Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
69/100
higher than 35% of 4,460 AI and agents servers
Tools
5
the typical AI and agents server has 6
Tools that change things
0%
typical: 0%. Fewer write tools means less an agent can break
GitHub stars
1
more than 50% of 2,711 AI and agents servers
Downloads a week
29
more than 15% of 1,538 AI and agents servers with a package

What its tools let an agent do: 5 read

Install Defi in Claude Code, Cursor or VS Code

claude mcp add defi-mcp -- uvx defi-mcp
Add to Cursor

What the publisher says

From the Defi repository's README, as published. We do not edit it. Read it on GitHub

defi-mcp

An MCP (Model Context Protocol) server that gives AI agents direct, on-chain access to DeFi data on EVM chains — wallet balances, Aave v3 lending positions, and live token prices, with no centralized API in the middle.

Status: Live and functional. 5 tools available today, more on the roadmap.

Why

Most "DeFi + AI" integrations route through a centralized API that can rate-limit, paywall, or simply disappear. defi-mcp talks directly to the chain (via your own RPC provider) and to first-party oracles (Chainlink), so the data your AI agent gets is exactly what's on-chain — verifiable, and not dependent on a third-party API staying online.

Tools

gettokenbalance

Reads the ERC-20 balance of any wallet address for a supported token.

Supported tokens:

  • Polygon: USDC, USDC.e, USDT, WETH, WMATIC, WBTC, DAI, AAVE
  • Arbitrum: USDC, USDC.e (bridged), USDT, WETH, WBTC, ARB
// get_token_balance(address="0x...", token_symbol="USDC", chain="polygon")
{
  "address": "0x...",
  "token": "USDC",
  "chain": "polygon",
  "balance": 268.21,
  "raw_balance": "268210000",
  "decimals": 6
}

getaaveposition

Reads a user's full Aave v3 lending/borrowing position: collateral, debt, available borrowing power, and health factor — straight from the Aave v3 Pool contract.

// get_aave_position(address="0x...", chain="polygon")
{
  "address": "0x...",
  "chain": "polygon",
  "total_collateral_usd": 969.78,
  "total_debt_usd": 288.16,
  "available_borrows_usd": 484.86,
  "liquidation_threshold_pct": 82.79,
  "ltv_pct": 79.71,
  "health_factor": 2.79,
  "has_active_position": true
}

A health_factor below 1.0 means the position is at risk of liquidation. A null health factor means the user has no outstanding debt.

gettokenprice

Reads the current USD price of a token directly from a Chainlink price feed — the same oracle DeFi protocols use internally, so the price is consistent with what getaaveposition reports.

Supported feeds:

  • Polygon: ETH/WETH, MATIC/WMATIC, WBTC, USDC, USDT
  • Arbitrum: ETH/WETH, WBTC, ARB, USDC, USDT
// get_token_price(token_symbol="WBTC", chain="polygon")
{
  "token": "WBTC",
  "chain": "polygon",
  "price_usd": 63835.77,
  "decimals": 8,
  "updated_at": 1782032816
}

simulate_swap

Simulates a Uniswap v3 swap on-chain via the QuoterV2 contract — no transaction submitted, no wallet needed. Tries all four fee tiers (0.01%, 0.05%, 0.3%, 1%) and returns the best available output amount.

Supported tokens:

  • Polygon: USDC, USDC.e, USDT, WETH, WMATIC, WBTC, DAI, AAVE
  • Arbitrum: USDC, USDC.e (bridged), USDT, WETH, WBTC, ARB
// simulate_swap(token_in="WMATIC", token_out="USDC", amount_in=100.0, chain="polygon")
{
  "chain": "polygon",
  "token_in": "WMATIC",
  "token_out": "USDC",
  "amount_in": 100.0,
  "amount_out": 7.990547,
  "fee_tier_used_pct": 0.05,
  "fee_tier_used_bps": 500,
  "gas_estimate": 122770
}

If no pool exists for the pair at any fee tier, returns {"error": "No liquidity found for this pair on any fee tier"}.

hello

Simple connectivity check — confirms the MCP server is reachable and responding.

Supported chains

Installation

Requires Python 3.10+ and an RPC provider API key (e.g. Alchemy, free tier works).

pip install defi-mcp

Create a .env file in your working directory (see .env.example):

POLYGON_RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/YOUR_API_KEY
ARBITRUM_RPC_URL=https://arb-mainnet.g.alchemy.com/v2/YOUR_API_KEY

Each chain only needs its RPC URL configured. Tools called with chain="arbitrum" will fail gracefully if ARBITRUMRPCURL is not set.

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Defi: common questions

Is Defi MCP server safe?
With care: it is graded C, so read the findings first (69/100). Read the Defi safety report
How do I install Defi?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Defi need an API key?
Yes. The registry entry asks for POLYGON_RPC_URL, ARBITRUM_RPC_URL.
Is Defi maintained?
The last commit was 133 days ago (2026-06-24). The latest release is v0.1.6.
What can I use instead of Defi?
Servers from other publishers that do the same job: Agent Sniper MCP server and Claude Prompts MCP server.
How does Defi compare with other AI and agents MCP servers?
safety score 69/100 (higher than 35% of 4,460 AI and agents servers); tools 5 (the typical AI and agents server has 6); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.

Alternatives to Defi

Same job from other publishers: the closest match first, then the best rated.

  • Agent Sniper
    Self-custodial pump.fun sniper: arm strategies, snipe, manage positions. Simulate by default.
    B
  • Claude Prompts
    Reusable prompt templates, multi-step workflow chains, and quality gates for any MCP client.
    A