Model Context Protocol · beta

automad-mcp-server

An MCP server for the Automad v2 CMS. Point any MCP-capable AI agent at your site and let it manage pages, media, shared data, config and local themes — with an offline documentation knowledge base that works without a backend at all.

13 tools 4 resources 5 prompts 467 tests, 39 files Node ≥ 20 stdio transport MIT

What it does

Every tool takes an action and dispatches to a domain router. Live-API actions map to real, live-verified /_api/{controller}/{method} endpoints on your Automad instance.

Two modes

full bridges a live instance over its JSON API. docs runs standalone — offline knowledge base plus local theme tooling, no instance and no credentials.

Safe by default

Three write modes. Destructive actions return a confirm token bound to an (action, target) pair; the agent has to replay the call to execute it.

Theme tooling

Scaffold from a starter kit, build (Composer + npm), run a live dev server in the background with a single call, analyze, validate, derive a normalized field schema, preview writes as a unified diff, generate snippets and blocks.

Offline docs

A bundled Automad v2 knowledge base — template syntax, control structures, navigation, i18n, blocks, theme.json, headless usage — searchable with zero backend.

Discovery facade

automad_discover enumerates the whole tool/action surface, or returns one action's input schema on demand, so the full surface doesn't have to sit in context up front.

One source of truth

Tools, action enums, the write-guard's classification and the docs tables are all derived from a single capability registry. Adding a tool is one entry plus one binding.

Tools

Generated from the capability registry — this table cannot drift from the code.

ToolActionsWhat it does
automad_pageslist get create update delete move duplicate publish batch_update trash_list trash_restore trash_permanently_delete trash_clear history history_restore breadcrumbs publication_state recent discard_draftManage Automad pages
automad_medialist upload import deleteManage Automad media
automad_sharedget setManage site-wide shared data
automad_configget set cache_clear cache_purgeManage Automad configuration
automad_siteinfo search healthInspect and search the site
automad_docslist search getOffline Automad v2 knowledge base
automad_themelist install activate uninstall list_installed outdated update update_all scaffold build dev dev_stop dev_status read write files analyze validate schema diff generateManage and inspect local themes
automad_imagelist saveManage image variants via v2 image controllers
automad_componentsdata publication_state discard_draft publishManage per-page component fields (v2 ComponentController)
automad_mailsave test resetManage Automad mail configuration (v2 MailConfigController)
automad_systemcheck_for_update updateCheck for and run Automad core updates (v2 SystemController)
automad_file_metaedit_infoEdit file metadata (alt text, etc.) via v2 FileController
automad_discoverlist describeIntrospect available tools and actions

Four MCP resources (automad://themes, automad://themes/{slug}/schema, automad://docs, automad://docs/{slug}) and five workflow prompts ship alongside the tools.

Quick start

The package is not on npm yet — build it from source and point your MCP client at dist/index.js.

Build the server

git clone https://github.com/cabroe/automad-mcp-server
cd automad-mcp-server
npm install && npm run build

Try it without an Automad instance

AUTOMAD_MODE=docs node dist/index.js

Docs mode needs no URL, no credentials and no running site: the offline knowledge base, the discovery facade and (with a themes path) the theme tooling all work.

Wire it into an MCP client

{
  "mcpServers": {
    "automad": {
      "command": "node",
      "args": ["<repo>/dist/index.js"],
      "env": {
        "AUTOMAD_URL": "https://site.example.com",
        "AUTOMAD_USER": "admin",
        "AUTOMAD_PASS": "••••••",
        "AUTOMAD_THEMES_PATH": "<automad>/packages",
        "AUTOMAD_WRITE_MODE": "confirm-destructive"
      }
    }
  }
}

Per-editor config paths for Claude Desktop, Claude Code, Cursor, Cline and Zed are in the README.

Write protection

Set with AUTOMAD_WRITE_MODE. The classification lives in the capability registry, so what the guard enforces is exactly what the tools advertise.

read-only

Only the 33 read actions succeed. Everything else returns FORBIDDEN.

confirm-destructive · default

Ordinary writes run directly. The 30 destructive actions return a confirm token (5-minute TTL, bound to (action, target)) that has to be replayed.

unrestricted

Everything runs immediately. Use it for scripted runs against a site you can restore.

Requirements & status

You need

  • Node.js ≥ 20
  • An Automad v2 instance for full mode (v1 is not supported) — or nothing at all for docs mode
  • Dashboard credentials: v2 has no API-token model, so the server authenticates with a session cookie and per-request CSRF token
  • An absolute themes path if you want the theme tooling

Status: beta

  • Verified against a live automad/automad:v2 container
  • Covered by unit tests plus opt-in live E2E tests, on Node 20 and 22
  • stdio only — an HTTP transport is the orchestrator's job, by MCP convention
  • Not published to npm yet; install from source