9d9

MCP server

Wire Claude Desktop, Cursor, or any MCP-aware assistant to manage your 9d9 site.

The 9d9 MCP server exposes your site's headless CMS and deploy controls as tool calls. The assistant can list pages, write new ones in markdown, rollback a deploy, attach domains — all from chat.

What MCP doesn't do: ship a static-site build directory. A full dist/ with hundreds of files goes through the CLI — the assistant can shell out to 9d9 deploy. MCP handles the CMS side and the deploy control plane.

Setup

Pick your tool. Each snippet has a copy button — paste it where indicated, restart the tool, and ask: "List the pages on my 9d9 site."

Run this once in your terminal — Claude Code writes the config for you:

claude mcp add 9d9 -- npx -y @9d9dev/mcp

Restart Claude Code (or open a new session). /mcp in Claude Code shows the connected servers.

Not listed? Any client that speaks MCP can run npx -y @9d9dev/mcp as a stdio server.

The server ships a playbook via MCP's instructions field, so connected assistants get orchestration patterns (build a site, update text, attach a domain, rollback) in their system prompt automatically — no per-client setup.

First-time auth

The MCP server reads .9d9.json from the current working directory (walking up to find it) — the same file the CLI uses. Easiest setup: cd into the project, then 9d9 set-key ak_xxx --org=org_xxx. After that the MCP server picks it up automatically as long as it's launched from inside that repo.

Each repo gets its own binding, so switching sites means switching directories — no global config to leak across projects.

If you can't run a shell command (sandboxed assistants), call the save_api_key tool directly with the key + org_id.

Tools

Content

  • list_pages(org_id) — slug/title/status for every page.
  • get_page(org_id, slug) — full content (markdown body, meta).
  • upsert_page(org_id, page) — create or replace. Body is markdown; status is draft or published.
  • publish_page(org_id, slug) — flip status to published and snapshot a revision.

Deploys

  • list_deploys(org_id) — recent deploys with status, file count, timestamps.
  • activate_deploy(org_id, deploy_id) — rollback to a previous deploy.

Site config

  • attach_domain(org_id, domain, mode) — BYO returns DNS instructions; buy registers through 9d9.
  • get_status(org_id) — site metadata + brand profile.
  • save_api_key(key, org_id) — write auth to .9d9.json in the server's working directory.

Example session

You: List the pages on my 9d9 site, then add a new "About" page with this content: "We're a small consultancy that builds AI-first products. Get in touch at hello@example.com."

The assistant calls list_pages, sees there's no About page, then calls upsert_page with status=published and the markdown body. Site at your-slug.9d9.dev hits /v1/sites/.../public/pages/about on its next build (or runtime fetch) and renders it.