Skip to content
← All posts

Statamic MCP v4: your AI can no longer approve its own deletes

v4 splits every tool into read and write, makes a person approve deletes in the Control Panel, stops two agents from overwriting each other and makes retries safe. What changed, and how to upgrade from v3.

· 7 min read · Sylvester Damgaard
An AI agent with two lanes: reads go straight through, writes pass a gate and a person's approval on a phone

I tagged cboxdk/statamic-mcp v4.0.0 on 5 December. It is the largest release the package has had: every tool is split in two, scopes mean what they say, and a person approves the dangerous calls in the Control Panel. v4.0.2 is out now with two small follow-ups, and cbox.dk runs it in production.

One flaw in v3 set the direction for the whole release.

The model could approve its own deletes

In v3 a delete answered with a confirmation token, and the client sent the call again with that token. The token proved that something had read the first answer. It did not prove that a person had. A model that wanted the delete to go through could read the token and send it back, and nothing stopped it.

v4 removes the token. A gated call over HTTP answers APPROVAL_REQUIRED with an approval_id. The person the call acts as opens Tools → MCP → Approvals, confirms with Statamic's elevated session, and approves. Then the client repeats the call with the id. The model has nothing it can answer on its own.

  • An approval covers that exact call, once.

  • It expires after 15 minutes.

  • It stops holding if the record changes in the meantime. The retry answers APPROVAL_STALE.

By default every delete is gated, plus blueprint writes, entry restore_revision and publish_working_copy, user account changes and system reindex. The local stdio server is not gated, because the person running it is already at the keyboard.

You can hear about a waiting approval by mail through the site's mailer. With Cbox Relay it also arrives as web push and a webhook for Slack or Teams. With Cbox ID you approve on your phone. A notification carries a description and a link. It never carries the call's arguments, and it can never approve anything by itself.

Your site, your rules

Approvals are on in production by default. If you trust your agents with everything their scopes allow, set STATAMIC_MCP_CONFIRMATION_ENABLED=false. That is what we did on cbox.dk. Scopes and Statamic permissions still limit every call.

Every tool is now two

A v3 tool did everything for its area, so a client could not tell a read from a write before calling it. In v4 each area has a read tool and a write tool. The admin areas get an admin tool instead of a write tool.

Area

Read

Changes

Entries

statamic-entries-read

statamic-entries-write

Terms, globals, assets, forms

statamic-{area}-read

statamic-{area}-write

Blueprints, structures, users, system

statamic-{area}-read

statamic-{area}-admin

Content analysis

statamic-content-facade-read

none

A read tool lists only read actions and takes no write arguments. If a model sends a write to it, the answer names the tool it should have used. Every tool carries all four MCP behaviour hints, so a client can auto-approve reads and ask about the rest. In Claude Code that is one rule:

.claude/settings.json
json
{
  "permissions": {
    "allow": ["mcp__statamic__*-read", "mcp__statamic__statamic-discover"]
  }
}

tools/list also shows only the tools the token can use. A read-only token sees read tools and nothing else.

Scopes that mean what they say

In v3, entries:write covered creating, editing, publishing and deleting. A token you handed out for drafting could take a page offline. v4 splits it:

Scope

Allows

entries:read

Lists, reads and revisions

entries:write

Create and update, as drafts or working copies

entries:publish

Publish and unpublish, including published: true on create

entries:delete

Delete

Terms and assets get their own delete scopes. Blueprints, structures, users and system get :admin. And * is no longer a wildcard: full access expands to the scopes the user holds when the token is issued, so an old token never grows to cover a scope added in a later release.

The OAuth consent screen uses the same labels and groups as personal tokens. Read access is ticked for you. Delete and admin scopes you tick yourself. Grants are bound to the endpoint they were issued for, so a token for one site cannot be replayed against another.

Two agents, one entry

Agents retry, and they run in parallel. v3 had no answer to either. If two writers read the same entry and both saved, the second quietly overwrote the first.

Two agents send a save to the same entry; the first is saved, the second is sent back to read the entry again
The first save wins. The second gets VERSION_CONFLICT and nothing is saved.

Every entry, term and global set now comes back with a version. Send it as expected_version on the next write. If the record changed in between, through MCP or in the Control Panel, the write answers VERSION_CONFLICT and saves nothing. The agent reads again and redoes its change.

Retries are covered by idempotency_key. The same key with the same arguments replays the first result without writing again. If the first call never reported back, the retry answers OUTCOME_UNKNOWN with the current version instead of guessing.

json
{
  "action": "update",
  "collection": "blog",
  "id": "6ea6507a-2083-4ff1-bd06-852418470b19",
  "data": { "excerpt": "Rewritten by the agent." },
  "expected_version": "3f9c…",
  "idempotency_key": "rewrite-excerpt-001"
}

It stops saying success when nothing was saved

The bugs that worried me most in v3 were the quiet ones. The call reported success, and the site did something else.

  • A top-level published on entry create was ignored. The entry was saved as a draft and the agent was told it had published. v4 refuses the call and says where the flag goes.

  • A UUID in a terms field created a junk term, even for a token without terms:write. Relationship fields now take only references that exist.

  • An unknown key in list filters returned an empty list and left a permanent Stache index behind. Filters now take field handles only.

  • Asset move overwrote a file at the destination. It now refuses, like copy does.

  • A blueprint write that a Statamic listener vetoed still reported success.

The refusals are written for the model to act on. This is what v4 answers to the published mistake:

The create action does not take published. … Nothing was written.
Field values and flags such as published go inside data.

Errors have one shape everywhere: an error object with a code from a fixed list, a message, and where useful the field and the valid values.

Skills ship with the server

v4 serves four native MCP Skills: writing entries, translating localizations, editing page builders, and modeling content. A client that supports skills picks them up from the server, so the instructions match the version you run. The prompts write_entry, translate_entry, edit_page_builder and model_content use the same files and add live blueprint formats for the collection you are working in. A skill never grants more than the token already has.

The tool catalog is about 11 percent smaller than in the first v4 builds, without dropping a single validation rule. Every tool also has an output schema now, so a client can check what it gets back.

Tested with real clients

Before the release I ran the full scenario in Claude Code three ways: over HTTP with a personal token, over HTTP with OAuth, and over stdio. Read a skill, read a blueprint, write a draft, read it back, summarise a form, search, delete, confirm it is gone. The OAuth run covered both accepting and declining the extra scope a delete needs. Codex and the MCP Inspector were checked against the same server.

cbox.dk was upgraded from 3.6, and this post was written as a draft through the server it describes.

Upgrading from v3

Back up storage/statamic-mcp/ or the MCP tables first. Then:

bash
composer require cboxdk/statamic-mcp:^4.0 -W
php artisan config:clear
php artisan mcp:statamic:install --upgrade
php artisan mcp:doctor
php artisan mcp:migrate-v4          # dry run
php artisan mcp:migrate-v4 --apply

The installer keeps your config, asks for the stdio and HTTP profiles, runs migrations and shows the token plan. mcp:migrate-v4 never adds a scope. It writes a journal of the scopes before and after, and a second run finds nothing left to do.

What will need attention:

  • v3 OAuth grants are refused. Clients connect again and you approve fresh consent.

  • Tokens carrying * must be approved again.

  • Client permission rules that name the v3 tools need the new names. The installer migrates project-local Claude Code and Cursor rules for you.

  • Basic Auth is gone. Use tokens or OAuth.

  • v4 requires Statamic 6.44 or later and Laravel MCP 1.3 or later.

The full list, with a rollback procedure, is in UPGRADE.md. The release notes cover every change.

Sylvester Damgaard
Sylvester Damgaard

Founder of Cbox and Principal Software Engineer at Geocodio. CTO and architect experience across software and infrastructure, from business and product problems to production. Building and operating systems since 2000.