About DeFi Quant Yield & Risk Engine
DeFi Quant Yield & Risk Engine is an MCP server for quantitative DeFi yield and pre-trade risk analysis. It serves AI agents comparing leveraged stablecoin strategies across six protocols, with simulations based on contract state rather than static historical snapshots.
Key features
- 01Seven yield and risk analysis tools
- 02Cross-protocol leveraged carry ROE
- 03Borrow-rate kink slippage simulation
- 04Ethena yield dilution modeling
- 05Fluid and Euler state decoding
- 06Pendle yield and swap analysis
Use cases
- 01Compare stablecoin yields and borrow costs
- 02Estimate borrow APY after a larger loan
- 03Model sUSDe dilution after deposits
- 04Assess Pendle yield and swap slippage
MCP support
Exposes seven DeFi yield, leveraged carry, and pre-trade risk simulation tools to MCP clients. Simulations cover Morpho Blue, Ethena, Fluid Protocol, Sky Protocol, Euler V2, and Pendle V2.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y defi-quant-mcp-serverRAPIDAPI_KEYSecretRapidAPI key for live on-chain RPC telemetry across Morpho, Ethena, Fluid, Sky, Euler V2, and Pendle V2.Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
7Saved tool list · updated today
| Parameter | Type | Required | Description |
|---|---|---|---|
| leverage | number | No | Target loop leverage multiplier (1 to 10, default: 5) |
Details
From the project READMEDeFi Quant MCP Server (defi-quant-mcp-server)
This repository contains the official open-source Model Context Protocol (MCP) server implementation for the DeFi Quant suite. Built with @modelcontextprotocol/sdk and Zod schema validation, it exposes 7 native DeFi yield, leveraged carry, and pre-trade risk simulation tools directly to AI agents (Claude Desktop, Cursor, Windsurf, and autonomous trading agents).
Unlike read-only DeFi wrappers that only return static historical snapshots, this MCP server performs pre-execution smart contract state simulations across Morpho Blue, Ethena (sUSDe), Fluid Protocol, Sky Protocol (sUSDS), Euler V2 (EVK/EVC), and Pendle V2.
Example AI Prompts This Server Solves
Once connected to Claude Desktop or Cursor, your AI agent can autonomously answer complex quantitative DeFi questions:
- Cross-Protocol Yield & Looping: "Where is the highest leveraged stablecoin carry right now between Ethena sUSDe and Sky sUSDS, and is it cheaper to borrow USDC on Morpho Blue, Fluid, or Euler V2 at 5x leverage?"
- Morpho Blue Kink Slippage: "What happens to the borrow APY on the Morpho wstETH/USDC market if I borrow an extra $2,000,000? Does it push utilization past the 90% AdaptiveCurveIRM kink?"
- Ethena Epoch Dilution: "How much unvested USDe is left in Ethena's current 8-hour epoch, and how much will the sUSDe APY drop if a whale deposits $25M right now?"
- Fluid Bit-Packed State: "Unpack the Fluid LiquidityLayer 256-bit storage slot for USDC and calculate post-trade utilization after a $2M borrow."
- Pendle V2 Fixed Yield & TWAP Divergence: "Compare Pendle's Spot Implied Fixed APY against the 15-minute PT Oracle TWAP, and simulate the implied yield slippage on a $1M PT swap."
- Euler V2 Vault & Sub-Account Audits: "Decode the uint16 supply/borrow caps on the Euler V2 Prime USDC vault and check active EVC sub-account bitmaps."
Native MCP Tools Included (7 Tools)
scan_stablecoin_yield_arbitrage_radar— Compares live stablecoin yields (sUSDe,sUSDS) against the cheapest USDC borrow rates (Morpho Blue,Fluid,Euler V2) and calculates net leveraged loop ROE and breakeven borrow spreads.simulate_morpho_blue_kink_slippage— Reads live Morpho Blue market state (borrowShares,totalSupplyAssets) and simulates post-trade borrow APY slippage across the 90%AdaptiveCurveIRMkink.simulate_ethena_susde_vesting_dilution— Queries EthenagetUnvestedAmount()linear 8-hour epoch decay and models post-deposit APY dilution.unpack_fluid_liquidity_layer_state— Unpacks Fluid Protocol's56|8BigMathbit-packed storage slots into human-readable supply/borrow liquidity, utilization, and post-trade rate impact.simulate_sky_susds_leveraged_carry— Computes continuous RAY ($10^{27}$) per-secondssr/chicompounding for SkysUSDSagainst Morpho USDC borrow costs.audit_euler_v2_vault_and_evc_subaccounts— Decodes Euler V2 compact floating-point mantissa/exponent caps, simulates IRM kink slippage, and scans EVC 256-bit XOR sub-accounts (0..3).analyze_pendle_v2_logit_curve_and_twap— Reads Pendle V2MarketStatelogit curve parameters (scalarRoot,lnFeeRateRoot), compares Spot Implied APY vs. PT Oracle TWAP, and simulates PT swap slippage.
Quick Start (Claude Desktop / Cursor Configuration)
- Grab a free API key from the DeFi Quant Multi-Protocol Yield & Risk API on RapidAPI (includes a Free $0/mo Basic Tier with 50 requests/month).
- Add the following block to your
claude_desktop_config.jsonor.cursor/mcp.json:
{
"mcpServers": {
"defi-quant": {
"command": "npx",
"args": ["-y", "defi-quant-mcp-server"],
"env": {
"RAPIDAPI_KEY": "YOUR_RAPIDAPI_KEY",
"RAPIDAPI_HOST": "defi-quant-multi-protocol-yield-risk-api.p.rapidapi.com"
}
}
}
}
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.