Get Started
Connect Claude Code, Codex, or Cursor to Morpho — query vaults, markets, and positions, and prepare unsigned transactions from your agent.
Morpho MCP and skills give an AI agent structured access to the Morpho protocol. Ask it for a vault's realized average APY, a market's borrow rate, or a wallet's health factor, and it answers from live onchain and API data. Ask it to deposit, borrow, or repay, and it hands back an unsigned transaction for you to review and sign.
Quickstart
To try Morpho from a chat client or coding agent, the shortest path is the hosted MCP server. It needs no account, no API key, and nothing to install — point your agent at https://mcp.morpho.org/ and it can read Morpho.
claude mcp add morpho --scope user --transport http https://mcp.morpho.org/codex mcp add morpho --url https://mcp.morpho.org/Add the server to .cursor/mcp.json:
{ "mcpServers": { "morpho": { "type": "http", "url": "https://mcp.morpho.org/" } } }Then ask your agent a question:
For vault 0x… on Base, what are its realized average APY, TVL, curator, and fee rates?For per-client setup, the full tool reference, and more prompts, see Morpho MCP.
Two ways to connect
Morpho MCP and Morpho Skills serve different tasks. Use the hosted server to query the protocol or prepare unsigned transactions in a conversation. Install the skills when an agent is building, updating, or reviewing product code.
| Morpho MCP | Morpho Skills | |
|---|---|---|
| How the agent uses it | Tool calls to a hosted server | Local product guidance, references, and review checkers |
| Setup | Connect to https://mcp.morpho.org/ | npx skills add morpho-org/morpho-skills |
| Best for | Live queries and unsigned transactions | Building and reviewing Earn and Borrow products |
The earn-integration and borrow-integration skills each include build/update and review modes. They cover current data sources, SDK transaction flows, product UI, safety checks, and evidence-based pre-launch reviews.
What your agent can do
Read — list and inspect vaults and markets, fetch a user's positions and token balances, and check which chains are supported.
Prepare — build unsigned transactions for vault deposits and withdrawals, market supply, borrow, and repay, collateral supply and withdrawal, and rewards claims.
Morpho MCP and skills work across every chain Morpho is deployed on. Rather than hardcoding a list that will drift, ask your agent to call morpho_get_supported_chains — it returns each chain's name and whether Morpho Blue, Morpho Vaults and Midnight are supported there.
Production reads through the Read API
Morpho MCP and skills aren't ready for production systems yet. For an agent or backend tool that needs deterministic, versioned reads today, call the public Read API at https://api.morpho.org directly. It needs no API key. To read a wallet's indexed positions, call these four lists and follow cursor until it is null. Omit chain_ids to cover every chain. By default the Blue and vault lists return only active positions. Add active_only=false to include exited ones, for example before reading their earnings. The Midnight list returns only current positions, and active_only=true there also drops matured markets:
| Positions | Route |
|---|---|
| Morpho Blue markets | GET /v0/blue/users/{user-address}/positions |
| Morpho Vaults V1 | GET /v0/vaults-v1/users/{user-address}/positions |
| Morpho Vaults V2 | GET /v0/vaults-v2/users/{user-address}/positions |
| Midnight fixed-rate markets | GET /v0/midnight/users/{user-address}/positions |
Use the wallet lists to find positions. For a known vault, read the V1 or V2 position directly. Both single-vault routes and both vault lists return assets and shares: use assets for the underlying amount without converting shares.
For a known Blue market, read the single user market position. This route and the Blue wallet list return collateral_assets as a collateral token amount, so it doesn't need share conversion. Convert supply_shares and borrow_shares to loan token amounts using totals from Read Blue market state.
Use BigInt for both calculations:
- Supply:
supply_shares × (total_supply_assets + 1) / (total_supply_shares + 1e6).BigIntdivision truncates, so this rounds down. - Borrow:
(borrow_shares × (total_borrow_assets + 1) + (total_borrow_shares + 1e6) − 1) / (total_borrow_shares + 1e6). This rounds up.
Vault assets and Blue collateral_assets are integer strings in the token's smallest unit. The converted supply and borrow amounts are also in the smallest unit.
For display, format each raw amount with the token's decimals. Avoid integer division, which drops the fractional part. Use the vault's underlying token for assets, the collateral token for collateral_assets, and the loan token for converted supply and borrow amounts. For example, viem's formatUnits(500000n, 6) returns "0.5", so 500000 raw USDC units display as 0.5 USDC.
Earnings are read per position, not per wallet: use each vault's or market's /users/{user-address}/position/performance route. See Migrate from GraphQL for more Read API recipes.
Next steps
- Morpho MCP — endpoint details, per-client setup, the full tool table, and prompt examples.
- Morpho Skills — install the Earn and Borrow builder skills, and see when to use each mode.
- Using LLMs — feed these docs to an agent as plain Markdown.
API Changelog
Track Morpho GraphQL and Read API deprecations and removals, with dated entries for developers maintaining queries and integrations.
Morpho MCP
Morpho's hosted MCP server — query vaults, markets, Midnight fixed-rate markets, and positions, and prepare unsigned transactions from any MCP-compatible agent.