Onchain yield tools for any AI agent

Onchain yield tools for any AI agent

The vaults.fyi MCP server exposes 38 tools to any MCP-compatible client (Claude Desktop, Cursor, Cline, your own agent). With our MCP, an agent can query live data on 1500+ vaults across >20 networks, pull multi-year historical time series, find the best yields on a given asset, track positions, and build deposit and withdraw transactions.

This post covers what's in the MCP, what's distinctive about it relative to other DeFi yield MCPs, and how to connect.

Why MCP for yield

Two reasons... First, yield research is now plausibly a chat task. The questions a serious depositor asks ("what's the best 30-day USDC yield on Base with TVL over $25M and no active incidents?") map cleanly onto structured filters, and the answer is structured data. Pulling that data through a chat interface with a sidebar of tools is faster than navigating protocol UIs.

Second, AI agents are starting to transact onchain. If an agent is going to compare yields, propose a rebalance, build a deposit batch, and check status afterward, it needs the same data surface a human researcher uses, plus structured transaction building it can hand to a wallet. The MCP is the protocol that wires both ends.

The vaults.fyi MCP covers both. It surfaces the same data behind app.vaults.fyi and our REST API, with extra fields and decoding context that agents need to act on the data safely.

The tool surface

Thirty-eight tools, grouped by purpose:

Category Tools What it does
Discovery vaults_list, vaults_search, best_vault, best_deposit_options, networks, protocols, tags, assets, curators Find vaults by asset, network, curator, TVL, APY, or Reputation Score.
Vault detail vault_details, vault_apy, vault_tvl, rewards Get current data on a specific vault covering share price, APY, TVL, Reputation Score, warning flags, etc.
Time series vault_apy_history, vault_tvl_history, vault_share_price_history, vault_returns, vault_history, asset_price_history, benchmark_apy, benchmark_apy_history Daily (and hourly) history back to vault inception. Includes market-benchmark reference rates per network.
Wallet & portfolio positions, position_details, wallet_balances, token_balance, user_events A wallet's vault positions, idle token balances, full deposit/withdraw/claim history.
Transaction building build_vault_tx, withdraw_all_positions, build_claim_rewards, claim_all_rewards, approve_erc20, transfer_erc20, transfer_native, wrap_native, unwrap_native Build unsigned calldata for vault deposits, withdrawals, and reward claims, plus standalone ERC20 ops. Returns viem-compatible objects with decoded steps and signing instructions.
Submission transaction_context, submit_tx_hash, get_transaction_status Gas and nonce context, submit a signed tx hash, track confirmation.

Full schemas: https://docs.vaults.fyi/ai-agents/mcp-server.

You can query the same vault for various detail, depending on what you want: a quick spot APY via vault_apy, the full detail object via vault_details, a multi-window history via vault_apy_history, or details on an address's PnL via vault_returns. Agents pick the right tool for the question, and payloads stay small.

What's distinctive

A few capabilities don't show up in other yield MCPs:

Multi-window APY. 1-hour, 1-day, 7-day, and 30-day rolling averages on every vault, with base and reward decomposition. You can sort by 30-day APY, not just current. This gives you standardized yield metrics (net of fees) calculated from observed onchain data. Your analysis doesn't get skewed by rosy assumptions, TVL spikes, short-lived incentive campaigns, or other noise.

Curator-aware discovery. vaults.fyi indexes the major curated-vault ecosystems (Morpho, Midas, Veda, Upshift, Euler, and more) and you can filter or sort by curator name. So "the top USDC Steakhouse vault by 30-day APY" is a one-shot query, not a five-vault inspection loop.

Inline incident flags. Every vault payload includes a flags[] array with severity (info, warning, critical) and content. The Kelp rsETH exploit shows up not just on Kelp's vault but on every downstream Morpho vault holding rsETH, with a reputation-score penalty propagated. So "filter to vaults with no active warnings" is a parameter, not a separate research step.

Composite APY for yield-bearing assets. When the deposit asset is itself yield-bearing (sUSDe, sUSDS), the headline APY of the outer vault undercounts what the position actually earns. apyComposite surfaces the inner base yield plus rewards. For Aave v3 sUSDe, the flat reading is 0% APY; the composite is roughly 4% base plus Ethena points context. Agents reading the wrong field underweight these vaults.

Benchmark rates. Every supported network has a USD and ETH benchmark (TVL-weighted average APY across the five largest vaults in that denomination). benchmark_apy is the baseline a candidate vault might be measured against. We walk through benchmark data in our recent benchmarks post.

Decoding-aware transaction building. Built calldata returns as a viem-compatible unsignedTx object plus a stepDecodings array (e.g. fn: "ERC20 approve(address,uint256)", erc20AddressRole: "spender"), explicit signingInstructions, and a hosted browser-signing URL fallback. Agents see what each step does before signing, not just opaque hex.

A real conversation

To give a concrete example, here is one workflow:

"Find the best 30-day USDC yields right now. Filter to TVL above $25M, no active warnings, and show me curator and reputation score."
Claude Desktop running the USDC scan prompt, vaults.fyi MCP tool call in the sidebar, top of the result table on screen.

The MCP calls vaults_search with allowedAssets: ["USDC"], minTvl: 25000000, an exclusion on warning and critical flags, and sorts by 30-day APY.

Below, you can read Claude's summary (not our summary, not financial advice) of the vaults.fyi raw data.

Claude's summary, based off vaults.fyi MCP result data.

From there you can ask for benchmark-relative ranking, plot APY drift over time, pull share-price history, or hand a specific vault to build_vault_tx to draft a deposit.

The point is not the specific numbers (those move daily). The point is that the loop ("find" → "compare" → "drill in" → "transact") happens in one conversation, in one data shape.

What people are using it for

Patterns we're seeing or building toward:

  • Yield research in chat. Replace the multi-tab dashboard scan. Filters are first-class, so multi-criteria queries take one round trip.
  • Portfolio review. Pass a wallet address, ask "what am I holding, what's it earning, and how does each position compare to its network benchmark?" positions plus benchmark_apy plus vault_apy_history answer this directly.
  • Rebalance proposers. A nightly job runs best_deposit_options and positions, computes whether a candidate beats current after gas, and proposes the rebalance into a multisig. The MCP returns the calldata; a Safe (or other smart account) holds the keys. Check out a demo of this below:
  • Incident monitoring. Watch flags[] for your open vault positions. The propagation across curated vault systems means one upstream incident lights up every downstream vault that's exposed, without you having to map dependencies manually.
  • Strategy backtests. vault_returns plus benchmark_apy_history lets an agent compute alpha vs. the benchmark for any vault over its full history.

The data surface is in steady use. The transaction surface is earlier in adoption and currently the more interesting frontier.

Getting started

Three steps. Get an API key, drop the config snippet into your MCP client, restart, and ask a question.

1. Get an API key. Sign up and generate a key at https://portal.vaults.fyi/.

2. Configure your MCP client. For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS:

{
  "mcpServers": {
    "vaultsfyi": {
      "url": "https://mcp.vaults.fyi/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_VAULTS_API_KEY"
      }
    }
  }
}

Restart Claude Desktop. For Cursor, Cline, and other streamable-HTTP MCP clients, see the setup guide.

If you'd rather skip the API key and pay per call, the same surface is available over x402, the agent-payment protocol.

3. Try a prompt. A few that exercise different parts of the surface:

  • "What are the highest 30-day APY USDC vaults on Base with TVL over $25M and no active warnings?"
  • "Plot USD benchmark rates on Arbitrum for the last 90 days."
  • "What positions does 0xabc... currently hold? For each, tell me when the position was opened and how much yield it has generated."
  • "Prepare a deposit transaction for 1000 USDC into the Gauntlet USD Alpha on Base. Show the decoded steps before I sign."

Beyond chat

The MCP is yet another way to surface our data and build transactions, in addition to our REST API (api.vaults.fyi/v2) and our SDK.

For autonomous agents that prefer pay-per-request instead of an API key, x402 is also supported. Each accepts a standard x-api-key header.

For deeper walkthroughs, check out the guides below:

Questions or feedback? Contact us @vaultsfyi on X.