CLI & Skills
Drive Morpho from the terminal with @morpho-org/cli, and give your coding agent the morpho-cli and morpho-builder skills.
The Morpho CLI and the Morpho Skills give your AI coding agent structured access to Morpho vaults, markets, positions, and unsigned transactions — without leaving the terminal.
The two fit together. The CLI is a plain command-line tool that anyone can run. The morpho-cli skill teaches an agent when and how to run it. Neither needs the MCP server; they are an independent route to the same protocol surface.
Both are experimental and pre-v1.0. Command syntax and response schemas may change without notice. Always verify critical outputs independently.
Morpho CLI
@morpho-org/cli queries Morpho and builds unsigned transactions. Every command prints JSON to stdout, so it pipes straight into jq or a script. It never asks for a private key.
Install
Install it globally:
npm install -g @morpho-org/cliOr run it without installing:
npx @morpho-org/cli@latest <command> [options]There is no API key and no login step.
Usage
Every command except health-check and get-supported-chains requires --chain. Run get-supported-chains for the valid slugs, and morpho <command> --help for a command's full option list.
# The five highest-APY USDC vaults on Base
morpho query-vaults --chain base --asset-symbol USDC --sort apy_desc --limit 5
# One user's positions, piped into jq
morpho get-positions --chain base --user-address 0x... | jq '.marketPositions[].healthFactor'
# Prepare a deposit — returns unsigned transactions, signs nothing
morpho prepare-deposit --chain base --vault-address 0x... --user-address 0x... --amount 1000Most commands also accept --limit, --skip, and --fields to trim the response.
Commands
The CLI exposes the same sixteen operations as the MCP server, named in kebab-case rather than morpho_snake_case.
| Category | Command | Description |
|---|---|---|
| Utility | health-check | Check the CLI's connected services. |
| Utility | get-supported-chains | List supported chains with slug, chain ID, and explorer URL. |
| Vaults | query-vaults | Query vaults, with filtering and sorting. |
| Vaults | get-vault | Get one vault's details. |
| Markets | query-markets | Query Morpho Blue markets, with filtering. |
| Markets | get-market | Get one market's details. |
| Positions | get-positions | Every vault and market position for a user on a chain. |
| Positions | get-token-balance | A token balance, plus Morpho and Bundler approval state. |
| Transactions | prepare-deposit | Deposit into a vault, including any approval. |
| Transactions | prepare-withdraw | Withdraw from a vault. Accepts max. |
| Transactions | prepare-supply | Supply to a market, including any approval. |
| Transactions | prepare-borrow | Borrow from a market, with a health-factor check. |
| Transactions | prepare-repay | Repay a market borrow. Accepts max. |
| Transactions | prepare-supply-collateral | Supply collateral without borrowing, including any approval. |
| Transactions | prepare-withdraw-collateral | Withdraw collateral. Accepts max. |
| Transactions | prepare-claim-rewards | Claim Merkl rewards. |
Simulation is not a separate command. Every prepare-* call simulates the bundle before returning and reports the result inline, so a known-bad bundle surfaces as an error-level warning rather than a transaction you might sign.
prepare-* commands return unsigned transaction payloads. The CLI never signs and never broadcasts — review the output, then submit the transaction yourself.
Morpho Skills
Agent Skills are an open standard for giving an AI agent new capabilities. A skill is a folder of Markdown that tells the agent what a tool is for, when to reach for it, and how to read its output. Skills work across Claude Code, Codex, Cursor, and other agents that support the standard.
morpho-org/morpho-skillsInstall
Add a skill with the skills CLI:
npx skills add morpho-org/morpho-skills --skill morpho-cli
npx skills add morpho-org/morpho-skills --skill morpho-builderClaude Code can instead install them as plugins from the Morpho marketplace, which also registers the hosted MCP server:
/plugin marketplace add morpho-org/morpho-skills
/plugin install morpho-cli@morpho-agent
/plugin install morpho-builder@morpho-agent
/plugin install morpho-mcp@morpho-agentAvailable skills
| Skill | Use it for |
|---|---|
morpho-cli | Operating on Morpho conversationally — vault APYs, market rates, positions, and preparing transactions. Drives @morpho-org/cli. |
morpho-builder | Writing code that integrates Morpho — SDK selection, contract ABIs, GraphQL schemas, and the pitfalls that bite new integrations. |
Pick by intent. If you are asking an agent to look something up or prepare a transaction, that is morpho-cli. If you are asking it to build a deposit flow, a dashboard, or a bot, that is morpho-builder.
How it works
Once morpho-cli is installed, the agent recognizes a Morpho request without being told to use the CLI, and follows a fixed loop:
Discover
Find the vault or market with query-vaults or query-markets, rather than hardcoding an address.
Inspect
Read current state with get-vault, get-market, or get-positions.
Prepare
Call a prepare-* command. Token decimals, allowances, approvals, and simulation are all handled for you.
Present
Show the summary, the unsigned transactions, the projected outcome, and any warnings — so you can decide whether to sign.
Use Cases
Ad-hoc research. Ask "which USDC vault on Base has the best net APY, and what is it allocated to?" in plain English, and get an answer assembled from live vault and market data instead of a stale dashboard.
Position monitoring. Point the agent at a wallet and ask it to flag any health factor drifting toward liquidation. get-positions returns every vault and market position on a chain in one call.
Transaction review before signing. Have the agent prepare a deposit, borrow, or repay, then read back the approval chain, the simulated outcome, and any warnings. Because the payload is unsigned, nothing moves until you submit it.
Scripting and CI. Every command emits JSON on stdout, so morpho query-markets --chain base | jq drops straight into a monitoring job or a scheduled report — no agent required.
Building an integration. With morpho-builder, a code-generation agent scaffolds a deposit app, a portfolio dashboard, or a liquidation bot against the right SDK, and knows which flows the high-level SDK does not cover.