MCP server
Edit your website from Claude Code.
The Avocado Studio MCP server exposes a site’s pages, blocks, media and publishing over the Model Context Protocol, so Claude Code, Claude Desktop and other MCP hosts can edit it the same way a person does in the editor — with the same validation, undo history and preview.
- Package
@avocadostudio-ai/mcp-server- Transports
- stdio, or streamable HTTP with a bearer token
- Hosts
- Claude Code, Claude Desktop, any MCP client
- Scope
- One site per install
- Tools
- Over 40: discovery, pages, blocks, media, publishing, history, planner, screenshots
- Licence
- Apache-2.0
Add it to Claude Code
Each install is bound to one site. Point it at your Avocado orchestrator and name the site; the tools appear in Claude Code straight away.
claude mcp add avocado \
--env ORCHESTRATOR_URL=http://localhost:4200 \
--env AVOCADO_SESSION=dev \
--env AVOCADO_SITE_ID=my-site \
-- npx -y @avocadostudio-ai/mcp-serverWhat an agent can do
- Discover the block types a site uses and the schema of each, before it changes anything.
- Pages: read, list, create, rename, duplicate, remove, and update page meta — titles and descriptions included.
- Blocks: add, edit, move, duplicate and remove blocks and their list items.
- Media: upload or generate images, search Unsplash, transcribe audio, describe an image.
- Publishing: compute the publish diff, publish, list and restore snapshots.
- History and planning: undo, redo, restore a version, and propose, preview, approve or discard a plan.
- Screenshots of the rendered page, so a chat-only host such as Claude Desktop can see what it changed.
The editor’s rules, not a side door
The MCP server is a thin wrapper over the orchestrator’s API. Every change goes through the same validation, operations engine, undo stack and version log as an edit made in the editor, so an agent cannot write a block the schema does not allow.
- Reads are safe to mark Always allow; keep mutations on Ask.
- Publishing through MCP needs a publish token. Leave it out and the agent can draft but never publish.
Claude Desktop and remote hosts
Run the HTTP transport and add it in Claude Desktop under Settings → Connectors → Add custom connector, with the URL and a bearer token you generate. It runs stateless, so every request stands alone.
AVOCADO_SITE_ID=my-site \
AVOCADO_MCP_BEARER_TOKEN=$(openssl rand -hex 32) \
npx -y -p @avocadostudio-ai/mcp-server avocado-mcp-http
# → listening on http://localhost:4300/mcpAgent skills for setting it up
A separate package writes Avocado’s setup instructions into your project as agent skills: .claude/skills for Claude Code and .agents/skills for Cursor, Codex and Gemini through the cross-agent skills CLI. Then ask your coding agent to add Avocado to the site. The skills ship with each release, so the instructions match the version you installed.
npx @avocadostudio-ai/skillsFAQ
MCP server: common questions
Which MCP hosts work with the Avocado Studio MCP server?
Claude Code and Claude Desktop are documented, and any MCP client that speaks stdio or streamable HTTP can connect.
Can an agent publish my site without asking?
Only if you give it the publish token. Without it the agent can draft changes but cannot publish, and each tool can be set to Always allow, Ask or Never allow in the host.
Is there a hosted Avocado MCP server?
Not yet: you run the server yourself, locally or on your own infrastructure. A hosted deployment with OAuth is on the published roadmap.
Can one MCP install edit several sites?
No. Each install is scoped to one site, set when it launches. Add one install per site.
Does the MCP server need Avocado Studio’s editor running?
It needs an Avocado orchestrator to talk to — the part that validates and stores edits — set with ORCHESTRATOR_URL. The editor UI itself does not have to be open.
Try it on a real site in one command.
Scaffold the demo site with the editor, or run it inside an existing Next.js project to wire Avocado Studio in. Open source under Apache-2.0; bring your own Anthropic, OpenAI or Gemini key.
npm create avocado-site@latest