MCP Endpoint

DeFiMind, inside your AI client.

A Model Context Protocol endpoint exposing five live Uniswap V2/V3 LP-analysis tools. Connect from Claude, Cursor, or any MCP-compatible client, then ask in plain language or call the tools directly — the analytics are exact AMM math, powered by open-source defipy.

Endpoint · streamable-HTTP · authless
https://mcp.defimind.ai/mcp
Install

Connect in one step.

Authless — no account, no API key. You supply an Ethereum RPC URL per call (bring-your-own-RPC); nothing is stored or logged.

Claude Code

claude mcp add --transport http defimind https://mcp.defimind.ai/mcp

Claude Desktop

Settings → Connectors → Add custom connector, using the endpoint URL above.

Cursor

Settings → MCP → Add new MCP server. Name defimind, type http, URL the endpoint above.

Quickstart

A first call.

Once connected, ask a natural-language question and the agent picks the tool and fills the arguments — or call a tool directly with an arguments object like this:

Tool call — CheckPoolHealth on a mainnet V3 pool

{
  "name": "CheckPoolHealth",
  "arguments": {
    "pool_address": "0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640",
    "rpc_url": "https://ethereum-rpc.publicnode.com",
    "pool_type": "uniswap_v3"
  }
}

Response (abridged)

{
  "version": "V3",
  "spot_price": 0.000414,
  "tvl_in_token0": 241360294.59,
  "tvl_in_token1": 143584.31,
  "num_lps": 1,
  "fee_pips": 500,
  "tick_current": -74265,
  "has_activity": false
}

The rpc_urlabove is a public node for trying it out — use your own provider (Alchemy, Infura, etc.) for production. It is read once, server-side, and never persisted.

API reference

Common parameters.

Every tool accepts these. Tool-specific parameters are listed under each tool below.

pool_addressstringrequired

On-chain address of the Uniswap pool/pair. Lowercase, uppercase, or checksum casing all accepted.

rpc_urlstringrequired

An Ethereum (or L2) JSON-RPC URL used to read live pool state. You supply it per call; it is never stored or logged.

pool_type"uniswap_v2" | "uniswap_v3"required

Which Uniswap protocol the address belongs to.

chain_idinteger

Optional guard. If supplied and the RPC reports a different chain, the call is rejected.

block_numberinteger

Optional. Pin the read to a historical block. Omit to read the latest block.

AnalyzePosition

V2 · V3

Decompose an LP position's PnL into impermanent loss, accumulated fees, and net result, measured against the entry basis you provide.

Analyze my position in this Uniswap V3 USDC/ETH pool.

Parameters
lp_init_amtnumberrequired

LP tokens held by the position, in human units.

entry_x_amtnumberrequired

Amount of token0 deposited at entry.

entry_y_amtnumberrequired

Amount of token1 deposited at entry.

lwr_tickintegerV3 only

Lower tick of the position range. Omit for full range / V2.

upr_tickintegerV3 only

Upper tick of the position range. Omit for full range / V2.

holding_period_daysnumber

Optional. If supplied, real_apr is annualized from net PnL.

Returns
net_pnlnumber

current_value − hold_value, in token0 numeraire.

il_percentagenumber

Pure price-divergence impermanent loss (fraction).

fee_incomenumber

Isolated fee component, in token0 numeraire.

real_aprnumber | null

Annualized net return (null unless holding_period_days given).

diagnosisstring

"net_positive" | "fee_compensated" | "il_dominant".

SimulatePriceMove

V2 · V3

Project a position's value at a hypothetical price change from the current pool state. Size-invariant paper value; fee income is not modeled.

If ETH drops 30%, what happens to my V3 position?

Parameters
price_change_pctnumberrequired

Fractional change from current price; must be > −1.0. e.g. −0.30 = a 30% drop.

position_size_lpnumberrequired

LP tokens held, in human units; must be > 0.

lwr_tickintegerV3 only

Lower tick of the position range.

upr_tickintegerV3 only

Upper tick of the position range.

Returns
new_valuenumber

Position value at the simulated price (token0 numeraire).

il_at_new_pricenumber

Impermanent loss at the simulated price (fraction, ≤ 0).

value_change_pctnumber

Fractional change in position value from current.

new_price_rationumber

Alpha = new_price / current_price.

fee_projectionnull

Always null — fee projection is out of scope for this tool.

CheckPoolHealth

V2 · V3

Pool-level snapshot: TVL, reserves, spot price, LP concentration, fee tier, and activity. Answers “would I deposit into this pool?” at the pool level.

Is this V3 pool healthy?

Parameters
recent_windowintegerV2 only

Rolling window (swap count) for fee_accrual_rate_recent. Default 20; ignored on V3.

Returns
tvl_in_token0 / tvl_in_token1number

Total value locked in each token numeraire.

reserve0 / reserve1number

Decimal-adjusted reserves.

spot_pricenumber

Current price of token0 in token1 terms.

num_lps / top_lp_share_pctinteger / number

LP count and the top LP's share.

fee_pips / tick_currentinteger | nullV3 only

Fee tier (pips) and current tick; null on V2.

num_swaps / fee_accrual_rate_recentinteger | nullV2 only

Swap count and recent fee rate; null on V3.

DetectRugSignals

V2 · V3

Threshold-based rug-pull screen composed over pool health: suspiciously low TVL, top-LP concentration, and inactive-pool-with-liquidity.

Any rug signals on this V2 pair?

Parameters
lp_concentration_thresholdnumber

Top-LP share that trips the concentration flag. (0, 1]; default 0.90; pass 1.0 to disable.

tvl_floornumber

Minimum acceptable TVL in token0; values at/below fire the low-TVL flag. Default 10.0 — override per pair.

Returns
risk_levelstring

"low" | "medium" | "high" | "critical" (count-based bucket).

signals_detectedinteger

Count of fired signals (0–3).

tvl_suspiciously_lowboolean

TVL below the floor.

single_sided_concentrationboolean

One LP owns a dominant share.

inactive_with_liquiditybooleanV2 only

Liquidity present but no swap activity. Always false on V3.

detailsstring[]

Human-readable lines explaining which signals fired.

CalculateSlippage

V2 · V3

Slippage and price-impact decomposition for a proposed swap: spot vs execution price, slippage %, cost, and (V2) the max trade within 1% slippage.

How much slippage on a 50,000 USDC buy here?

Parameters
amount_innumberrequired

Amount of token_in to trade, in human units; must be > 0.

token_in_namestringrequired

Symbol of the input token (e.g. "USDC", "WETH") — must match one of the pool's two tokens.

lwr_tickintegerV3 only

Lower tick of the active range.

upr_tickintegerV3 only

Upper tick of the active range.

Returns
slippage_pctnumber

Slippage as a fraction of spot.

price_impact_pctnumber

Price impact of the trade.

spot_price / execution_pricenumber

Pre-trade spot and realized execution price.

slippage_costnumber

Cost in output-token units.

max_size_at_1pctnumber | nullV2 only

Largest trade staying within 1% slippage; null on V3.

Balancer and Curve-style Stableswap tools arrive in v0.2 once defipy ships their live providers.

Usage notes

Things worth knowing.

Bring your own RPC

Any Ethereum or L2 JSON-RPC works (Alchemy, Infura, public nodes). Passed per call, read once server-side, never stored or logged — it is redacted from every receipt.

chain_id guard

Supply chain_idto have the call rejected if your RPC points at a different chain than the pool — catches a wrong-network RPC before it returns junk.

V3 ticks & liquidity

The twin is built from the pool’s full-range active liquidity. lwr_tick/upr_tick describe your positionrange and feed the concentrated-liquidity IL math — they don’t re-scope the pool snapshot.

Read-only

Analytics only — the endpoint never signs or sends transactions. Some fields are protocol-specific (marked V2 only / V3 only above) and return null on the other.

Errors

Structured, never silent.

Bad input or an unreachable RPC returns a clear error message (your RPC URL is scrubbed from it), not a crash or empty result.

BadPoolType

pool_type is not uniswap_v2 or uniswap_v3.

MissingArgument

pool_address, rpc_url, or pool_type was omitted.

ChainMismatch

Declared chain_id ≠ the chain the RPC reports.

Error reading pool

RPC unreachable, or the address isn't a contract on that chain.

Token not found

token_in_name doesn't match either pool token (the error lists the available symbols).

How it works

The math is open. The reports are paid.

Each call reads live Uniswap V2/V3 pool state through your RPC, builds a stateless twin, runs a closed-form AMM primitive, and returns a typed result. Nothing is cached between calls.

The analytics are powered by the open-source defipy library and its State Twin substrate — the same methodology behind DeFiMind’s paid reports. The library is open and verifiable; this endpoint is the free, self-serve surface.