Getting started

Statamic MCP

Statamic MCP lets AI clients read and write your Statamic 6 content, with every request running as a real Statamic user.

On this page
Painting of a small sailboat on still water at sunset, with the words Statamic MCP in the sky

Statamic MCP is an addon that lets AI clients such as Claude Code, Cursor, claude.ai, and ChatGPT work with your Statamic 6 site. They can read and write entries, taxonomy terms, globals, assets, and navigation menus, and they can read what your forms collect.

Every request runs as a real Statamic user. There are no API scopes and no second access list, so the roles you already manage in the Control Panel decide what an agent can do.

It’s built on Laravel’s laravel/mcp package and speaks MCP over streamable HTTP. The source is on GitHub under the MIT license.

Quick start#

Install the addon. The endpoint is then live at /mcp/statamic, and it rejects every request until you issue a token.

composer require danielgnh/statamic-mcp

Issue a token for the Statamic user the agent will act as.

php please mcp:token [email protected] --name="Claude Code"

The command prints the token once, then a ready-to-paste command for Claude Code and a config block for Cursor. Add the server to your client and ask it which collections your site has.

Using claude.ai, Claude Desktop, or ChatGPT? Those clients need OAuth mode. Connect a client builds the exact steps for yours.

What an agent can do#

The server has 28 tools. A default single-site install registers 23 of them. The four delete tools don’t exist until you turn on deletes, and entries_localize only exists on multi-site.

The server tells agents to call statamic_overview first. It lists the sites and resources the user can reach and what they may do in each. Before writing, the agent calls blueprints_get, which returns a blueprint’s fields, the blocks of each page builder field, and a valid example payload.

What happens to a request#

Each request passes through these checks in order, and the first one that fails decides the answer. Pick a request to see where it stops. Every response below was recorded from the real server.

Send a request through it
Validate and save

Blueprint validation, then the same save path as the Control Panel. The result always states whether the change is live.

Set by Your blueprints

entries_create on a collection the role may create in
HTTP 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"606937f8-…\",\"slug\":\"first-ride\",\"site\":\"en\",\"status\":\"draft\",\"url\":\"/blog/first-ride\",\"result\":\"saved as draft — not live\",\"cp_edit_url\":\"https://example.com/cp/collections/blog/entries/606937f8-…\"}"
      }
    ]
  }
}

One detail trips people up. A tool’s own refusal is an HTTP 200 with isError: true, because the request itself worked. Troubleshooting covers the responses you’re likely to see.

Safe by default, with two exceptions#

  • entries_create always saves a draft, and entries_update never changes an entry’s published status.
  • Publishing is its own tool, gated on the collection’s publish permission. A client that asks before tool calls asks about it separately, so you can allow entries_update for a whole session and still approve each publish by hand.
  • The delete tools don’t exist until you opt in, and the user still needs the matching delete permission.

The two exceptions are worth knowing before you connect anything.

  • Without revisions, an edit to a live entry saves straight to it, and visitors see the change right away. That’s the same as saving it in the Control Panel. Revisions need Statamic Pro.
  • Terms, globals, assets, and navigations have no draft state, so writes to them are live immediately.

Drafts and publishing lets you try both.

Where to go next#

  • Installation covers requirements and how to confirm the endpoint is healthy.
  • Permissions shows how to restrict an agent, with a simulator for any role.
  • Tools is the full reference, with a recorded response for every tool.
  • Security model is the page to read before exposing a production site.