What is the Compass MCP server?
The Compass API hosts a Model Context Protocol server at:The server speaks MCP’s Streamable HTTP transport;
https://api.compasslabs.ai/mcp Authentication is your regular Compass API key sent as an X-API-Key header — get a free key here.Connect a client
- Claude Code
- Cursor
- Claude Desktop
- Any client / cURL
What you get
46 tools spanning the Compass products. Names mirror the API operation ids, and descriptions and parameter schemas come from the same OpenAPI source as the API reference —tools/list is always in sync with the deployed API.
| Group | Tools | Examples |
|---|---|---|
| Earn | 12 | v2_earn_vaults, v2_earn_manage, v2_earn_bundle |
| Credit | 7 | v2_credit_create_account, v2_credit_borrow, v2_credit_repay |
| Bridging (CCTP) | 2 | v2_cctp_burn, v2_cctp_mint |
| Gas sponsorship | 2 | v2_gas_sponsorship_prepare, v2_gas_sponsorship_approve_transfer |
| Global Markets (perps) | 14 | v2_global_markets_perps_market_order, v2_global_markets_perps_opportunities |
| Tokenized Equities | 9 | v2_tokenized_equities_quote, v2_tokenized_equities_order |
The non-custodial flow
- Read — markets, positions, and balances tools return data directly.
- Account — Earn, Credit, and Tokenized Equities act through a per-owner product account: call that product’s
*_create_accounttool first. It is idempotent and returnstransaction: nullif the account already exists. - Build — action tools return an unsigned transaction
{to, data, value, ...}. - Sign & broadcast — with your own key, for example with Foundry’s
cast:
- Global Markets perps (Hyperliquid): build the order with
v2_global_markets_perps_market_order(orlimit_order,withdraw, …) → sign the returned typed data → submit viav2_global_markets_perps_execute. Fund first withv2_global_markets_perps_deposit; perps need no product account. - Tokenized Equities:
v2_tokenized_equities_order→ sign →v2_tokenized_equities_order_submit. - Gas sponsorship: call an action with
gas_sponsorship: true→ sign the returned EIP-712 → submit signature and typed data tov2_gas_sponsorship_prepare→ a sponsor broadcasts, and the owner pays no gas. See Gas Sponsorship.
Good to know
- Amounts are decimal token units (
"1.5"means 1.5 USDC), never wei."ALL"is not supported — pass an explicit amount. - Tokens go by symbol (
USDC,WETH) or0xaddress; pass the address when a symbol isn’t recognized. - Chains vary by product: Earn and Credit cover Ethereum, Base, Arbitrum, HyperEVM, and Tempo; CCTP bridges Ethereum, Arbitrum, and Base; Tokenized Equities settle on Ethereum; perps run on Hyperliquid.
- The server is stateless: every request is self-contained — no sessions to manage, and a 5xx is safe to retry once.
- Errors: 4xx bodies are actionable (for example
Unknown token symbol) — surface them as-is. A 401 means theX-API-Keyheader is missing or invalid.
Looking for the docs-search MCP server?
Looking for the docs-search MCP server?
https://docs.compasslabs.ai/mcp is a different server: it searches this documentation site and needs no API key. The server documented on this page — api.compasslabs.ai/mcp — is the one that reads on-chain state and builds transactions.Prefer a shell?
The
compass CLI wraps the same API as subcommands — for terminals, scripts, and CI.Agent Skill
A packaged skill that teaches Claude Code, Cursor, or Codex the Compass workflow end to end.