Repository navigation
v4.0.0
statamic-mcp 4.0.0 is a breaking major release. Read the upgrade guide before upgrading, run php artisan mcp:statamic:install --upgrade, then php artisan mcp:migrate-v4 and php artisan mcp:doctor.
Added
-
PostgreSQL 17 CI coverage on Laravel 12 and 13, including independent-process operation claims, approvals, retention and crash recovery.
-
Four native MCP Skills for writing entries, translating localizations, editing page builders and modeling content.
skills/listandskills/getexpose static manifests with SHA-256 digests and byte sizes;resources/readserves their files. Existing workflow prompts reuse those files and retain authorized live context. Disabled resources or installation profiles refuse skill access; skills never expand a token's grants. Client activation requires host support. -
Fieldset list/get/create/update/delete and installed fieldtype inspection through the blueprint facets. Blueprint edits retain native tabs, sections, imports, prefixes and field references; resolved fields report provenance. Fieldset updates/deletes accept
expected_version, reject cyclic references and refuse deletion while a readable or hidden consumer still uses the fieldset. -
Entry
getby exactly one of id, slug or URI within the requested collection/site. Localized reads separate localdatafrom authorized inheritedmerged_data, with permission-filtered origin/localization links. Entry creation accepts an explicit collection blueprint; content writes warn about unrecognized top-level keys without disclosing their values. -
Resource catalogs for collections, sites and fieldtypes, and templates for entries, collections, taxonomies and forms alongside blueprints. Authorized handle completions and resource links from successful non-delete writes make records discoverable without granting read access to write-only tokens.
-
Personal activity in Tools → MCP, restricted server-side to the current user. Site-wide activity remains separately permission-gated. Native OAuth consent shares scope labels, descriptions and groups with personal tokens; admin, delete and integration scopes need explicit selection. Control Panel, consent and scope copy use English and Danish translation files.
-
Client setup for Claude Desktop/Code, Cursor, VS Code, Codex, ChatGPT and Windsurf uses each client's configuration format and supported token/OAuth/stdio modes. One-time filled token snippets are removed when dismissed; shared configuration should not contain secrets.
-
Optional SEO Pro reference integration: versioned site/section defaults and redirects, recorded 404 reads/deletes, native report generation and sitemap reads. Native permissions, site binding and resource policies apply; creating redirects also requires deletion authority for matching errors. Site-wide reports require a separate grant and unrestricted policies. SEO field formats use the integration API; commercial addon code is not bundled.
-
Permission-filtered local-index search in
statamic-system-read, with content scopes, native record/site permissions and resource policies applied before paging. Missing indexes are not built by reads; hosted search is refused until complete provider pagination is supported.reindexinstatamic-system-adminuses native drivers and requires approval by default. -
Static cache URL invalidation, queued page warming with inherited pagination queue routing, and Glide clearing. Post-write static modes are
full,statamicandrefresh; refresh clears before queuing, and unset configuration retains the legacy switch. Nativerules: allavoids duplicate full clears without mistaking missing URL metadata for deleted HTML files. -
Optional Forms Pro reference integration: native page-path evaluation, versioned Automagic settings and Address format/sanitization, using package-owned scopes and the standard approval/idempotency pipeline. Page-rule writes validate destinations and conditions; rules on protected fields are hidden and cannot be evaluated through MCP. Forms Pro remains separately installed and licensed.
-
Forms 2 actions in
statamic-forms-read/statamic-forms-write: form definitions, write-only connector configuration, site-bound submission reads, status/date filters, paged JSON exports, status summaries, spam marking and approved deletion. Submission access has its own scopes, separate from form definitions; denied fields apply on both transports. -
StatamicMcp::integration()registers package-owned scopes, domain routers, approval defaults, fieldtype formats and sanitizers, and lifecycle observers. Integration actions use the normal read/write facets, approvals and idempotency over HTTP and stdio, with consent bound to the registered contract and authorization rechecked before persistence. DeferredEffectscan invalidate static URLs, rebuild named search indexes, repair the Stache and clear Glide images. LegacyregisterTool()registrations share the same registry without gaining new scopes. -
Project-local client permission migration in
mcp:migrate-v4and the installer. Exact Claude Code and Cursor CLI rules for thestatamicserver are previewed, backed up and narrowed to read-only auto-approval; ask/deny rules retain both facets. Global rules, wildcard rules and renamed servers need manual review. The installer generates v4 workflow guidance. -
getcan select result paths withfields, returning explicit path/value projections after authorization and denied-field filtering. Oversized list pages stop at record boundaries withtruncatedand a resumable cursor. Blueprint reads advertise Claude'santhropic/maxResultSizeCharshint. Saved-write receipts remain bounded even with oversized metadata, and replaying an oversized successful write remains a success. -
Optimistic concurrency for entries. Entry responses carry a
version;update,delete,publish,unpublish,restore_revisionandpublish_working_copyacceptexpected_versionand refuse withVERSION_CONFLICT(nothing saved) when the stored entry changed since, through MCP or not. Two MCP writers with the same version cannot both succeed. Omitting it writes unconditionally as before. -
The same for terms (
update,delete) and global sets (update). A term's version covers all its sites, which share one file; a global set's version covers one site. -
Optional
idempotency_keyon every write action. A retry with the same key and arguments replays the first result without writing again; a retry after a call that never reported answersOUTCOME_UNKNOWNwith the current version and does not write; the same key with other arguments is refused. Kept in the operation store (file or database). -
Approval channels. A waiting approval is announced by mail through the site's mailer, or with Cbox Relay by mail, web push to the person's browsers and a
statamic_mcp.approval.requestedwebhook event; with Cbox ID the person can approve on their phone (OpenID CIBA). Notifications carry the description and a link to the Approvals page, never the call's arguments, and never approve anything. Add your own with theApprovalNotifierandApprovalAuthoritycontracts; seeapprovals.channels. -
mcp:migrate-v4plans the token changes for v4 as a dry run and carries them out with--apply: a v3*token is revoked, a replaced admin:writescope is dropped from a personal token that holds other scopes (an OAuth grant, or a token with nothing else, is revoked). It never adds a scope, acts only on a token unchanged since planning, writes a0600journal of scopes before and after (no secrets) before changing anything, and finds nothing left on a second run.--rollbackrevokes before a downgrade the tokens v3 would let publish or delete. UPGRADE.md describes the upgrade and the rollback. -
mcp:doctorfails debug mode on an enabled non-local HTTP endpoint, warns when every proxy is trusted, and fails a log channel that writes to stdout when stdio is configured (stdout carries only protocol messages there). Local/testing loopback HTTP is allowed; disabled transports and token-free built-in stdio do not produce spurious warnings. Reports distinguish actionable checks from verification notes and do not probe writes, networks or locks. -
Lifecycle contract: terminal execution events finalize after response sizing and deferred cache work;
approval.consumedprecedesexecution.completed. Execution metadata adds reason, error code, correlation id, encoded-envelope bytes, cache duration and validated W3C v00traceparent, never arguments, content or actor identity. An expired approval retry emitsapproval.expiredonce;request.rejectedcovers HTTP 4xx observed by the MCP input middleware. Observer failures cannot veto a call, and delivery is best effort, not durable audit. See lifecycle events.
Changed
- Reduced repeated catalog descriptions while preserving every input/output validation constraint, action argument declaration and read/write annotation. All tools remain directly listed by default; searchable catalog remains opt-in.
- Repeated built-in output-schema fragments share local
$defsonly when doing so reduces their serialized size. Each tool remains self-contained; input schemas and integration-owned output schemas are unchanged. mcp:statamic:installasks for the HTTP profile when the HTTP endpoint is enabled (--http-profile=without a prompt) and savesSTATAMIC_MCP_HTTP_PROFILE. Non-interactive runs without one fail before changing anything; previously an upgraded site kept an endpoint that refused every call.mcp:doctorapplies the runtime defaults to private-network blocking and input budgets missing from a config published under v3, instead of failing them. Explicitly unsafe or empty values still fail.- Entry and term list sorting accepts one readable blueprint field or supported property with
asc/desc, rejecting unknown, denied or malformed sort keys before querying. Equal values use an id tie-breaker and cursors bind the sort.cross_referencerefuses more than 5,000 readable entries and terms instead of returning an incomplete graph with false orphan findings; use paginatedcontent_validatefor larger validation sweeps. - File audit pages read one fixed-size snapshot newest-first without the writer lock, retain only the requested page and omit incomplete tail records. Totals still scan the active snapshot, capped at the last 50 MiB; rotated archives are not included. Purge replaces the file rather than truncating an in-progress reader's inode.
- File-token last-used writes are coalesced to at most once a minute. Invalid credentials avoid repeated parsing of an unchanged token catalog; a catalog index remains only a hint and the stored hash is verified. Mutation locking and atomic token-file replacement remain in place.
- The installer merges project-local Claude Code and Cursor configurations, preserves unrelated Cursor rules and refuses malformed JSON. It does not register Claude twice or write unsupported Cline settings. Doctor failures now propagate as installation failures even when configuration was already written. Historical implementation plans move from public
docs/superpowers/tohistorical/superpowers/without deleting their history. - The Control Panel uses Statamic 6 UI components for token tables and forms, setup panels, activity filters, alerts and confirmations. Admin and personal tokens share one form. Failed requests remain visible, switching clients cannot show a late response from the previous client, and approval network failures are distinguished from cancelling re-authentication. The frontend builds with Statamic's official Vite and Tailwind integration.
- The scope picker offers collection configurators the entry scopes required by tree reads and moves, and reorderers the entry write scope. These additions follow whether structures are enabled; per-record, site and resource checks remain in force.
- Writes no longer clear the whole Stache by default. A write repairs the indexes it leaves stale outside its own store: term usage after deletion, sibling order, collection URIs and entry/term indexes, and user role/group membership.
cache.stache_after_write(repair,clearornone) replacesclear_stache_after_write;falsethere is still read asnone. Static caches are flushed after content writes by default;static_after_writecan select native invalidation or clear-then-queue refresh instead. - A write that carries an argument the tool does not declare is refused ("The create action does not take published. … Nothing was written. Field values and flags such as published go inside data."). A top-level
publishedon entriescreateused to be ignored and the entry saved as a draft with success reported; a misspelled argument name used to read as a missing one. - OAuth discovery no longer advertises the v3 admin
:writescopes, which grant nothing in v4.*stays advertised; consent expands it to the scopes the user holds.
Changed (breaking)
-
Custom token stores accept an optional atomic
expectedScopesprecondition onupdate(). OAuth drivers expose pending grant metadata independently of access tokens and revoke codes and refresh tokens by owner/client. See UPGRADE for the contracts and downgrade maintenance procedure. -
Entry
getand writes by id no longer fall back to the default site. Withoutsite,get,update,delete,publish,unpublish,restore_revisionandpublish_working_copyact on exactly the entry the id names; withsitethey act on that localization, or answerNOT_FOUNDif there is none. Before,updatewithoutsitewrote the default-site copy andpublish/unpublish/deleteignoredsite. The version check, the approval's expected version and the write now resolve the same record, so an approvedpublish_working_copygoesAPPROVAL_STALEwhen that localization changes, and one localization'sexpected_versioncannot authorize a write to another. An approval names the site of the entry it writes. -
Entry
createwithoutdata.publishedfollows the collection's default publish state, as the Control Panel's create form does, instead of always publishing. Without the right to publish it still saves a draft. -
Entry
localizesaves the new localization as a draft unlessdata.publishedis sent, as the Control Panel does. Before, it copied the origin's published state. -
OAuth grants issued by v3 have no resource binding and are refused by v4.
mcp:migrate-v4 --applyrevokes them andmcp:doctorcounts them; a v3 refresh token answersinvalid_grant, so clients start authorization again. A revoke is rechecked under the OAuth lock, so a client authorized again after planning keeps its new grant. A mismatchedresourcestill answersinvalid_target. -
A refused, malformed or missing resource read is a JSON-RPC error (
-32602, HTTP 400, reason inerror.data.code) instead of a successful read whose text was{"success":false}. Errors are never cached. -
The unauthenticated 401 challenge always names the initial scopes and no longer reads the request body; the exact scope a call needs comes with the 403
insufficient_scopestep-up. A presented but invalid, expired or unbound bearer token is challenged witherror="invalid_token", and OAuth clients are told to authorize again. -
statamic-system-readsearchloads and authorizes only the hits a page needs.totalis exact whennext_cursoris null and otherwise a lower bound. -
With the searchable catalog on, each call in an
execute_toolsbatch counts againstrate_limit.max_attempts; a batch that would overrun the minute is refused whole. -
Require Statamic ^6.44 and Laravel MCP ^1.3. Form fields use Forms 2's stored sections/pages in
data.fields. Theformsblueprint namespace is no longer exposed: saving a Forms 2 form removes its legacy blueprint. Submission deletion returns a receipt, not the deleted field values. -
OAuth requires the endpoint's
resourceon authorization and code/refresh exchanges, binding that audience through access and refresh tokens. Unbound legacy OAuth grants require new consent; personal tokens are unchanged. Authorization responses includeiss. HTTP challenges advertise required scopes, and missing scopes fail with 403insufficient_scopebefore dispatch, including the fullexecute_toolsbatch. CORS exposes that challenge to browser clients. Protected-resource discovery advertises minimal initial reads; DCR acceptswebandnativeapplication types with unchanged redirect safety. -
statamic-discoverreplaces the separate discovery and schema tools. Catalog entries, recommendations and action enums reflect the caller's scopes and installation profile; an optional system inventory uses authorized, paginated router reads. Server instructions describe the contracts without advertising unavailable tools. -
The generic
statamic_agentandstatamic_contractprompts are replaced bywrite_entry,translate_entry,edit_page_builderandmodel_content. They accept task arguments, embed authorized live blueprint formats and entry content, and offer permission-filtered collection, blueprint and site completions. Prompts never save content or promise a dry-run API. -
Record writes return the saved record and its opaque
version; deletes return the last record snapshot. Collection moves return the saved tree and the settings the caller may see, without requiring a read scope after saving. Asset copies and configuration snapshots obey denied-field policy. User identifiers are strings for both file and Eloquent users. Every built-in tool advertises an output schema covering its result variants, error envelope and reduced successful write responses. -
Framework versions are reported only by
server/discover, in_meta["statamic-mcp/versions"]whensecurity.expose_versionsis enabled. They no longer appear in tool metadata or systeminfo; stored-record concurrency versions are unchanged. -
Lists use
items,next_cursorandtotal, with deterministic ordering and an authenticated opaque cursor instead ofoffset. Configuration catalogs and entry revisions are paginated too. Cursors are tied to the query, permit changinglimit, and never replace per-call authorization.content_validatepages its record stream with the same cursor contract while keepingfindingsandsummary. Blueprint catalogs preserve identical handles in different namespaces, include taxonomy-specific blueprints and filter denied handles before counting or paging. -
Tool failures set MCP
isErrorand return oneerrorobject withcode,message, and optionalfield,valid_valuesandhint. Codes come from a closed enum; missing records, validation, permissions, missing scopes, approvals, version conflicts and uncertain writes remain distinguishable. Clients must readerror.codeinstead ofdata.codeorerrors. Near-miss handles suggest up to three readable resources, never resources hidden by scope, permissions or policy. Unexpected exceptions are handled centrally and hide diagnostics in production, with a correlation id for server-side investigation. -
Structures
configureis removed;updatehandles settings, including collectionstructureandorderable. Collection tree moves now use the explicitmoveaction withdata.entryanddata.parent;updaterefuses tree mutations. Existing move permissions, scopes, resource policies and idempotency still apply. Navigation and global-set updates no longer re-check nonexistent Statamic permissions after the router has authorized the call. -
The 3.7
statamic-formsrouter is nowstatamic-forms-read/statamic-forms-writeon Forms 2. Form settings aretitle,store,honeypot,fieldsandconnections; email notifications are theemailconnection. Settings added withForm::appendConfigFields()are refused, and deleting a whole form is no longer an MCP action (delete it in the Control Panel). Tokens needsubmissions:read/submissions:deletefor submission data. -
System
config_setis removed. MCP cannot change its own tool configuration at runtime; edit the site's configuration files instead. -
Each tool is now two:
statamic-{area}-read, which only reads, andstatamic-{area}-write(entries, terms, globals, assets, forms) orstatamic-{area}-admin(blueprints, structures, users, system), which changes the site.statamic-content-facade-readhas no write tool. Every tool carries all four behaviour hints. A client rule (mcp__statamic__*-readin Claude Code,Mcp(statamic:*-read)in Cursor CLI) allows reads; approvestatamic-discoverseparately. A read tool lists only read actions and no write arguments; a write action sent to it is refused with the name of the right tool. Client permission rules naming the v3 tools must be updated. -
One name per argument across every tool, and each action declares what it reads (
needsandoptionalonRouterAction). A missing argument is refused with its name; an argument the action does not take is refused with the ones it does, for reads as well as writes, where v3 silently ignored it. Renamed: entriesversion→revision_state; globalsglobal_set→handle; blueprintscollection_handle/taxonomy_handle→collection/taxonomy; asset containershandle→container; assetfilters.folder→folder; structuresconfig→data. A create names the new resource inhandle(containerfor assets), anddata.handlemay only repeat it, so the resource policy and the handler always read the same name. The unreadfilterson users, structures and content-facade is removed. See UPGRADE for the full table. -
tools/listshows only the tools the token's scopes and the installation profile let the caller use. A hidden tool can still be called and answers with the scope it needs. -
The searchable catalog (
search_tools/execute_tools) is off by default: every tool is listed. Turn it on withSTATAMIC_MCP_SEARCHABLE_CATALOG=truefor a client without its own tool search. -
resource_typeis required where a tool has several kinds of resource (assets, structures, users) and gone where it had none.statamic-discoverdescribes the tools from their declarations: actions, resource types and arguments per tool. -
Tools from other packages declare their actions in
actions()asRouterAction::read(),edit(),publish(),delete()oradmin()instead ofgetActions(). The declared effect decides scopes, write mode and approvals; an action's name no longer does, so apurgeorsendaction is no longer checked as a read. An undeclared action, or aresource_typethe action does not apply to, is refused with the valid choices. A v3 router that still declaresprotected function getActions()is refused with this explanation when registered, instead of a PHP fatal error at boot;BaseRouter's public action summary method is nowactionSummaries(). -
statamic-structuresno longer offers create, update, delete or configure for sites, which only ever answered "not supported";configure sitesalone no longer offersstructures:admin. -
Retire
content:readandcontent:write. No tool ever asked for them, so they granted nothing in v3 either; they are no longer offered, advertised or part of the presets and the default OAuth scopes.mcp:migrate-v4 --applydrops them from personal tokens; OAuth grants issued by v3 are revoked and authorize again (see below). -
A list
filterskey must be a field handle of the collection's or taxonomy's blueprints or a named property (id,slug,title,published,status,date,uri,parent,originfor entries;id,slug,title,urifor terms), with a scalar value. Anything else is refused with the valid keys. An unknown key used to answer an empty list and leave a permanent Stache index behind, which every later save kept up to date. -
Relationship fields take references that exist. A
termsfield takes term slugs (taxonomy::slugwhen it spans several taxonomies), anentriesfield takes ids of entries in its collections, ausersfield takes user ids; anything else is refused with the existing values. A UUID in a terms field used to create a junk term, also for a token withoutterms:write. -
Users
create,update,activateandassign_roleneed a person's approval over HTTP by default, likedelete. A config without auserskey gets this too;'users' => []turns it off. Changing your own email or password over HTTP needsdata.current_password. Approval records and the Approvals page show[hidden]for passwords and other secrets. -
Editing a token keeps it within
security.max_token_lifetime_days:clear_expiryis refused while a cap is set and a later date is brought back to the cap. An OAuth token's expiry cannot be edited. -
Errors in OAuth authorize before the consent screen (unknown scope, missing PKCE, wrong response type) show an error page and are no longer redirected to the client's
redirect_uri. -
AuditStore::query()takes an$actorfilter (user:{id}orcli). A custom audit store must accept it. -
Split publishing and deleting out of the write scopes.
entries:writenow covers create and update; publishing needsentries:publish, includingdata.published: trueon create/localize and any publication flag on update. Deleting needsentries:delete,terms:deleteorassets:delete. Existing write tokens keep editing and answer a missing-scope refusal for the rest. Admin domains use:adminfor delete. -
Stop treating
*as a wildcard. Full access is expanded to the scopes the user holds when a token is issued, so it never grows to cover scopes added later. A v3 token carrying*is refused and must be approved again; its OAuth refresh token answersinvalid_grant.mcp:doctorcounts the tokens affected by both changes. -
Give the admin domains their own scope:
structures:admin,blueprints:admin,users:adminandsystem:adminreplace the:writescopes there. A token holding a replaced scope is refused with a message naming its replacement, and its OAuth refresh answersinvalid_grant. -
mcp:statamic:installnow guides an upgrade too: on an existing installation it keeps the config, asks for and saves the stdio profile, runs migrations, shows themcp:migrate-v4plan for the tokens v4 affects with an offer to apply it, and ends withmcp:doctor. -
Route tool and resource authorization through one decision,
McpAuthorizer. A resource refused for a missing Statamic permission now answersPermission denied: Cannot get blueprintslike the matching tool call. -
Tools other packages register in a domain with no scope of their own are refused for every token; v3 let a
*token reach them. -
Replace the confirmation token with approvals in the Control Panel. A gated action (by default every delete, blueprint writes, entry
restore_revision/publish_working_copy, user account changes and systemreindex) over HTTP answersAPPROVAL_REQUIREDwith anapproval_id; the person the call acts as approves it under Tools → MCP → Approvals, confirming it is them with Statamic's elevated session, and the client repeats the call withapproval_id. An approval covers that exact call once, expires afterconfirmation.ttl(now 900 seconds), and stops holding if the record changes.confirmation_tokenis no longer accepted. The model could answer the old token itself; a person now has to approve.
Security
-
Entry
create,updateandlocalizeover HTTP keep the author as the Control Panel does for a caller without the collection's "edit other authors" permission:createmakes the caller the author andupdatekeeps the stored one, whateverdata.authorsays. -
Reauthorize entry, term and global snapshots before approval/idempotency replay, including site and entry-author restrictions on deleted-record receipts. Navigation writes authorize every supplied site's tree before saving anything; reads and stored receipts omit inaccessible trees.
-
Token migration inspects pending OAuth codes and refresh tokens independently of access tokens and revokes unsafe owner/client grants across rotation. Scope narrowing compares the planned scopes atomically with the store mutation, so a concurrent removal cannot be undone.
-
Blueprint denied-field filtering covers full definitions, selected subtrees, lists and format specs, including configuration defaults embedded by prompts. Localization honors an explicit
data.published=false, including when the source is published and the caller could publish. -
One caller can no longer fill the operation store and block everybody's approvals and keyed writes: over HTTP each actor may have an eighth of
operations.max_records(32 by default) open and hold half of it in total (finished keyed writes keep a slot for the retry window), and getsOPERATION_LIMITpast that; stdio is not rationed; and a full store prunes expired records before refusing. -
Registered OAuth clients that are never authorized are removed after
oauth.unused_client_ttl(default one day) and stop counting towardoauth.max_clients, so anonymous registration can no longer keep real clients out for 30 days. -
A client metadata document's
logo_uriis shown only over https on theclient_id's own host. Why a metadata document could not be fetched is logged, not shown. -
Failed bearer attempts are limited per credential (5 a minute) and per address (30 a minute), and a valid token always gets through, so a stale client behind a shared address no longer locks out everyone there.
-
The
mcpauth guard refuses deactivated accounts and v3*tokens, as the MCP endpoint does. -
An OAuth refresh issues only the scopes the user can still exercise.
-
mcp:doctorcounts tokens that outlive the lifetime cap and tokens carrying a retired content scope, and warns when approvals are on but Statamic elevated sessions are off. -
Keep term actions to the sites the user may access. Statamic's
TermPolicychecks the site only on create and the Control Panel relies on its site selector, so an editor limited to one site could read and change terms in another through MCP. -
Require durable audit admission before registered writes, independently of telemetry and the legacy logging flag. Custom audit drivers must implement
DurableAuditStore; SQL admission refuses uncommitted caller transactions. -
Serialize audit append, rotation and purge across processes. Flush durable writes, preserve interrupted tail evidence, and paginate without loading the complete history into memory.
-
Persist encrypted recovery identity before preparing a write. Bind it to the handle and request, preserve it on unknown outcomes, and refuse missing or corrupted intent before execution. Raw input and credentials are not retained. Add
mcp:inspect-operationfor read-only local recovery inspection. -
Serialize complete file-token mutations, including usage timestamps and revocation. Atomically replace token files and refuse failed deletions; a concurrent last-used update cannot recreate a revoked credential.
-
Expose explicitly consented registered read actions through HTTP, stdio and tool search. Stdio requires a configured v4 token; catalog visibility and invocation recheck native site permissions.
-
Run registered actions under their verified native Statamic actor, restoring ambient authentication after success, failure and nested calls. Freeze registries after deferred addon boot registration.
-
Require server-issued prepared handles for writes in the registered-action executor. Add bounded operation admission, safe expiry cleanup and capacity repair; unknown or pruned handles never recreate a write.
-
Register the stdio server even when Laravel HTTP routes are cached; honor registered addon scopes in OAuth defaults.
-
Reject expired refresh-token replays before grant revocation in both storage drivers.
-
Add isolated, typed execution and grant lifecycle observations; credential rotation does not masquerade as grant revocation. Legacy Git listener failures cannot veto an already persisted token change.
-
Bound HTTP/stdio JSON before decoding, preserve fragmented stdio frames, and apply configured tool input budgets.
-
Bind OAuth consent to the displayed scope/capability definitions, authenticated user, session, client and PKCE. Reject missing, expired, tampered or reused consent; an empty selection never grants all scopes.
-
Persist registered-action consent and a stable grant identity through file/SQL token stores, OAuth refresh, secret rotation and storage import. Adding or changing an integration does not expand old grants; changed scopes require renewed consent.
-
Show registered integration scopes in the Control Panel and OAuth picker. Personal-token creation uses the displayed capability snapshot; scope updates discard old capability consent rather than silently expanding it.
-
Require custom token and OAuth storage drivers to preserve the new optional capability snapshot arguments and fields.
-
Refuse forced cascading deletion of nonempty collections and taxonomies. Delete entries/terms explicitly first; a rejected parent deletion preserves its blueprints.
-
Keep runtime extension registrations within their application container instead of sharing them across the PHP process.
-
Require an explicit HTTP/stdio installation profile. Read-only and editor profiles reject sensitive domains and unsupported actions; editor writes are limited to unpublished entries.
-
Remove Basic Auth, including the legacy enable flag. Use scoped Bearer tokens or OAuth. The HTTP MCP endpoint now requires explicit activation.
-
Require custom OAuth drivers to implement user-wide grant revocation, including orphan refresh tokens and pending authorization codes.
-
Authorize global values against their concrete Statamic site policy.
-
Enforce entry publish permissions on status updates and working copies, and authorize localized entries and revision actions against their actual site and author. Reject entry list reads from inaccessible sites.
-
End OAuth refresh access when scopes or expiry change, revoke orphan grants on user deactivation, and detect replay across the refresh chain. Rotated tokens retain the original grant expiry. Multi-node deployments must use a shared, lock-capable
oauth.lock_store. -
Restrict user data to profile/blueprint fields and omit authentication secrets. Reject disallowed browser origins before executing a request; require HTTPS even when older published configuration omits the setting.
-
Limit outbound downloads while cURL receives bytes, preserving DNS pinning and SSRF checks.
-
A global set
updatewith a staleexpected_versionin a site the user may not access answeredVERSION_CONFLICTwith that site's current version before the site check. The site is now checked first, and an unfinished retry no longer reports the version either. -
Refuse a user
updateto an email another user already has, as Statamic'sUsersControllerdoes. On the file driver users are stored by email, so the save overwrote that account (a super admin's included). -
Asset
uploadandcreateapply the container's validation rules (e.g.image,max:2048) to the new file, as a Control Panel upload does, on top ofAllowedFile.
Fixed
-
The
read_onlyinstallation profile refused blueprintscan,typesandvalidate, which only read. -
Users who may edit roles or user groups are offered
users:read, which the role and group reads need. -
forms:readis back in the default OAuth scopes (oauth.default_scopes), as in v3; it was lost in a merge. -
A resource read that failed on the server answered -32602 (invalid params) like a refusal. Only not-found, forbidden, missing-scope and validation refusals are -32602 now; any other failure is -32603.
-
A write that landed but whose response was over
security.max_response_sizewas reported as a failure, so a retry wrote it twice. It now answers success with the record's identifying fields andresponse_truncated: true. -
The MCP Admin page answered 500 when
STATAMIC_MCP_RATE_LIMIT_MAX(or another number) came from.envas a string in a config published before v4. -
content_validatefailed on a site without taxonomies, and on an unknown or denied taxonomy or collection; it now validates nothing there. -
The activity log's user filter never matched. It now filters on the server by user id (or CLI), so pages and totals are right, in both audit stores.
-
The admin token list offered Regenerate on other users' tokens, which the server refused. Deleting or regenerating a token, loading the activity log and loading a client configuration now show the server's error instead of reporting success or nothing. "Never expire" is no longer offered when tokens must expire.
-
OAuth on a non-default port. The authorize endpoint left the port out of the resource it expected and refused the one the protected-resource metadata advertised (
Invalid resource parameter), so Claude Code and every other client failed onphp artisan serve, Docker on 8080 and similar. -
Error responses are no longer discarded by MCP SDK clients. The output schema typed
dataas an object, while a failure carriesdata: null; the official SDKs validate failures against the schema too and replaced every error with-32602.datais nowobject,arrayornull. -
Store navigation trees on
statamic/eloquent-driver. The driver saves a new tree as empty, so a navigationcreateorupdatewith a tree reported success and stored no items; the items are now written onto the stored tree and read back, and a tree that does not read back as sent is an error. -
Notice a concurrent change to a collection tree on a database repository. The check hashed a tree file that only the Stache has, so on
statamic/eloquent-driverit compared nothing and a move could overwrite another writer's tree. It now compares the stored tree, read before the move is planned and again before saving. -
Return the entry
versiona following write accepts on database repositories. It was taken from the instance just saved, which lacks the columns the database fills, soexpected_versionfrom a write answeredVERSION_CONFLICT. -
Start every call from fresh state in all of Statamic's Blink stores, not only the default one. A long-lived (stdio) server kept a blueprint changed in the Control Panel, and a collection's old URIs, until it was restarted.
-
Apply collection
routeoncreateandupdate. It reached Statamic's getter, so the route was never changed although the call reported success. Both actions apply supported settings and refuse unknown keys.updatesupportssort_dir,structureandorderable; the formerconfigureaction is removed. -
Refuse a top-level
slugon entryupdateinstead of ignoring it; the slug goes insidedata, as the schema says. -
Report a blueprint write that a
BlueprintCreating,BlueprintSavingorBlueprintDeletinglistener refused as refused.create,update,generateanddeleteanswered success although Statamic saved nothing, and a refusedupdateleft the changed blueprint in memory for the rest of the request. -
Report moves in the collection tree (an entry
updateorcreatewithparent, a collectionmove) withwrite_effectsandretry_requires_reconciliationwhen they fail, as other writes already did, and register their cache clear before the tree is touched. A failing move after a saved edit now reports the edit ascommittedinstead of hiding it. -
Preserve committed operation effects when final output filtering fails. Audit/exporter/fallback logger failures after a write cannot turn its stored success into a retryable failure; legacy tool envelopes report unavailable outcome audit separately.
-
Respect configured input budgets for registered actions, including 10 MiB asset uploads. Align encrypted result storage with output validation for deep and Unicode-heavy content.
-
Verify asset file placement after native moves, and report an unknown outcome if the filesystem did not move the file.
-
Respect Statamic save/delete vetoes on entry, term, global, user, role, group, asset and structure writes; isolate entry candidates from live repository objects.
-
Register cache cleanup before content writes, report failed cache command exit codes, and preserve successful outcomes when completed calls exceed the duration budget.
-
Allow editors to restore revisions as drafts or working copies without requiring publication rights, matching Statamic's control panel.
-
Use Statamic's actual role and user-group permissions for all corresponding MCP operations, including non-super administrators.
-
Asset
moverefuses a destination that already holds a file ("An asset already exists at …", ascopydoes) instead of overwriting it. v3 overwrote it silently. -
A write result too large to keep for replay (over 1 MiB) is replayed as
{response_truncated: true, note}, which matches the write tools' output schema. -
Collections and taxonomies on Statamic's default blueprint (no saved blueprint file) work in
statamic-blueprints-read, the blueprint resources, the workflow prompts and blueprint completion. Prompt errors are plain text. -
/mcp/oauth/register,/tokenand/revokehave separate rate-limit buckets; token exchange and refresh no longer use up the registration limit. -
Tool output schemas compile under strict Ajv (
strictRequired). Prompts and resources have their own titles. -
mcp:statamic:installfails whenmigratefails instead of reporting success. An upgrade passes--forcetomigratewithout overwriting configuration or client files, and a database operation store counts as needing migrations. -
The installer merges into an existing
mcpServers.statamicstdio entry (command, args and the stdio profile only; extra env such asSTATAMIC_MCP_STDIO_TOKENstays), leaves an HTTP (url) entry alone, saves a.pre-mcp-v4backup and writes atomically. Its summary reports only what the run did, and declined client-rule changes point tomcp:migrate-v4 --apply. -
mcp:migrate-v4 --rollbackrevokes tokens holdingforms:write, which v3.7 lets delete forms with all their submissions.mcp:migrate-v4reports the applied steps when the journal cannot be updated after tokens changed. Migrating client permissions keeps the settings file's own mode (the backup stays 0600), and a narrow step names every scope it removes. -
Approval lists accept
assign-roleas an alias ofassign_role;mcp:doctorwarns when an explicitly listedusers,formsorsystemlist leaves a built-in floor action ungated, and applies the runtime's file-store defaults in the multi-node check. -
Control Panel: the Activity tool filter lists every tool and registered action by the name calls are recorded under, and a third-party tool that fails to build no longer takes the admin page down; and the status filter and badges cover every recorded status. The filters no longer show blank "All …" rows. The approvals badge shows the exact count. The Approvals page keeps offering notifications when the browser already holds a push subscription (it may belong to another CP user or have been dropped by the server) and reuses it when enabling, hides the notification offer without web push and confirms a reject. Delete is offered on other users' tokens only with both
revoke mcp tokensandrevoke all mcp tokens, as the token API requires. The System tab's tool count matches what clients are offered. The scope picker and consent page no longer rely onObject.groupBy. -
The Approvals page and dashboard badge no longer poll Cbox ID or decrypt other users' approvals; an answer given on the phone is recorded when the agent retries the call.
-
Term
createwrote into the default site whateversitenamed, after checking the user's access to the named site. It now writes the named site's localization and seeds the default site with the same values, as the Control Panel does, and refuses a site the taxonomy is not in. -
Term
updatestoreddata.slugas a data key and never renamed the term. The slug is now validated like the Control Panel (required, slug format, unique in the taxonomy and site) and set on the term; a localization takes its own slug only when the blueprint's slug field is localizable. -
A term created without a slug is slugged from its title in the language of its site (
Überbecomesueberin a German site), as Statamic does. -
Global set
listrequiredconfigure globals, so an editor allowed on one set could get and update it but not list it. Like Statamic'sGlobalSetPolicy::index, it now needs no fixed permission and lists only the sets the user may edit in the requested site. -
Global set
get/updateand navigationget/updaterefused users holding onlyconfigure globalsorconfigure navs, which Statamic's policies admit to every set and navigation. A navigationgetalso acceptsedit {handle} nav, likeNavPolicy::view, and such editors are offeredstructures:read. -
A new user password (
create,update) is checked against the site'sPassword::default()rule, as Statamic's Control Panel does, instead of only a length of 8. Laravel's default rule is still 8 characters. -
A user may
updatetheir own profile withoutedit users, as Statamic'sUserPolicyallows; roles, groups and super stay out of reach, and their own email or password still needsdata.current_passwordover HTTP. The token still needsusers:admin. -
User
updatewithdata.super: falseremoves super admin status instead of ignoring it. As in the Control Panel only a super admin may, and never from themselves. -
Asset
createandupdatevalidatedataagainst the container's blueprint and store it processed by the fieldtypes, as the Control Panel does; an invalid value is refused withVALIDATIONand nothing is saved.createchecks only the fields it is given. Keys the blueprint does not define are stored as given. -
Asset
copyleaves out fields markedduplicate: falseand recordsduplicated_from, as Statamic's Duplicate action does.
Full changelog: v3.7.0...v4.0.0