> ## Content Index
> Fetch the complete content index at: https://blog.vaults.fyi/llms.txt
> Use this file to discover other available public pages before exploring further.

# Onchain yield tools for any AI agent
- URL: https://blog.vaults.fyi/onchain-yield-tools-for-any-ai-agent/
- Published: 2026-05-13T15:10:30.000Z
- Updated: 2026-08-06T18:00:01.000Z
- Author: vaults.fyi
- Tags: MCP, Engineering

The [vaults.fyi MCP server](https://docs.vaults.fyi/ai-agents/mcp-server?ref=blog.vaults.fyi) 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](https://docs.vaults.fyi/ai-agents/mcp-server?ref=blog.vaults.fyi).

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](https://blog.vaults.fyi/how-to-get-defi-yield-benchmarks/).

**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."*

![](https://storage.ghost.io/c/80/1e/801e59ba-aea3-41d2-aff6-47dda0ee853e/content/images/2026/05/image-2.png)

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.

![](https://storage.ghost.io/c/80/1e/801e59ba-aea3-41d2-aff6-47dda0ee853e/content/images/2026/05/image-3.png)

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:

> We've been building agent flows serious DeFi users can trust[@0x7477](https://twitter.com/0x7477?ref%5Fsrc=twsrc%5Etfw&ref=blog.vaults.fyi)'s demo uses our new MCP w/ [@OpenWallet](https://twitter.com/OpenWallet?ref%5Fsrc=twsrc%5Etfw&ref=blog.vaults.fyi) to propose a portfolio rebalance as a batch of [@safe](https://twitter.com/safe?ref%5Fsrc=twsrc%5Etfw&ref=blog.vaults.fyi) transactions  
>  
> Analytics and ready-to-sign calldata powered by [@vaultsfyi](https://twitter.com/vaultsfyi?ref%5Fsrc=twsrc%5Etfw&ref=blog.vaults.fyi). Simulated, reviewed, signed in one Safe tx. [pic.twitter.com/yMESvkmzta](https://t.co/yMESvkmzta?ref=blog.vaults.fyi)
> 
> — vaults.fyi (@vaultsfyi) [May 8, 2026](https://twitter.com/vaultsfyi/status/2052759309180649651?ref%5Fsrc=twsrc%5Etfw&ref=blog.vaults.fyi)

- **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/](https://portal.vaults.fyi/?ref=blog.vaults.fyi).

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

```json
{
  "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](https://docs.vaults.fyi/ai-agents/mcp-claude-desktop?ref=blog.vaults.fyi).

If you'd rather skip the API key and pay per call, the same surface is available over [x402](https://docs.vaults.fyi/ai-agents/x402?ref=blog.vaults.fyi), 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](https://api.vaults.fyi/v2/documentation/static/index.html?ref=blog.vaults.fyi#/)) and our [SDK](https://docs.vaults.fyi/sdk/quickstart?ref=blog.vaults.fyi).

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:

- [docs.vaults.fyi/ai-agents/overview](https://docs.vaults.fyi/ai-agents/overview?ref=blog.vaults.fyi): full agent-surface tour
- [docs.vaults.fyi/ai-agents/mcp-claude-desktop](https://docs.vaults.fyi/ai-agents/mcp-claude-desktop?ref=blog.vaults.fyi): Claude Desktop and other-client setup
- [docs.vaults.fyi/ai-agents/x402](https://docs.vaults.fyi/ai-agents/x402?ref=blog.vaults.fyi): keyless, pay-per-call setup

Questions or feedback? Contact us [@vaultsfyi](https://x.com/vaultsfyi?ref=blog.vaults.fyi) on X.