{"_id":"@cailab/mcp","_rev":"2-619188ea6ae69c93f9965f48515bc141","name":"@cailab/mcp","dist-tags":{"latest":"1.0.18"},"versions":{"1.0.13":{"name":"@cailab/mcp","version":"1.0.13","keywords":["mcp","cai","model-context-protocol"],"license":"MIT","_id":"@cailab/mcp@1.0.13","maintainers":[{"name":"bernardtai","email":"bernardtai@gmail.com"}],"bin":{"cai-mcp":"src/index.js"},"dist":{"shasum":"a3edf9c6c895d24dea148478e2d22131ce280cab","tarball":"https://registry.npmjs.org/@cailab/mcp/-/mcp-1.0.13.tgz","fileCount":3,"integrity":"sha512-3+/c8NjApJ3sp5XJLuz63vDnPZKCRR6ekrilUeXWuyS2l3AKavravXsAqYwfaSpCxhndzt8++2a/oRZPiZF6Tw==","signatures":[{"sig":"MEQCIApGXa9rTLgC8ZN2mDnV7hvp3uvu+2ApkzurTUdPCEQZAiAnXw0MRF411HT47ozOOuYPZo5cKlpJDBFzqssKwPwo5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11470},"type":"module","engines":{"node":">=18"},"gitHead":"1da630919a9428ee8f8f9c3fcb667d89fa634dbc","scripts":{"smoke":"node scripts/smoke-list-tools.mjs","start":"node src/index.js"},"_npmUser":{"name":"bernardtai","email":"bernardtai@gmail.com"},"_npmVersion":"11.4.2","description":"Official CAI Model Context Protocol server — proxies Supabase Edge tools from cai-tools.manifest.json","directories":{},"_nodeVersion":"24.4.0","dependencies":{"zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.27.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp_1.0.13_1779178201906_0.05486735265993481","host":"s3://npm-registry-packages-npm-production"}},"1.0.18":{"name":"@cailab/mcp","version":"1.0.18","description":"Official CAI Model Context Protocol server — proxies Supabase Edge tools from cai-tools.manifest.json","type":"module","bin":{"cai-mcp":"src/index.js"},"engines":{"node":">=18"},"scripts":{"start":"node src/index.js","smoke":"node scripts/smoke-list-tools.mjs"},"keywords":["mcp","cai","model-context-protocol"],"license":"UNLICENSED","dependencies":{"@modelcontextprotocol/sdk":"^1.27.1","zod":"^3.23.8"},"_id":"@cailab/mcp@1.0.18","gitHead":"2492f0c189270458f4f4752ea8df30ab178f6eeb","_nodeVersion":"24.4.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-9YEKVzLCeSusLJ4eB0NU7mCfR6Xwqoc00yPz+5XbL86FOseXdCN+sXPzuU7HbHazNaxSN3pwxJqlddmqVzGCEQ==","shasum":"610731d2e196023571d165a67f19c87af9447049","tarball":"https://registry.npmjs.org/@cailab/mcp/-/mcp-1.0.18.tgz","fileCount":3,"unpackedSize":11674,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDecUOa9CoVyLDQr/KjdNco1jXcOI0zaLpz5zhvbiAqPAiBmdHMiJKSjvmqcJZmxLWKfRB2gnhhbIiINqG6N8Q4SUA=="}]},"_npmUser":{"name":"bernardtai","email":"bernardtai@gmail.com"},"directories":{},"maintainers":[{"name":"bernardtai","email":"bernardtai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_1.0.18_1783407359119_0.6094287335713415"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-19T08:10:01.734Z","modified":"2026-07-07T06:55:59.405Z","1.0.13":"2026-05-19T08:10:02.042Z","1.0.18":"2026-07-07T06:55:59.253Z"},"license":"UNLICENSED","keywords":["mcp","cai","model-context-protocol"],"description":"Official CAI Model Context Protocol server — proxies Supabase Edge tools from cai-tools.manifest.json","maintainers":[{"name":"bernardtai","email":"bernardtai@gmail.com"}],"readme":"# `@cailab/mcp`\n\nOfficial **Model Context Protocol** server for [CAI.com](https://cai.com): exposes one MCP tool per entry in [`app/specs/cai-tools.manifest.json`](../../app/specs/cai-tools.manifest.json) and forwards calls to Supabase Edge Functions.\n\nHuman-readable policy and workflows: **[`https://cai.com/skill.md`](https://cai.com/skill.md)**. Capability discovery for A2A orchestrators: **[`https://cai.com/.well-known/agent.json`](https://cai.com/.well-known/agent.json)** (`skills[]` routes intents; implement using skill.md + manifest).\n\n## Requirements\n\n- Node.js **18+**\n- CAI project Supabase URL + anon key\n- **CAI User API key** (Dashboard) or **OAuth access token** with appropriate scopes\n\n## Install\n\nFrom the monorepo:\n\n```bash\ncd packages/cai-mcp && npm install\n```\n\nOr after publish:\n\n```bash\nnpm install -g @cailab/mcp\n```\n\n## Environment\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `CAI_SUPABASE_URL` or `SUPABASE_URL` | yes | `https://xxx.supabase.co` |\n| `CAI_SUPABASE_ANON_KEY` or `SUPABASE_ANON_KEY` | yes | Supabase anon key (`apikey` header) |\n| `CAI_API_KEY` | usually yes | User API key or OAuth access token (`Authorization`) |\n| `CAI_USER_JWT` | optional | Overrides Bearer for `api_key_mail` tools (mail / send-email); else use `CAI_API_KEY` with scope **mail** or **full** |\n| `CAI_TOOLS_MANIFEST` | optional | Path to manifest JSON (default: repo `app/specs/cai-tools.manifest.json`) |\n\n**Security:** Never commit keys. Configure secrets in your MCP host (Cursor, Claude Desktop, OpenClaw).\n\n## Staging vs production\n\n- **`CAI_SUPABASE_URL`** / **`CAI_SUPABASE_ANON_KEY`** determine which project receives **every** tool call. For internal testing, point them at a **staging** Supabase project; do not mix staging URLs with a production API key (or vice versa).\n- Serve the same static paths as [`app/`](../../app/) on your staging host (`/.well-known/agent.json`, `/specs/cai-tools.manifest.json`, `/skill.md`, `/developers.html`). Use [app/.well-known/agent.staging.example.json](../../app/.well-known/agent.staging.example.json) as a template for staging Agent Card URLs.\n- Runbook: [docs/agent/STAGING_ENV_WORKFLOW.md](../../docs/agent/STAGING_ENV_WORKFLOW.md) · [STAGING_MCP_PRELAUNCH_RUNBOOK.md](../../docs/agent/STAGING_MCP_PRELAUNCH_RUNBOOK.md) · static check: `STAGING_ORIGIN=https://… bash scripts/staging-static-assets-check.sh`\n\n## OpenClaw\n\n1. `openclaw secrets set CAI_API_KEY \"…\"` (staging key from Dashboard; never paste into chat).\n2. Register this server in OpenClaw MCP config with the same **`env`** as below (staging Supabase URL + anon key).\n3. Point the CAI skill at **`https://<your-staging-host>/skill.md`** until sign-off.\n4. Confirm with `openclaw mcp list`, then a read-only call (e.g. `get_identity` or `get_exchange_rate`).\n\n## Cursor / Claude Desktop\n\nAdd to MCP config (stdio):\n\n```json\n{\n  \"mcpServers\": {\n    \"cai\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/cai/packages/cai-mcp/src/index.js\"],\n      \"env\": {\n        \"CAI_SUPABASE_URL\": \"https://YOUR.supabase.co\",\n        \"CAI_SUPABASE_ANON_KEY\": \"eyJ...\",\n        \"CAI_API_KEY\": \"cai_...\"\n      }\n    }\n  }\n}\n```\n\n## Tool args\n\nEach tool accepts:\n\n- **`query`** — object → URL search params (for `GET` / some `DELETE`)\n- **`body`** — object → JSON body (`POST` / `PUT` / `PATCH` / `DELETE`)\n\n## GAP / partial_live\n\nTools aligned with [`docs/agent/API_GAP_REGISTRY.md`](../../docs/agent/API_GAP_REGISTRY.md) include `gap_id` in the MCP description. Treat responses with `gap_id` or non-200 as **honest limits**, not bugs.\n\n## OAuth authorize\n\n`oauth_authorize` is **browser-only**; the MCP tool returns an error explaining to complete OAuth in a browser per `skill.md`.\n\n## Smoke\n\n```bash\ncd packages/cai-mcp && node scripts/smoke-list-tools.mjs\n```\n\nVerifies the manifest loads and lists registered tool names (no network).\n","readmeFilename":"README.md"}