mcp· @zero/mcp-server · 7 resources · 9 tools · 0 SDK deps
the brand is queryable by every coding agent
MCP — the Model Context Protocol — is the canonical way an external coding agent (cursor · claude desktop · claude code · github copilot · windsurf) talks to a local data source. @zero/mcp-server ships as a stdio CLI · zero transitive dependencies · 7 canonical resources (primitives, DESIGN.md, AGENTS.md, DTCG, receipts, token graph) and 9 tools. add it to ~/.cursor/mcp.json and every agent in the room speaks the brand.
as of
00 · livepick a tool · fill args · call · same handle() Cursor and Claude Desktop hit over stdiothe protocol calls itself
— · loading tools/list…
— · no arguments required
as of
01 · protocolJSON-RPC 2.0 over stdio · 6 methodsthe wire shape every coding agent already speaks
| method | params | result | used by |
|---|---|---|---|
initialize | protocolVersion, clientInfo | capabilities, serverInfo | handshake · always first |
notifications/initialized | — | {} | post-handshake ack |
resources/list | — | { resources: [] } | discover what is readable |
resources/read | { uri } | { contents: [...] } | fetch one resource |
tools/list | — | { tools: [] } | discover invocable tools |
tools/call | { name, arguments } | { content: [...] } | invoke a tool |
as of
02 · resources7 canonical zero://… URIsevery brand answer is a resource
| uri | name | mime | description |
|---|---|---|---|
zero://primitives | primitives | application/json | The complete @zero/ui primitive catalog with .meta dossiers (states, tokens, description, surfaces). |
zero://design.md | DESIGN.md | text/markdown | The canonical design system context layer (YAML frontmatter + Markdown rationale). v2026-05-10+. |
zero://agents.md | AGENTS.md | text/markdown | The canonical agent instructions (the 60K-repos standard). Read once at session start. |
zero://tokens/dtcg | tokens (W3C DTCG v1.0) | application/json | The 17-category token graph emitted in W3C Design Tokens Community Group format. OKLCH-native. |
zero://receipts/vocabulary | receipt vocabulary | application/json | The eight-receipt vocabulary (trade, refuse, sign, settlement, demolition, revoke, rotate, migrate). ADR-027. |
zero://tokens/graph | tokens graph (ADR-035) | application/json | Explicit dependency graph of every token (nodes + edges + per-category counts). Built from tokens.json + skin contracts. |
zero://cockpit/sitemap | cockpit sitemap (ADR-048) | application/json | The walkable surface of the cockpit · every verb (what an operator does) and every chapter (where they land). Mirrors the body served at /api/sitemap.json over HTTP. |
as of
03 · tools9 invocable tools · all pure, all replayableevery brand check is a tool
| name | required | description |
|---|---|---|
lookup_primitive | name | Return the .meta dossier for a single primitive by name (e.g. "Button", "Receipt", "AlertDialog"). |
validate_token_usage | variable | Given a CSS variable name (e.g. "--amber"), return the token category, value, and rules-of-use. |
list_chapters | — | Return the brand-book chapter index from living-system.contract.json. |
cockpit_lookup_verb | query | Look up a single cockpit verb by id or by case-insensitive label substring (e.g. "spawn", "verb-graph"). Returns the entry with its href so the agent can navigate the operator straight to the live demo. |
cockpit_navigate | verb | Return a navigation receipt describing what the operator would land on if the agent navigated them to a verb. Includes the canonical URL on getzero.dev, the owning chapter, the hash anchor target id, and the heading text the operator will see at landing. The agent does not actually trigger the navigation — it gets a server-side preview so it can describe the destination before the click. |
execute_action | actionId | ADR-058 · MX write-side · return an execution receipt describing what the cockpit would do if the agent dispatched the named action via window.__shell.executeAction(). The MCP server itself never executes (constitutional safe-scope · cockpit-internal only); the receipt enumerates the action id, expected type (navigate|execute|create|configure), reversibility, the route the operator is on, and the canonical URL the action lives on. The headless caller posts the receipt back to the in-cockpit __shell to actually fire. |
submit_form | chapter | ADR-058 · MX write-side · return a submission receipt for a form on a known cockpit chapter. Lists the form's field ids (data-field) and their declared types as MX-readable rows. The receipt is a discovery surface; actual submission still requires the operator to interact in the cockpit. |
read_state | chapter | ADR-058 · MX read-side · return the current MX-readable state for a given chapter: every data-component on the page, every data-action element with its action type and reversibility, every data-metric value with its unit. The agent uses this to know what the operator is looking at without scraping HTML. |
quote | — | ADR-084 · runtime · return a deterministic paper-only market quote (bid/ask/mid/spread/depth) from @zero/runtime. The quote is labelled venue=paper and is NOT tradable from this surface. Article II.1: paper-only. Two callers passing the same (market, ts) get the same quote forever. Use `markets` argument to enumerate the seeded markets without quoting one. |
as of
04 · trace4 build-time fixture requests · reduced through the real handlerthe protocol is queryable from the brand book
- name
- —
- num
- —
- states
- —
- tokens
- 0 tokens
- description
- —
| id | method | shape of result |
|---|---|---|
| 1 | initialize | protocolVersion · capabilities · serverInfo |
| 2 | resources/list | resources |
| 3 | tools/list | tools |
| 4 | tools/call | content · isError |
as of
05 · wiringcursor · claude desktop · windsurf · github copilotpoint your agent at the server in three lines
{
"mcpServers": {
"zero-brand": {
"command": "node",
"args": ["packages/mcp-server/dist/cli.js"]
}
}
}zero transitive deps · zero network
the server reads files in the repo (manifest, DESIGN.md, AGENTS.md, DTCG, the receipt vocabulary, the token graph) and answers JSON-RPC requests on stdio. nothing leaves the machine. the agent gets the brand answer with one resources/read instead of greping the repo.stdiozero depscontract-pinned
◆ mcp001a