mzizi-mcp

v0.26.0
io.github.mzizi-dev/mzizi-mcp Checked 2 days ago Published 13 days ago

Mzizi design system MCP: search and execute over components, tokens, crates, skills and docs.

Connect with no account. An anonymous session can initialize, call tools/list and call every tool except the Fundi ones: Point any MCP client at the live HTTP endpoint: No sign-in is needed. To use the Fundi tools, use "url": "https://mcp.mzizi.dev/mcp/signin" instead; the client runs the WorkOS Connect OAuth (PKCE) flow on first connect. /mcp never answers 401, so a client never starts that flow there. The authorization server supports dynamic client registration and does not publish a client ID metadata document.

Summary extracted from the README.

@nyuchi/mzizi-mcp

Model Context Protocol server for the Mzizi design system: the registry and skills served from files bundled at build time, the docs joined in from docs.mzizi.dev, and no database behind any of it. Free, with no account; sign-in only for Fundi.

npm License: Apache 2.0

Live: https://mcp.mzizi.dev/mcp | Home: mzizi.dev | Docs: docs.mzizi.dev

Owned and operated by Mzizi.


Live at https://mcp.mzizi.dev/mcp (Cloudflare Worker mzizi-mcp, version 0.17.0 — MZIZI_MCP_VERSION in src/server.ts is what serverInfo.version reports, and it moves in lockstep with package.json and server.json).

Free, with no gate except Fundi

Connect with no account. An anonymous session can initialize, call tools/list and call every tool except the Fundi ones:

Access Tools
free, no account mzizi_search, mzizi_get_component, mzizi_list_components, mzizi_get_tokens, mzizi_get_architecture, mzizi_get_doctrine, mzizi_get_skills, mzizi_check_accessibility, mzizi_mcp_describe, every docs_* tool
sign-in (free WorkOS account) mzizi_fundi, mzizi_report_issue. They act as your Mzizi console user
  • Called without sign-in, the Fundi tools are still listed. They answer with a tool error that starts Sign-in required: and says how to sign in.
  • To sign in, use your client's sign-in or authenticate option for this server, or connect to https://mcp.mzizi.dev/mcp/signin. That URL is the same MCP, but it answers 401 until you sign in through a WorkOS Connect OAuth application (public client, PKCE; no client secret), and then serves every tool. Clients discover the authorization server through /.well-known/oauth-protected-resource, including the path-specific /.well-known/oauth-protected-resource/mcp/signin.
  • A request to /mcp that carries a token is validated by the OAuth provider exactly as before: a bad or expired token gets a 401, so a signed-in client refreshes rather than dropping to the free tier.
  • Abuse guard: anonymous requests are limited to 120 per 60 seconds per client IP (a Workers rate-limit binding, ANON_RATE_LIMIT). Over the limit you get HTTP 429 with Retry-After: 60. Signed-in requests are not limited.
  • mzizi_mcp_describe, the mzizi://tools resource and GET https://mcp.mzizi.dev/catalogue.json mark every tool free or sign-in, and say how to sign in. src/access.ts is the one list.

MCP Registry name: io.github.mzizi-dev/mzizi-mcp (from 0.10.1; the older io.github.nyuchi/mzizi-mcp entry is stale and no longer updated)


Using it — MCP client config

Point any MCP client at the live HTTP endpoint:

{
  "mcpServers": {
    "mzizi": {
      "type": "http",
      "url": "https://mcp.mzizi.dev/mcp"
    }
  }
}

No sign-in is needed. To use the Fundi tools, use "url": "https://mcp.mzizi.dev/mcp/signin" instead; the client runs the WorkOS Connect OAuth (PKCE) flow on first connect. /mcp never answers 401, so a client never starts that flow there. The authorization server supports dynamic client registration and does not publish a client ID metadata document.

Per client

Each client writes the entry above in its own format. The full guide, with the vendor page each line was read from, is docs.mzizi.dev/toolchain/connect; the table in this repository's README has the config path and key for Claude Code, Claude.ai and Desktop, Codex, Cursor, VS Code, Antigravity, Gemini CLI, Devin Desktop (formerly Windsurf), Zed, Cline, OpenCode, Kiro and JetBrains. All of it is documented by the vendors, read on 2026-11-03, and not run in the tools. The short version:

# Claude Code: the server alone (skills over MCP) ...
claude mcp add --transport http mzizi https://mcp.mzizi.dev/mcp
# ... or the public plugin, which also installs the skills
/plugin marketplace add mzizi-dev/mzizi-registry
/plugin install mzizi@mzizi

# Codex: the server (there is no Codex plugin until mzizi-registry#520 merges)
codex mcp add mzizi --url https://mcp.mzizi.dev/mcp

# Gemini CLI (enterprise; free and Pro/Ultra users moved to Antigravity CLI on 2026-06-18)
gemini mcp add --transport http mzizi https://mcp.mzizi.dev/mcp

# VS Code
code --add-mcp '{"name":"mzizi","type":"http","url":"https://mcp.mzizi.dev/mcp"}'
  • Claude.ai, Claude Desktop: a custom connector at https://mcp.mzizi.dev/mcp, with no sign-in. For the Fundi tools, a second one at /mcp/signin with Register automatically.
  • ChatGPT: Plugins, +, Add custom MCP server, then Create as a plugin.
  • Claude API: the MCP connector, "mcp_servers": [{"type": "url", "url": "https://mcp.mzizi.dev/mcp", "name": "mzizi"}], with {"type": "mcp_toolset", "mcp_server_name": "mzizi"} in tools and the mcp-client-2025-11-20 beta header.
  • OpenAI Responses API and Agents SDK: a tool {"type": "mcp", "server_label": "mzizi", "server_url": "https://mcp.mzizi.dev/mcp"} (HostedMCPTool(tool_config=...) in the SDK).
  • The URL key differs by client: url (Cursor, Zed, Kiro, JetBrains, Devin Desktop, Cline, OpenCode), serverUrl (Antigravity), httpUrl (Gemini CLI settings.json). Cline needs "type": "streamableHttp" set explicitly (without it, it falls back to SSE), and Devin Desktop names the transport transport, not type.
  • Needs a bridge or stdio: a client that only speaks stdio (older MCP clients, and Junie, whose current help page does not confirm streamable HTTP) runs npx -y @nyuchi/mzizi-mcp (stdio, below). mcp-remote is a third-party bridge this project has not tested.

Skills over MCP. A client that cannot install the npm package (Claude.ai, ChatGPT, the APIs) gets the skills from mzizi_get_skills: no arguments lists them with their category, name returns one in full, and category (dev, design, language or build) returns every skill in it. A skill's answer lists the files it ships beside its SKILL.md (hygiene.sh, progress.sh, mzizi-design's token stylesheets); name plus file returns one file's content. The same skills are also MCP resources (mzizi://skills/<name> for the SKILL.md body, mzizi://skills/<name>/<path> for each file, listed by resources/list) and MCP prompts (skill-<name>, whose message is the whole skill), so a client that reads resources or offers prompts gets them without calling a tool. catalogue.json and mzizi_mcp_describe list every skill with its category and files. All of it is read from the skill files bundled at build time, and test/skills-surfaces.test.ts fails if any surface drifts from mzizi-skills/. Codex, Cursor, VS Code, Gemini CLI, Antigravity, Zed, OpenCode and Devin Desktop also read .agents/skills/, where npx skills experimental_sync links the npm bundle. For instruction formats that cannot hold a skill (Cursor rules, Antigravity and Devin rules, AGENTS.md), see mzizi-skills/adapters/.

How a skills change reaches this server: the skills are read from ../mzizi-skills/ in this repository at build time, not from npm and not from the registry pin. A change to a SKILL.md merged to main redeploys mcp.mzizi.dev (Workers Builds), and that deploy serves it. The npm publish of @nyuchi/mzizi-skills and the registry's dependency bump feed the plugin and api.mzizi.dev/v1/skills, not this server.

Compatibility with the MCP spec

Probed from outside with curl on 2026-11-03, with no Origin header and again with a CLI user agent (codex_cli_rs/0.1), against the Streamable HTTP page of the 2026-07-28 revision (https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/streamable-http):

Probe Result
initialize with 2025-06-18, 2025-11-25 200, application/json, same version echoed, tools, resources and prompts with listChanged; no Mcp-Session-Id (stateless)
initialize with 2026-07-28 200, answers 2025-11-25 (the legacy handshake is the highest it negotiates)
server/discover and tools/list with _meta and the headers 200; supportedVersions: ["2026-07-28"], 14 tools
tools/call without Mcp-Name 400, JSON-RPC -32020 HeaderMismatch, as the spec requires
tools/list with no initialize and no version header 200 (treated as the earliest header-less version, which the spec allows)
notification POST (notifications/initialized) 202, no body
GET on the endpoint 405 with Allow: POST, OPTIONS (the spec's answer for a server with no GET stream)
Accept: application/json alone 406; the client must list both application/json and text/event-stream
MCP-Protocol-Version: 1999-01-01 400, lists the supported versions (2025-11-25 back to 2024-10-07)
Origin: http://evil.example, Origin: null 403
Origin: https://evil.example 200 on the deployed 0.14.0: any https origin is accepted. The spec says an invalid Origin MUST get 403. The explicit allowlist merged to staging in #319 refuses it, and is live only after the next release.
/mcp/signin without a token 401 with WWW-Authenticate: Bearer ... resource_metadata=..., the OAuth flow clients start from

Deviations to know about: a JSON-RPC batch array (removed from the spec in 2025-06-18) answers a single object, not an array, and server/discover lists only the modern version while the legacy handshake still negotiates the older ones. No client was run; these are the server's answers to a plain HTTP client.

stdio (local / offline)

Run the stdio bin via npx — useful for Claude Code, Cursor, or any assistant that speaks stdio MCP. It is zero-config and credential-free: the registry data and skills ship inside the package, so every mzizi_* read works offline. The docs_* tools forward to the public docs MCP and need network.

{
  "mcpServers": {
    "mzizi": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@nyuchi/mzizi-mcp"]
    }
  }
}

Use it when you want the registry offline, or pinned to the version you installed. The hosted endpoint needs no sign-in either, so a headless agent can use either one. mzizi_report_issue needs a signed-in user and says so on the stdio bin, and mzizi_fundi is not offered there.


Where the data comes from

Nothing is read from a database, and no registry data is fetched at request time.

Data Source How it gets into the Worker
Components, index, component docs, Rust (Mzizi Roots) implementations and their crates, brand tokens, architecture helix + nodes, Ubuntu pillars/principles, conventions, AI instruction sets, changelog, rename map mzizi-dev/mzizi-registry at the commit pinned in registry.pin.json scripts/generate-registry.mjs fetches that exact commit and calls the registry's API route handlers once per resource, writing src/generated/registry.ts
Agent skills ../mzizi-skills/skills/*/SKILL.md in this repo scripts/generate-skills.mjs → src/generated/skills.ts
Documentation the Mintlify MCP at https://docs.mzizi.dev/mcp federated live — see below

Both generated files are build output: gitignored, never committed, rebuilt by pnpm generate (which build, build:worker, cf:dev, cf:deploy, test, typecheck and check all run first), by the Vite config, and by wrangler.toml's [build] command. They are no-ops when current.

Because the generator runs the registry's route handlers rather than re-deriving their output, a tool here answers with the same payload api.mzizi.dev/v1 would give at the pinned commit. The registry removed those handlers with its Next.js app (mzizi-registry#389), so the eleven the generator calls are ported, unchanged but for formatting, from its last commit with them, 270af9f, into scripts/registry-handlers/. They still call the pinned registry's own lib/ readers, so the data is the pin's; nothing imports the registry's app/ tree. The registry checkout has no node_modules: every npm package a route imports is replaced with a module that throws on use, so a route that still reads a database fails the build rather than shipping an empty answer.

Moving to newer registry content (bumping the pin) is a one-line PR, and a bot opens it: .github/workflows/registry-pin-bump.yml checks registry main hourly, keeps one pull request on bot/registry-pin, and merges it (rebase) when every check is green; a failed check waits for review (root README, "Registry pin bump"). By hand, the steps are:

  1. Pick the mzizi-registry commit to ship (a full 40-character SHA on its main).
  2. Set ref in registry.pin.json to it.
  3. Run pnpm --filter @nyuchi/mzizi-mcp test locally, or let CI do it. The generator fetches that commit, and test/registry-bundle.test.ts checks the bundle ref equals the pin and calls every registry tool against it.
  4. Merge. Workers Builds rebuilds with the new pin and deploys it. The npm bin picks it up at the next version bump.

mzizi_mcp_describe and /catalogue.json report the pinned commit as source.registry, so you can check what is live.

Components are Rust first (Mzizi Roots): where the registry has a Rust implementation, it is the lead. The TSX components are the React build, and keep working.

Former nyuchi-* component names (renamed to mzizi-* on 2026-09-27) resolve through the registry's lib/component-renames.json, bundled with the rest.

Docs — joined in from docs.mzizi.dev

The documentation site runs its own MCP server (Mintlify; streamable HTTP, public, stateless). This server lists its tools under a docs_ prefix and forwards each call, passing the result through untouched:

  • the upstream tool list is cached for 5 minutes;
  • if a refresh fails the last good list is reused, and with nothing cached a built-in snapshot of the upstream definitions keeps the surface stable;
  • a failed call is a tool error naming the docs server and the reason.

Tools

Tool Returns
mzizi_search Word search over components, conventions, AI instruction sets and releases
mzizi_get_component One component in full, Rust first; include: ["docs", "versions"]
mzizi_list_components The lean, paged index; filter by node, owner, collection, type, rust
mzizi_get_tokens Brand system; family: "colors" for all 21 colour families, "floors" for the Bundu floor
mzizi_get_architecture The DNA helix, or one node/rung with node (uncapped)
mzizi_get_doctrine ubuntu-pillars, ubuntu-principles, ai-instructions, conventions, bundu-floor
mzizi_get_skills The agent skills: listed, one by name (with file), or a category
mzizi_check_accessibility WCAG 2 contrast ratio and the Mzizi 7:1 floor, and spacing values against the spacing floor, computed locally (not APCA)
mzizi_report_issue Your issue desk. Sign-in
mzizi_fundi Delegate to fundi (when the Worker can reach fundi). Sign-in
mzizi_mcp_describe This server's tools, their access, what each replaces, and data sources
docs_search_mzizi Search the documentation (forwarded)
docs_query_docs_filesystem_mzizi Read-only rg/cat/tree over the doc pages (forwarded)
docs_submit_feedback Report a documentation problem (forwarded)

How the tools behave (SDK v2, #295).

  • Built on the official MCP TypeScript SDK v2 (@modelcontextprotocol/server). Over HTTP it serves the 2026-07-28 revision (server/discover, per-request _meta, no sessions) through the SDK's createMcpHandler, and 2025-era clients (initialize) through the SDK's Streamable HTTP transport with JSON responses. Every request gets a fresh server; nothing is shared between callers. GET and DELETE answer 405.
  • Every tool has a title and all four annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint). mzizi_search, mzizi_list_components and mzizi_check_accessibility declare an outputSchema and return matching structuredContent.
  • Size limit: mzizi_search and mzizi_list_components stop a page at 25,000 characters (CHARACTER_LIMIT, src/limits.ts) by returning fewer items. has_more and next_offset (meta.has_more / meta.next_offset on search) say where the next page starts; mzizi_list_components also keeps hasMore / nextOffset for older clients.
  • A domain failure (unknown component, bad colour, sign-in needed) is a tool result with isError: true and text that says how to recover, never a protocol error.
  • Browser origins (Streamable HTTP §Security): a request with an Origin header whose host is not on the list is refused with 403 before any server is built, on /mcp, /mcp/signin and every other path starting with /mcp, with or without a token, and before the anonymous rate limit is charged. The code refuses a present but empty Origin (only a missing header counts as no Origin), though workerd appears to deliver an empty header as absent. The list is mzizi.dev, www.mzizi.dev, docs.mzizi.dev, app.mzizi.dev and mcp.mzizi.dev, each over https on the default port only (no http, no :8443, no other subdomain), plus localhost on any port. Add more with the MZIZI_ALLOWED_ORIGINS variable, comma-separated https://host origins (case and a trailing slash are tolerated; anything else that is not a plain https origin is dropped with a logged warning). Clients that send no Origin (every non-browser client) are not affected. On /mcp, CORS echoes an allowed Origin with Vary: Origin and never answers Access-Control-Allow-Origin: *. The OAuth provider's own endpoints follow src/auth/cors.ts (0.16.0; the provider's own CORS, which echoed any Origin, is replaced): /.well-known/* are public discovery documents and answer Access-Control-Allow-Origin: * (GET, HEAD, OPTIONS); /token and /register echo an Origin only if it is on the same list as /mcp and always send Vary: Origin. A listed Origin gets POST, OPTIONS, Content-Type, Authorization and Access-Control-Max-Age: 600; an unlisted or null Origin is still served but gets no Access-Control-Allow-Origin, so a browser cannot read the answer; a request with no Origin is unaffected. Errors (400, 401, 405, 429, 5xx) carry the same headers. No Access-Control-Allow-Credentials anywhere. /catalogue.json is * on purpose. Browser clients hosted on other sites cannot call /mcp (src/origin.ts is the one list).
  • PKCE and token audience: the authorization-server metadata advertises S256 only. Audience binding applies only to clients that send a resource indicator (RFC 8707): such a token is refused on a different server or path, but a token for /mcp is also accepted on /mcp/signin (path-prefix matching, the same server). A token minted with no resource has no audience and is served on /mcp and /mcp/signin (see the CHANGELOG, #295).
  • Calls to fundi and to the identity provider time out after 15 s.
  • evals.xml holds ten read-only questions with answers checked against production.

The Bundu floor, and the spacing floor in it. The registry's minimums nothing can go under are served three ways, all read from the bundled registry's /v1/brand accessibility block at the pinned commit (minTouchTarget, minInset, minControlGap, minLabelGap, minItemGap, minBodyLeading), never typed in this repo (src/floors.ts): mzizi_get_tokens family=floors (also family=accessibility, and family=spacing, which returns spacingFloor beside the scale), mzizi_get_doctrine topic=bundu-floor, and the floors block of mzizi_mcp_describe, the mzizi://tools resource and GET /catalogue.json. The spacing floor (owner, 2026-11-04, mzizi-registry#617) is a 14px inset between text and its container edge (--inset-floor), 7px gaps between adjacent controls, between a label and its field and between sibling items (--gap-floor), and 1.5 body leading (--leading-floor). mzizi_check_accessibility takes insetPx, controlGapPx, labelGapPx, itemGapPx and leading beside (or instead of) the two colours, compares each with that floor and returns spacing: { floor, checks, meetsFloor }. If the pinned registry commit predates the floor, floors.spacing is null, the tool descriptions name no number, and a spacing check is a tool error saying so (or, beside colours, a spacingUnavailable note); the tools never answer from a copy. To check a project's source rather than values, run mzizi check (@nyuchi/mzizi-cli).

Text colours from mzizi_get_tokens. Every colour family carries textLight / textDark: use them for text in that colour on the base surface (they are --color-<name>-text). On a family's container, use onContainerLight / onContainerDark. Never use hex, lightHex or darkHex as a text colour: they are accents and fills.

The tool list is whatever tools/list returns. The docs_* names mirror whatever docs.mzizi.dev lists; the three above are what it lists today (checked against the live /catalogue.json on 2026-09-29). GET /catalogue.json and the mzizi://tools resource are computed from the same registration path.

Rust first (from 0.11.0). Mzizi's own components are being converted to Rust as Mzizi Roots; the TSX components are the React build, deprioritised. The registry tools present the Rust implementation first wherever one exists:

  • mzizi_get_component returns {name, renamedFrom?, lead, note, rust, react, docs?, versions?}, in that order.

    • lead is "rust" when the component has a Rust implementation, else "react".

    • rust is the registry's GET /v1/rs/{name} answer, reordered so the install comes before the source:

      • crate: {name, registry, git}, from the registry's crateFor and CRATE_GIT.
      • install.cargo: cargo add <crate>, the crates.io release.
      • install.pinned: the same with --git https://github.com/mzizi-dev/mzizi-registry --rev <pin>, which builds exactly the source shown.
      • module: the crate's Rust path, e.g. mzizi_ui.
      • contract: the RFC-0006 contract … end block from the source's CONTRACT const, or null when the source declares none.
      • files[]: the .rs source, inline.

      With no Rust, rust is null, and note carries the registry's own "ships for React only" wording.

    • react is the React build: build: "react", status: "deprioritised", install (npx shadcn@latest add https://api.mzizi.dev/v1/ui/<name>), then the registry's GET /v1/ui/{name} body unchanged (shadcn-shaped, files[] inline). If the registry refuses the React build but Rust exists, react is {build, error} and the Rust still leads.

    • react.vendor is what you need to vendor the React build without calling the API:

      • registry: {repository, ref}, the registry commit this server's data comes from.
      • files[]: {path, target, url, sha256}. url is https://raw.githubusercontent.com/mzizi-dev/mzizi-registry/<ref>/<path>, pinned to the same ref the sha256 is taken at.
      • imports[]: every @/ specifier the files import, re-export or load with a dynamic import() (comments are ignored), with providedBy, the declared registry dependency that installs it, or null. @/lib/utils is provided by the registry's utils item, or by shadcn init in a project that ran it.
      • live.url: https://api.mzizi.dev/v1/ui/<name>, labelled live. It serves the commit the API is deployed at, which can differ from registry.ref.
      • What sha256 covers: the registry source at path@ref, which is what files[].url serves. A file written by shadcn add can differ: shadcn strips "use client" when the project sets rsc: false, and rewrites @/ aliases to the project's own. Hash the registry source, not the installed file.
    • Breaking for readers of 0.10.x: the React body moved from component to react, and renamedFrom moved to the top level.

  • mzizi_list_components rows carry rustCrate when the component has Rust (absent otherwise), the response carries withRust (how many of total have Rust), and rust: true / rust: false filters on it.

  • mzizi_search component hits carry rustCrate the same way, and at an equal score a component with Rust ranks first. A better word match still wins.

  • The generator calls the registry's own /v1/rs/{name} route handler for every component, as it does /v1/ui/{name}. Only components with Rust are stored; the no-Rust answer is stored once as a template, which the build checks against every component's real answer. This adds about 0.6 MiB to the Worker upload (gzip about +160 KiB; see the CHANGELOG for the measured sizes).

Shape notes (changed when the registry moved into the build).

  • mzizi_get_component with include: ["versions"] is derived from the committed changelog and rename map: rows are {version, title, change, breaking, released_at} with meta.previousNames. The database view it used to read is gone from this path.
  • mzizi_search returns {data: [{kind, name, title?, description?}], meta}, with kind one of component | convention | ai-instruction | release. Documentation pages are searched by docs_search_mzizi.
  • mzizi_get_doctrine gained the conventions topic (list, or one by name).

Environment / secrets

HTTP Worker (Cloudflare)

Secrets (wrangler secret put):

Secret Required Notes
COOKIE_ENCRYPTION_KEY yes HMAC key for the consent cookie (random bytes)
WORKOS_AUTHKIT_DOMAIN yes AuthKit domain for /oauth2/*; set per environment, never committed (no default)

There is deliberately no GITHUB_TOKEN here. The issue desk used to file GitHub issues itself with a PAT that was never set on this Worker, so every report parked at drafted and no maintainer ever saw one. mzizi_report_issue now reproduces, drafts, and logs the issue to fundi over the FUNDI_SERVICE binding; fundi holds the PAT, files the GitHub issue with its healing plan in it, and writes that issue's lifecycle back to D1 — which is what lets the desk (and the console) say whether yours was picked up or closed.

WORKOS_AUTHKIT_DOMAIN is a secret and not a [vars] entry, even though a hostname is not confidential: a var wins on every deploy and silently discards a same-named remote value, so a value that differs per environment cannot live in committed config. It is "not required" only because src/identity.ts carries a working default — and it must move in lockstep with mzizi-fundi, which binds the same issuer that this Worker's agent-card consumers are pointed at. See AUTH.md.

Plain vars ([vars] in wrangler.toml, not secrets):

Var Notes
WORKOS_CLIENT_ID Connect OAuth app client id (public client; PKCE)
WORKOS_M2M_CLIENT_ID Fundi M2M app client id; used only on the HTTP + M2M fallback
FUNDI_URL Base URL of the fundi worker, for the HTTP + M2M fallback
MZIZI_ALLOWED_ORIGINS Optional, unset by default. Extra browser origins for /mcp, comma-separated https://host (e.g. https://partner.example); a public setting, so a var, not a secret. See "Browser origins"

Bindings (wrangler.toml): FUNDI_SERVICE (Service Binding to mzizi-fundi's FundiInternal entrypoint; what makes fundi reachable in production), ISSUE_DESK (one Durable Object per signed-in user), OAUTH_KV (the OAuth provider's store) and ANON_RATE_LIMIT (the free tier's per-IP limit).

The Connect OAuth app is a public client (PKCE) — there is no WORKOS_CLIENT_SECRET or WorkOS API key on the worker.

Optional: fundi-caller extras (only on the HTTP + M2M fallback, e.g. wrangler dev; the deployed Worker uses the Service Binding and needs no M2M secret):

Name Kind Purpose
WORKOS_M2M_CLIENT_SECRET secret Fundi M2M app secret (Worker secret; never in code)

stdio / local dev

The stdio bin takes no environment and holds no credential. (MZIZI_API_BASE is gone: there is no registry API to point at. Build with a different pin instead.)

At build time only, MZIZI_REGISTRY_DIR points the generator at an existing mzizi-registry checkout instead of fetching one; its HEAD must equal the pin.


Entrypoints

Surface Entry Use
stdio bin: mzizi-mcp Local AI assistants (Claude Code, Cursor, etc.)
HTTP / Worker mzizi-mcp/http Cloudflare Workers + any fetch runtime
Library @nyuchi/mzizi-mcp Embed the server factory in your own host

Source files:

  • src/server.ts — createMziziMcpServer() factory
  • src/http.ts — createMziziHttpHandler() for any fetch runtime
  • src/worker.ts — Cloudflare Worker: the free-tier front, and the OAuth provider for sign-in
  • src/access.ts — which tools need sign-in, the sign-in URL, and the rate limit
  • src/stdio.ts — bin: mzizi-mcp for the MCP registry / local Claude Code

Build and deploy

# generate src/generated/* (registry bundle at the pin + skills); every script below runs it first
pnpm --filter @nyuchi/mzizi-mcp generate

# typecheck
pnpm --filter @nyuchi/mzizi-mcp typecheck

# build (tsc → dist/)
pnpm --filter @nyuchi/mzizi-mcp build

# local Worker dev
pnpm --filter @nyuchi/mzizi-mcp cf:dev

# wrangler dev (workerd) integration: the real Worker anonymously + the signed-in path
pnpm --filter @nyuchi/mzizi-mcp integration

# deploy manually (Workers Builds handles pushes to main)
pnpm --filter @nyuchi/mzizi-mcp cf:deploy

Cloudflare Workers Builds deploys this Worker on every push to main — it is connected to the repo and surfaces as the Workers Builds: mzizi-mcp check. There is no deploy workflow in .github/workflows/; the one that used to live there was redundant and is gone (#98).

A build fetches the pinned mzizi-registry commit (public, anonymous git fetch of one commit), so the build environment needs outbound access to github.com. A failed fetch fails the build, and a failed build deploys nothing — the running version stays up.

Rollback: Cloudflare dashboard → Workers & Pages → mzizi-mcp → Deployments → pick the previous version → Rollback, or wrangler rollback from mzizi-mcp/. Reverting the squash commit on main (merges are squash, through the merge queue) redeploys the previous source through Workers Builds.


License

Apache-2.0. Part of the Mzizi agent tooling (mzizi.dev). Copyright the Bundu Foundation; see the repository NOTICE.