@sanity-labs/canvas-mcp-bridge
v0.1.0
Published
Org-free stdio MCP facade for the Sanity Canvas CRUD API. Resolves the user's Canvas resource from a bearer token and forwards JSON-RPC to the per-resource HTTP MCP. Run via `npx @sanity-labs/canvas-mcp-bridge`.
Readme
@sanity-labs/canvas-mcp-bridge
Org-free stdio MCP facade for the Sanity Canvas CRUD API. Point your MCP client
at npx @sanity-labs/canvas-mcp-bridge, give it a CANVAS_TOKEN, and which
organization to work in is resolved at runtime through conversation — not
config.
Usage
Claude Code
claude mcp add canvas npx -- -y @sanity-labs/canvas-mcp-bridge \
-e CANVAS_TOKEN=sk-...Cursor / Windsurf / any stdio MCP client (mcp.json)
{
"mcpServers": {
"canvas": {
"command": "npx",
"args": ["-y", "@sanity-labs/canvas-mcp-bridge"],
"env": { "CANVAS_TOKEN": "sk-..." }
}
}
}How it picks the organization
On startup the bridge lists the orgs your token has Canvas access in:
- One org with a canvas → auto-pinned; you go straight to the full toolset.
- More than one → picker mode: only
canvas_list_orgs+canvas_use_orgare exposed. The LLM asks which org you mean, you tell it, it pins that org's canvas, and the full Canvas CRUD toolset appears. You never deal with canvas resource IDs — the bridge owns that translation.
Configuration
| Env var | Required | Default | What it does |
| --- | --- | --- | --- |
| CANVAS_TOKEN | yes | — | Sanity user token (from the dashboard's personal tokens). Forwarded verbatim; preserves your identity for attribution. NOT a project (sk…) robot token. |
| CANVAS_API_BASE | no | https://api.sanity.work (staging) | Sanity API gateway. Set to https://api.sanity.io for production. |
| SANITY_API_BASE | no | https://api.sanity.work/v2025-02-19 | API base used for org/canvas discovery. |
| CANVAS_ORGANIZATION_ID | no | — | Escape hatch: skip the picker, pin this org's canvas. |
| CANVAS_RESOURCE_ID | no | — | Escape hatch: skip discovery entirely, pin this canvas resource. |
Status
Experimental. The upstream Canvas CRUD MCP it fronts is gated behind a feature flag (staging today). Don't assume the wire format is stable.
Full docs, architecture, and release process: https://github.com/sanity-labs/canvas-mcp-bridge#readme
