MCP

Get Started with the Cambrian MCP

The Model Context Protocol (MCP) is an open-source standard for connecting AI applications to external systems.

Cambrian provides several ways to use our data with AI agents, including the Cambrian MCP, Cambrian CLI, and llms.txt.

With the Cambrian MCP, any agent, including Claude Code, Codex, and Cursor, can access Cambrian’s financial intelligence. Authenticate once using your API key, then your agent can start using Cambrian data.

Setup

Connecting to Cambrian’s hosted MCP is really simple. You can get started by sharing the following instructions with your agent:

Use Cambrian MCP from the Cambrian CLI:

The cambrian CLI comes with a ready-to-use MCP client config. You just need to paste the following into your terminal or agent’s interface:

npm install -g cambrian
export CAMBRIAN_API_KEY="YOUR_CAMBRIAN_API_KEY"

cambrian mcp config --mode hosted
cambrian mcp config --mode local
cambrian mcp install --client claude --mode hosted
cambrian mcp test --mode hosted

Use the Cambrian MCP with Claude Code:

export CAMBRIAN_API_KEY="YOUR_CAMBRIAN_API_KEY"

claude mcp add --transport http cambrian \
  https://cambrian-mcp-server-prod-981646676182.us-central1.run.app/mcp \
  --header "Authorization: Bearer $CAMBRIAN_API_KEY"

Then, verify the MCP is connected by running this inside Claude Code:

/mcp

You can also verify from the terminal:

claude mcp list
claude mcp get cambrian

You should see cambrian listed, the MCP should show as connected. If it shows as needing authentication or as failed, confirm that CAMBRIAN_API_KEY is being exported in the same shell used to launch Claude Code.

You can now ask Claude Code to use Cambrian, for example:

Find Uniswap V3 pools for USDC on Ethereum.

Use the Cambrian MCP with Codex:

export CAMBRIAN_API_KEY="YOUR_CAMBRIAN_API_KEY"

codex mcp add cambrian \
  --url https://cambrian-mcp-server-prod-981646676182.us-central1.run.app/mcp \
  --bearer-token-env-var CAMBRIAN_API_KEY

Then, verify the MCP is connected by running the following on your terminal:

codex mcp list
codex mcp get cambrian

You can also open Codex and check inside the TUI:

/mcp

If you set CAMBRIAN_API_KEY after Codex is already running, restart Codex from a terminal session where the variable is available. Codex reads bearer_token_env_var from its environment when it connects to the MCP server.

You can now ask Codex to use Cambrian, for example:

Use Cambrian to inspect the latest DeFi market data available through the MCP server.

Use the Cambrian MCP with Cursor:

Create or edit your global Cursor MCP config:

export CAMBRIAN_API_KEY="YOUR_CAMBRIAN_API_KEY"

mkdir -p ~/.cursor

Add this to ~/.cursor/mcp.json, merging it with any existing mcpServers entries:

{
  "mcpServers": {
    "cambrian": {
      "url": "https://cambrian-mcp-server-prod-981646676182.us-central1.run.app/mcp",
      "headers": {
        "Authorization": "Bearer ${env:CAMBRIAN_API_KEY}"
      }
    }
  }
}

Restart Cursor after changing the mcp.json. In Cursor, open Customize → MCP settings and confirm cambrian is enabled.

Cursor also shows MCP connection details in the Output panel under “MCP Logs”.

You can now ask Cursor to use Cambrian, for example:

Use the Cambrian MCP server to check the available DeFi data tools and tell me which one is best for token pricing.

Self-Host the Cambrian MCP from Source

Find the public repository at the following link: https://github.com/cambriannetwork/cambrian-api-mcp

git clone https://github.com/cambriannetwork/cambrian-api-mcp.git
cd cambrian-api-mcp
npm install
npm run build
node dist/index.js --transport http --host 127.0.0.1 --port 8080

Authentication

Cambrian’s MCP authentication follows the BYOK (bring your own key) approach. You just need to add your API key. If you don’t have an API key yet, create a Cambrian Account and get one for free.

Available tools

The Cambrian MCP has 75+ tools available. After adding Cambrian MCP to a client such as Claude, Cursor, or Codex, the client usually displays the connected server and available tools in its MCP/tool settings. You can also call tools/list directly.