Skip to main content

What is the Compass MCP server?

The Compass API hosts a Model Context Protocol server at:
Connect an MCP-speaking client (Claude Code, Claude Desktop, Cursor, …) and every Compass product — Earn, Credit, swaps, bridging, Global Markets perps, Tokenized Assets — appears as a typed tool the agent can call directly. No SDK, no binary, no code generation. Like the rest of the API, the MCP server is non-custodial: tools never sign or broadcast. Read tools return data; action tools return an unsigned transaction (or EIP-712 typed data) that you sign with your own wallet.
The server speaks MCP’s Streamable HTTP transport; https://api.compasslabs.ai/mcp and .../mcp/ both work. Authentication is your regular Compass API key sent as an X-API-Key header — get a free key here.

Connect a client

Then ask Claude something like “what are the best USDC vaults on Base?” — it picks the right Compass tool on its own.

What you get

48 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 referencetools/list is always in sync with the deployed API. On connect, the server also returns usage instructions to the client (the flow below, amount conventions, chain coverage per product), so well-behaved agents follow the rules without extra prompting.

The non-custodial flow

  1. Read — markets, positions, and balances tools return data directly.
  2. Account — Earn, Credit, and Tokenized Equities act through a per-owner product account: call that product’s *_create_account tool first. It is idempotent and returns transaction: null if the account already exists.
  3. Build — action tools return an unsigned transaction {to, data, value, ...}.
  4. Sign & broadcast — with your own key, for example with Foundry’s cast:
Some flows sign EIP-712 typed data instead of a transaction:
  • Global Markets perps (Hyperliquid): build the order with v2_global_markets_perps_market_order (or limit_order, withdraw, …) → sign the returned typed data → submit via v2_global_markets_perps_execute. Fund first with v2_global_markets_perps_deposit; perps need no product account.
  • Tokenized Assets: v2_tokenized_assets_order → sign → v2_tokenized_assets_order_submit. RWA yield assets (e.g. mTBILL) can also be bought or sold directly with v2_tokenized_assets_transact_buy/_sell, which return a regular unsigned transaction.
  • Gas sponsorship: call an action with gas_sponsorship: true → sign the returned EIP-712 → submit signature and typed data to v2_gas_sponsorship_prepare → a sponsor broadcasts, and the owner pays no gas. See Gas Sponsorship.
  • On-ramp (browser handoff): a fiat card + KYC flow can only render in a browser, so an agent cannot complete it inline. Call v2_onramp_createpresent the returned checkout_url and user_instructions to the user so they can pay by card → then poll v2_onramp_status (with the payment_id) until delivered. USDC lands in the user’s own wallet (non-custodial); continue with the tokenized buy. See On-Ramp.

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) or 0x address; 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 Assets settle on Ethereum (RWA buy/sell swaps also on Base); 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 the X-API-Key header is missing or invalid.
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.