Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.avocadostudio.dev/llms.txt

Use this file to discover all available pages before exploring further.

The Avocado Studio MCP Server exposes pages, blocks, and block discovery as Model Context Protocol tools. Plug it into Claude Desktop (or any MCP host) and Claude can read and edit your site with the same operations the web editor uses.
Current status: Phases 1, 2, 3a shipped — 40 tools, both stdio and streamable HTTP transports. One site per install. Claude connector directory listing + OAuth land in Phase 3b.

What you get

The MCP server is a thin wrapper: every mutation goes through POST /ops on the orchestrator, so Zod validation, undo history, version log, and demo-mode gating all still apply.

Tool catalog

Discovery

ToolWhat it does
avocado-list-block-typesLists every block type the site can render (Hero, CTA, FAQAccordion, …).
avocado-get-block-schemaReturns the JSON schema + field metadata for a block type — call before writing props.

Pages

ToolWhat it does
avocado-get-pageFetches a page’s full draft document.
avocado-list-pagesLists every page slug in the draft.
avocado-create-pageCreates a new page with an initial blocks array.
avocado-rename-pageChanges slug and/or title. Internal links rewrite automatically.
avocado-duplicate-pageClones a page, optionally under a new slug.
avocado-remove-pageDeletes a page. Undo-able.
avocado-update-page-metaPatches SEO fields (title, description, ogImage).

Blocks

ToolWhat it does
avocado-add-blockInserts a new block into a page.
avocado-update-block-propsPatches one or more props on an existing block.
avocado-remove-blockDeletes a block.
avocado-move-blockReorders a block within a page.
avocado-duplicate-blockClones a block, optionally to another page.
avocado-add-list-itemAppends/inserts an item into a block’s list field (features, cards, faqs…).
avocado-update-list-itemPatches fields on a single list item by index.
avocado-remove-list-itemRemoves a list item by index.
avocado-move-list-itemReorders a list item.

Sites

ToolWhat it does
avocado-register-siteRegister/update the site entry (preview URL, name, port, purpose, secret).
avocado-list-sitesList every site registered under the current session.
avocado-get-site-configFetch the site’s config (name, logo, tone, purpose, nav labels/groups).
avocado-update-site-configPatch the site config (name, logo, navLabels, navGroups). Undo-able.

Media

ToolWhat it does
avocado-upload-imageUpload an image (base64) to the orchestrator; returns a URL usable as a block prop.
avocado-generate-imageGenerate an image from a prompt via OpenAI or Gemini.
avocado-search-unsplashSearch Unsplash for stock photos.
avocado-transcribe-audioTranscribe a base64 audio clip via OpenAI Whisper.
avocado-interpret-imageVision analysis: image → one-sentence summary (useful for alt text or screenshot-to-intent).

Publishing

ToolWhat it does
avocado-compute-publish-diffDiff between the current draft and the last published snapshot.
avocado-publish-contentPublish the draft to the live site. Requires AVOCADO_PUBLISH_TOKEN.
avocado-get-publish-statusPublish tracker: target type, state, last deployment, URLs.
avocado-list-snapshotsList published snapshots (commits) available for restore.
avocado-restore-snapshotRewind the draft to a published snapshot by commit sha.

History

ToolWhat it does
avocado-undo-editUndo the last change on a page.
avocado-redo-editRedo the last undone change.
avocado-restore-versionJump to a specific version from the history log (doesn’t consume undo/redo).

Planner

ToolWhat it does
avocado-chat-planSend a natural-language instruction to the planner; orchestrator figures out which ops to apply and runs them. May return a pendingPlanId if the plan needs approval.
avocado-preview-planRun the planner in plan-only mode — returns the would-apply ops without mutating state. Ideal for review-before-approve flows.
avocado-approve-pending-planApply the pending plan waiting for approval. Pass pendingPlanId from the prior chat response to protect against race conditions.
avocado-discard-pending-planReject/discard the pending plan.

Preview

ToolWhat it does
avocado-screenshot-pageCaptures a full-page screenshot of the draft (via Playwright) and returns it as an inline JPEG. Required for visual feedback in chat-only hosts like Claude Desktop that can’t render the live preview iframe. Site must have a previewUrl registered.

Install

Claude Desktop

Open ~/Library/Application Support/Claude/claude_desktop_config.json and add:
{
  "mcpServers": {
    "avocado-studio": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/apps/mcp-server/src/index.ts"],
      "env": {
        "ORCHESTRATOR_URL": "http://localhost:4200",
        "AVOCADO_SESSION": "dev",
        "AVOCADO_SITE_ID": "avocado-stories"
      }
    }
  }
}
Restart Claude Desktop. Open Settings → Connectors → avocado-studio to set per-tool permissions (Always allow / Ask / Never allow). The discovery and get tools are safe to auto-allow; keep mutations on Ask.

Claude Code

claude mcp add avocado \
  --env ORCHESTRATOR_URL=http://localhost:4200 \
  --env AVOCADO_SESSION=dev \
  --env AVOCADO_SITE_ID=avocado-stories \
  -- npx tsx /absolute/path/to/apps/mcp-server/src/index.ts

HTTP transport (remote / custom connector)

Start the HTTP server:
AVOCADO_SITE_ID=avocado-stories \
AVOCADO_MCP_BEARER_TOKEN=$(openssl rand -hex 32) \
pnpm --filter @ai-site-editor/mcp-server start:http
Output: avocado-studio MCP server listening on http://localhost:4300/mcp In Claude Desktop → Settings → Connectors → Add custom connector:
  • URL: http://localhost:4300/mcp
  • Auth: Bearer token — the value you passed as AVOCADO_MCP_BEARER_TOKEN
Stateless mode — each POST is a self-contained JSON-RPC call. Health probe at GET /healthz (no auth) for load balancers.

Environment variables

VarRequiredDefaultNotes
AVOCADO_SITE_IDyesWhich site this install edits.
ORCHESTRATOR_URLnohttp://localhost:4200Points at the orchestrator.
AVOCADO_SESSIONnodevSession key that scopes draft state.
AVOCADO_PUBLISH_TOKENnoOnly needed to enable avocado-publish-content. Must match the orchestrator’s DRAFT_MODE_SECRET.
AVOCADO_MCP_BEARER_TOKENyes (HTTP mode)Bearer token clients must present. Only read by src/http.ts.
AVOCADO_MCP_PORTno4300Port for HTTP mode.

How agents should use it

  1. Discover first. Call avocado-list-block-types once, then avocado-get-block-schema for any type you’re about to add or edit. The schema tells you which props are required and which enum values are valid.
  2. Read before mutate. Call avocado-get-page to get block ids before avocado-update-block-props — block ids are stable and opaque.
  3. Prefer structural ops over full rewrites. avocado-update-list-item with an index + patch is cheaper and safer than replacing the whole list via avocado-update-block-props.

Roadmap

  • Phase 1 + 2 + 3a — shipped. 39 tools across 8 groups. Stdio transport (local install) and streamable HTTP transport (custom connectors, remote deploy) both work with the same tool registry. Approve/reject plan loop supported.
  • Phase 3b — Hosted deployment (Render) + OAuth in front of /mcp (replaces shared-secret bearer with proper login flow, same UX as “AEM Content MCP Service”). Submit to Claude’s connector directory. Add per-tool read-only annotations and audit logging.
  • Phase 4 — MCP resources (pin a page as context), MCP prompts (slash-command templates), typed client generated from the orchestrator OpenAPI.