{
  "markdown": "# Cambrian API MCP\n\nModel Context Protocol server for the Cambrian API. It exposes the same product surface as the `cambrian` CLI for agents that need live DeFi, social intelligence, risk, and API documentation tools.\n\nEvery call needs a Cambrian API key supplied by the caller. The hosted server and local package both require one; the server never ships or proxies a shared key.\nCreate a key at `https://console.cambrian.org/`. For x402 pay-per-call access\nwithout an API key, use `cambrian pay --help`; MCP transport still requires a\ncaller-supplied key.\n\n## What You Get\n\n- a progressive default profile with one concise tool per public Cambrian API endpoint\n- compact and full profiles for clients with different tool-loading behavior\n- a composite workflow tool for Solana token snapshots\n- `cambrian_docs` for live endpoint and guide docs from `https://docs.cambrian.org/llms.txt`\n- stdio transport for local MCP clients\n- Streamable HTTP transport for hosted and self-hosted deployments\n\n## Tool Profiles\n\n| Profile | stdio | HTTP | Tool metadata |\n| --- | --- | --- | --- |\n| Progressive (default) | no flag, or `--profile progressive` | `/mcp` | Direct endpoint tools with types, required fields, scalar enums, OpenAPI defaults, numeric bounds, and array item types. |\n| Compact | `--profile compact` | `/mcp/compact` | Three tools: `cambrian_docs`, `cambrian_call`, and `cambrian_solana_token_snapshot`. |\n| Full | `--profile full` | `/mcp/full` | Direct endpoint tools with complete request descriptions, defaults, constraints, and response-size controls. |\n\nAll profiles use the same progressive documentation flow. `cambrian_docs`\nreturns the request schema by default. Set `detail` to `response` for response\nfields. The response view also includes the request schema. Set `detail` to\n`full` only for examples and all endpoint prose. The full profile does not\npreload response documentation for every endpoint.\n\nProgressive omits repeated endpoint descriptions, long patterns, large array\nenums, and parameter prose. Call `cambrian_docs` for these details.\n\nProgressive also omits `offset`, `order_asc`, and `order_desc`. These three are\nthe same on every endpoint that has them, and Progressive already strips the\nper-endpoint sortable-column enum, so repeating them adds about 10 kB to the\ntool list and tells the agent nothing. The server instructions name them once,\nand every endpoint still accepts them. `limit` stays, with its maximum, because\nit is how an agent bounds a response.\n\n## Toolsets\n\nThe whole catalog is 111 tools. An agent that only asks about Solana still pays\nfor 69 EVM tools it will never call. Use `--toolsets` to load only what you\nneed.\n\n| Toolset | Tools |\n| --- | --- |\n| `solana` | `cambrian_solana_*` and the Solana token snapshot |\n| `evm` | `cambrian_base_*` and `cambrian_ethereum_*` |\n| `deep42` | `cambrian_deep42_*` |\n| `risk` | `cambrian_risk_*` |\n\n```bash\nnpx -y cambrian-api-mcp --toolsets solana,risk\nCAMBRIAN_TOOLSETS=solana npx -y cambrian-api-mcp\n```\n\nOver HTTP, select per request: `https://mcp.cambrian.org/mcp?toolsets=solana`.\n\nOmit the option, or pass `all`, to get every tool. `cambrian_docs` is always\npresent, so a narrowed client can still discover and read about any endpoint.\n\nProgressive `tools/list` sizes:\n\n| Selection | Tools | Bytes |\n| --- | --- | --- |\n| default (all) | 111 | 27,157 |\n| `evm` | 69 | 15,759 |\n| `solana` | 37 | 10,766 |\n| `deep42` | 6 | 3,663 |\n| `risk` | 2 | 2,093 |\n\n### How MCP Clients Load Tools\n\nThe MCP client receives the complete `tools/list` result for the selected\nprofile. MCP does not control how much of that result enters the model context.\n\nClaude Code normally loads tool names and server instructions first. It loads\ncomplete selected tool definitions after Tool Search. Codex can do the same\nwhen its Tool Search feature is available. Other clients can load every tool\ndefinition at the start.\n\nThe client loads the definition from the selected profile. It does not restore\nfields that Progressive omitted. Use `cambrian_docs` to load the complete\nrequest schema, response fields, and examples.\n\n## Agent Skill\n\nNew users and agent runtimes should start here: [skills/cambrian-mcp/SKILL.md](skills/cambrian-mcp/SKILL.md). It covers Cambrian API key auth, hosted and local client config, tool naming, `cambrian_docs` lookup, composite tools, response limits, and error handling in one document.\n\nFor the CLI instead of MCP, see the [`cambrian` CLI skill](https://github.com/cambriannetwork/cambrian-cli/blob/main/skills/cambrian/SKILL.md).\n\n## Recommended Setup Through The CLI\n\nThe `cambrian` CLI prints and tests ready-to-use MCP client config:\n\n```bash\nnpm install -g cambrian\ncambrian mcp config --mode hosted\ncambrian mcp config --mode local\ncambrian mcp install --client claude --mode hosted\ncambrian mcp test --mode hosted\n```\n\n## Local stdio\n\nRun the published package directly:\n\n```bash\nexport CAMBRIAN_API_KEY=<your-api-key>\nnpx -y cambrian-api-mcp\n```\n\nSelect another profile only when your MCP client needs it:\n\n```bash\nnpx -y cambrian-api-mcp --profile compact\nnpx -y cambrian-api-mcp --profile full\n```\n\nNarrow the catalog to the toolsets you need:\n\n```bash\nnpx -y cambrian-api-mcp --toolsets solana,risk\n```\n\nOr install it globally:\n\n```bash\nnpm install -g cambrian-api-mcp\nexport CAMBRIAN_API_KEY=<your-api-key>\ncambrian-api-mcp\n```\n\n## Hosted Streamable HTTP\n\nUse the CLI to print the current hosted URL and client-specific config:\n\n```bash\ncambrian mcp config --mode hosted\n```\n\nDirect Claude setup:\n\n```bash\nclaude mcp add --transport http cambrian \\\n  https://mcp.cambrian.org/mcp \\\n  --header \"Authorization: Bearer YOUR_CAMBRIAN_API_KEY\"\n```\n\nCodex config uses TOML:\n\n```toml\n[mcp_servers.cambrian]\nurl = \"https://mcp.cambrian.org/mcp\"\nbearer_token_env_var = \"CAMBRIAN_API_KEY\"\n```\n\nThe default URL uses the progressive profile. Use\n`https://mcp.cambrian.org/mcp/compact` or\n`https://mcp.cambrian.org/mcp/full` for another profile.\n\nHTTP requests must include one of:\n\n```text\nAuthorization: Bearer <CAMBRIAN_API_KEY>\nX-Cambrian-Api-Key: <CAMBRIAN_API_KEY>\n```\n\n## Self-Hosted HTTP\n\n```bash\nnpm install\nnpm run build\nnode dist/index.js --transport http --host 127.0.0.1 --port 8080\n```\n\nHealth endpoint:\n\n```bash\ncurl http://127.0.0.1:8080/health\n```\n\nFor hosted deployments, bind to `0.0.0.0`:\n\n```bash\nnode dist/index.js --transport http --host 0.0.0.0 --port 8080\n```\n\n## Tool Names\n\nTool names are canonical and prefixed with `cambrian_`.\n\nExamples:\n\n- `cambrian_base_dexes`\n- `cambrian_ethereum_dexes`\n- `cambrian_solana_price_current`\n- `cambrian_deep42_social_data_alpha_tweet_detection`\n- `cambrian_risk_perp_risk_engine`\n- `cambrian_docs`\n- `cambrian_solana_token_snapshot`\n\nCall `cambrian_docs` without a path to discover the live root index, or use\n`guides/<slug>` (for example, `guides/x402`) for any guide listed there. For an\nendpoint path, omit `detail` to get its request schema. Use `detail: \"response\"`\nfor response fields and `detail: \"full\"` for examples and all endpoint prose.\n\nEndpoint tools come from the same validated runtime registry as the CLI. MCP\nrechecks that local cache for each tool-list/tool-call request, while OpenAPI\nnetwork attempts are coalesced and limited to once per source every 15 minutes.\nIf runtime discovery is unavailable, the bundled inventory remains available\nwithout changing existing tool names or schemas. That inventory is this\npackage's own snapshot of the live OpenAPI (`src/generated/offline-registry.ts`,\nregenerated with `npm run registry:generate`), not the `cambrian` package's\nbundled registry, so the offline catalog does not drift with that package's\nrelease cadence.\n\nVisible EVM operations that advertise `chain_id=1` also expose\n`cambrian_ethereum_*` tools. Base tools fix `chain_id` to `8453`. Ethereum\ntools fix it to `1`.\n\n## Development\n\n```bash\nnpm ci\nnpm test\nnpm run build\nnpm pack --dry-run\n```\n\nThe package depends on the published `cambrian` package for shared metadata and the API client. Publish `cambrian` first when changing both packages together, then refresh this package lock and deploy the MCP server through CI/CD.\n\n## Deployment\n\nDeployments are handled by GitHub Actions and Cloud Run from the private source repository. Do not deploy manually.\n\nThe workflow:\n\n1. installs dependencies\n2. validates `package.json#mcpName` matches `server.json#name`\n3. validates `package.json#version` matches `server.json#version`\n4. builds and tests\n5. builds the Docker image\n6. deploys to Cloud Run\n7. smoke-checks staging directly; production is smoke-tested through the public edge URL after DNS and certificate activation\n\n## Registry\n\nThe official MCP Registry publishes this server under:\n\n```text\nio.github.cambriannetwork/cambrian-api\n```\n\nThe manifest uses `https://mcp.cambrian.org/mcp`, which matches the production edge URL. The public release workflow publishes each new Registry version after npm publication.\n",
  "bytes": 8935,
  "sha": "7578e9b2e33905b0cb5bbe9c6134b7feb3e9aa3ede444c788de9784386334177",
  "repo_slug": "cambriannetwork/cambrian-api-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cambriannetwork_cambrian_api_323cc4dc/readme"
}