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 fulldist/with hundreds of files goes through the CLI — the assistant can shell out to9d9 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.
Open Settings → Developer → Edit Config (or edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows). Add this server:
{
"mcpServers": {
"9d9": { "command": "npx", "args": ["-y", "@9d9dev/mcp"] }
}
} Fully quit Claude Desktop (⌘Q) and reopen. The hammer icon in the chat box will list 9d9's tools.
Edit ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in a single project. Add this server:
{
"mcpServers": {
"9d9": { "command": "npx", "args": ["-y", "@9d9dev/mcp"] }
}
} Open Cursor Settings → MCP and toggle 9d9 on. The tool list appears in the agent panel.
Edit ~/.codeium/windsurf/mcp_config.json and add this server:
{
"mcpServers": {
"9d9": { "command": "npx", "args": ["-y", "@9d9dev/mcp"] }
}
} Open Cascade → click the hammer icon → Refresh. 9d9 appears in the available servers.
Create .vscode/mcp.json in your project (or add to your user-level mcp.json via the command palette → "MCP: Add Server"):
{
"servers": {
"9d9": { "command": "npx", "args": ["-y", "@9d9dev/mcp"] }
}
} Reload the window. In Copilot Chat, switch to Agent mode and 9d9's tools become callable.
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 isdraftorpublished.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;buyregisters through 9d9.get_status(org_id)— site metadata + brand profile.save_api_key(key, org_id)— write auth to.9d9.jsonin 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.