Skip to content

v4.0.0

Choose a tag to compare

@sylvesterdamgaard sylvesterdamgaard released this 05 Dec 19:34
8c74117

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/list and skills/get expose static manifests with SHA-256 digests and byte sizes; resources/read serves 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 get by exactly one of id, slug or URI within the requested collection/site. Localized reads separate local data from authorized inherited merged_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. reindex in statamic-system-admin uses 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, statamic and refresh; refresh clears before queuing, and unset configuration retains the legacy switch. Native rules: all avoids 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. Deferred Effects can invalidate static URLs, rebuild named search indexes, repair the Stache and clear Glide images. Legacy registerTool() registrations share the same registry without gaining new scopes.

  • Project-local client permission migration in mcp:migrate-v4 and the installer. Exact Claude Code and Cursor CLI rules for the statamic server 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.

  • get can select result paths with fields, returning explicit path/value projections after authorization and denied-field filtering. Oversized list pages stop at record boundaries with truncated and a resumable cursor. Blueprint reads advertise Claude's anthropic/maxResultSizeChars hint. 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_revision and publish_working_copy accept expected_version and refuse with VERSION_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_key on 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 answers OUTCOME_UNKNOWN with 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.requested webhook 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 the ApprovalNotifier and ApprovalAuthority contracts; see approvals.channels.

  • mcp:migrate-v4 plans the token changes for v4 as a dry run and carries them out with --apply: a v3 * token is revoked, a replaced admin :write scope 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 a 0600 journal of scopes before and after (no secrets) before changing anything, and finds nothing left on a second run. --rollback revokes before a downgrade the tokens v3 would let publish or delete. UPGRADE.md describes the upgrade and the rollback.

  • mcp:doctor fails 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.consumed precedes execution.completed. Execution metadata adds reason, error code, correlation id, encoded-envelope bytes, cache duration and validated W3C v00 traceparent, never arguments, content or actor identity. An expired approval retry emits approval.expired once; request.rejected covers 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 $defs only when doing so reduces their serialized size. Each tool remains self-contained; input schemas and integration-owned output schemas are unchanged.
  • mcp:statamic:install asks for the HTTP profile when the HTTP endpoint is enabled (--http-profile= without a prompt) and saves STATAMIC_MCP_HTTP_PROFILE. Non-interactive runs without one fail before changing anything; previously an upgraded site kept an endpoint that refused every call.
  • mcp:doctor applies 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_reference refuses more than 5,000 readable entries and terms instead of returning an incomplete graph with false orphan findings; use paginated content_validate for 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/ to historical/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, clear or none) replaces clear_stache_after_write; false there is still read as none. Static caches are flushed after content writes by default; static_after_write can 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 published on entries create used 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 :write scopes, 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 expectedScopes precondition on update(). 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 get and writes by id no longer fall back to the default site. Without site, get, update, delete, publish, unpublish, restore_revision and publish_working_copy act on exactly the entry the id names; with site they act on that localization, or answer NOT_FOUND if there is none. Before, update without site wrote the default-site copy and publish/unpublish/delete ignored site. The version check, the approval's expected version and the write now resolve the same record, so an approved publish_working_copy goes APPROVAL_STALE when that localization changes, and one localization's expected_version cannot authorize a write to another. An approval names the site of the entry it writes.

  • Entry create without data.published follows 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 localize saves the new localization as a draft unless data.published is 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 --apply revokes them and mcp:doctor counts them; a v3 refresh token answers invalid_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 mismatched resource still answers invalid_target.

  • A refused, malformed or missing resource read is a JSON-RPC error (-32602, HTTP 400, reason in error.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_scope step-up. A presented but invalid, expired or unbound bearer token is challenged with error="invalid_token", and OAuth clients are told to authorize again.

  • statamic-system-read search loads and authorizes only the hits a page needs. total is exact when next_cursor is null and otherwise a lower bound.

  • With the searchable catalog on, each call in an execute_tools batch counts against rate_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. The forms blueprint 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 resource on 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 include iss. HTTP challenges advertise required scopes, and missing scopes fail with 403 insufficient_scope before dispatch, including the full execute_tools batch. CORS exposes that challenge to browser clients. Protected-resource discovery advertises minimal initial reads; DCR accepts web and native application types with unchanged redirect safety.

  • statamic-discover replaces 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_agent and statamic_contract prompts are replaced by write_entry, translate_entry, edit_page_builder and model_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"] when security.expose_versions is enabled. They no longer appear in tool metadata or system info; stored-record concurrency versions are unchanged.

  • Lists use items, next_cursor and total, with deterministic ordering and an authenticated opaque cursor instead of offset. Configuration catalogs and entry revisions are paginated too. Cursors are tied to the query, permit changing limit, and never replace per-call authorization. content_validate pages its record stream with the same cursor contract while keeping findings and summary. Blueprint catalogs preserve identical handles in different namespaces, include taxonomy-specific blueprints and filter denied handles before counting or paging.

  • Tool failures set MCP isError and return one error object with code, message, and optional field, valid_values and hint. Codes come from a closed enum; missing records, validation, permissions, missing scopes, approvals, version conflicts and uncertain writes remain distinguishable. Clients must read error.code instead of data.code or errors. 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 configure is removed; update handles settings, including collection structure and orderable. Collection tree moves now use the explicit move action with data.entry and data.parent; update refuses 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-forms router is now statamic-forms-read / statamic-forms-write on Forms 2. Form settings are title, store, honeypot, fields and connections; email notifications are the email connection. Settings added with Form::appendConfigFields() are refused, and deleting a whole form is no longer an MCP action (delete it in the Control Panel). Tokens need submissions:read/submissions:delete for submission data.

  • System config_set is 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, and statamic-{area}-write (entries, terms, globals, assets, forms) or statamic-{area}-admin (blueprints, structures, users, system), which changes the site. statamic-content-facade-read has no write tool. Every tool carries all four behaviour hints. A client rule (mcp__statamic__*-read in Claude Code, Mcp(statamic:*-read) in Cursor CLI) allows reads; approve statamic-discover separately. 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 (needs and optional on RouterAction). 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: entries version → revision_state; globals global_set → handle; blueprints collection_handle/taxonomy_handle → collection/taxonomy; asset containers handle → container; asset filters.folder → folder; structures config → data. A create names the new resource in handle (container for assets), and data.handle may only repeat it, so the resource policy and the handler always read the same name. The unread filters on users, structures and content-facade is removed. See UPGRADE for the full table.

  • tools/list shows 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 with STATAMIC_MCP_SEARCHABLE_CATALOG=true for a client without its own tool search.

  • resource_type is required where a tool has several kinds of resource (assets, structures, users) and gone where it had none. statamic-discover describes the tools from their declarations: actions, resource types and arguments per tool.

  • Tools from other packages declare their actions in actions() as RouterAction::read(), edit(), publish(), delete() or admin() instead of getActions(). The declared effect decides scopes, write mode and approvals; an action's name no longer does, so a purge or send action is no longer checked as a read. An undeclared action, or a resource_type the action does not apply to, is refused with the valid choices. A v3 router that still declares protected function getActions() is refused with this explanation when registered, instead of a PHP fatal error at boot; BaseRouter's public action summary method is now actionSummaries().

  • statamic-structures no longer offers create, update, delete or configure for sites, which only ever answered "not supported"; configure sites alone no longer offers structures:admin.

  • Retire content:read and content: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 --apply drops them from personal tokens; OAuth grants issued by v3 are revoked and authorize again (see below).

  • A list filters key 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, origin for entries; id, slug, title, uri for 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 terms field takes term slugs (taxonomy::slug when it spans several taxonomies), an entries field takes ids of entries in its collections, a users field 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 without terms:write.

  • Users create, update, activate and assign_role need a person's approval over HTTP by default, like delete. A config without a users key gets this too; 'users' => [] turns it off. Changing your own email or password over HTTP needs data.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_expiry is 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 $actor filter (user:{id} or cli). A custom audit store must accept it.

  • Split publishing and deleting out of the write scopes. entries:write now covers create and update; publishing needs entries:publish, including data.published: true on create/localize and any publication flag on update. Deleting needs entries:delete, terms:delete or assets:delete. Existing write tokens keep editing and answer a missing-scope refusal for the rest. Admin domains use :admin for 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 answers invalid_grant. mcp:doctor counts the tokens affected by both changes.

  • Give the admin domains their own scope: structures:admin, blueprints:admin, users:admin and system:admin replace the :write scopes there. A token holding a replaced scope is refused with a message naming its replacement, and its OAuth refresh answers invalid_grant.

  • mcp:statamic:install now guides an upgrade too: on an existing installation it keeps the config, asks for and saves the stdio profile, runs migrations, shows the mcp:migrate-v4 plan for the tokens v4 affects with an offer to apply it, and ends with mcp:doctor.

  • Route tool and resource authorization through one decision, McpAuthorizer. A resource refused for a missing Statamic permission now answers Permission denied: Cannot get blueprints like 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 system reindex) over HTTP answers APPROVAL_REQUIRED with an approval_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 with approval_id. An approval covers that exact call once, expires after confirmation.ttl (now 900 seconds), and stops holding if the record changes. confirmation_token is no longer accepted. The model could answer the old token itself; a person now has to approve.

Security

  • Entry create, update and localize over HTTP keep the author as the Control Panel does for a caller without the collection's "edit other authors" permission: create makes the caller the author and update keeps the stored one, whatever data.author says.

  • 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 gets OPERATION_LIMIT past 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 toward oauth.max_clients, so anonymous registration can no longer keep real clients out for 30 days.

  • A client metadata document's logo_uri is shown only over https on the client_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 mcp auth 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:doctor counts 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 TermPolicy checks 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-operation for 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 update with a stale expected_version in a site the user may not access answered VERSION_CONFLICT with 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 update to an email another user already has, as Statamic's UsersController does. On the file driver users are stored by email, so the save overwrote that account (a super admin's included).

  • Asset upload and create apply the container's validation rules (e.g. image, max:2048) to the new file, as a Control Panel upload does, on top of AllowedFile.

Fixed

  • The read_only installation profile refused blueprint scan, types and validate, which only read.

  • Users who may edit roles or user groups are offered users:read, which the role and group reads need.

  • forms:read is 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_size was reported as a failure, so a retry wrote it twice. It now answers success with the record's identifying fields and response_truncated: true.

  • The MCP Admin page answered 500 when STATAMIC_MCP_RATE_LIMIT_MAX (or another number) came from .env as a string in a config published before v4.

  • content_validate failed 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 on php artisan serve, Docker on 8080 and similar.

  • Error responses are no longer discarded by MCP SDK clients. The output schema typed data as an object, while a failure carries data: null; the official SDKs validate failures against the schema too and replaced every error with -32602. data is now object, array or null.

  • Store navigation trees on statamic/eloquent-driver. The driver saves a new tree as empty, so a navigation create or update with 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-driver it 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 version a following write accepts on database repositories. It was taken from the instance just saved, which lacks the columns the database fills, so expected_version from a write answered VERSION_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 route on create and update. 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. update supports sort_dir, structure and orderable; the former configure action is removed.

  • Refuse a top-level slug on entry update instead of ignoring it; the slug goes inside data, as the schema says.

  • Report a blueprint write that a BlueprintCreating, BlueprintSaving or BlueprintDeleting listener refused as refused. create, update, generate and delete answered success although Statamic saved nothing, and a refused update left the changed blueprint in memory for the rest of the request.

  • Report moves in the collection tree (an entry update or create with parent, a collection move) with write_effects and retry_requires_reconciliation when 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 as committed instead 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 move refuses a destination that already holds a file ("An asset already exists at …", as copy does) 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, /token and /revoke have 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:install fails when migrate fails instead of reporting success. An upgrade passes --force to migrate without overwriting configuration or client files, and a database operation store counts as needing migrations.

  • The installer merges into an existing mcpServers.statamic stdio entry (command, args and the stdio profile only; extra env such as STATAMIC_MCP_STDIO_TOKEN stays), leaves an HTTP (url) entry alone, saves a .pre-mcp-v4 backup and writes atomically. Its summary reports only what the run did, and declined client-rule changes point to mcp:migrate-v4 --apply.

  • mcp:migrate-v4 --rollback revokes tokens holding forms:write, which v3.7 lets delete forms with all their submissions. mcp:migrate-v4 reports 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-role as an alias of assign_role; mcp:doctor warns when an explicitly listed users, forms or system list 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 tokens and revoke 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 on Object.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 create wrote into the default site whatever site named, 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 update stored data.slug as 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 (Über becomes ueber in a German site), as Statamic does.

  • Global set list required configure globals, so an editor allowed on one set could get and update it but not list it. Like Statamic's GlobalSetPolicy::index, it now needs no fixed permission and lists only the sets the user may edit in the requested site.

  • Global set get/update and navigation get/update refused users holding only configure globals or configure navs, which Statamic's policies admit to every set and navigation. A navigation get also accepts edit {handle} nav, like NavPolicy::view, and such editors are offered structures:read.

  • A new user password (create, update) is checked against the site's Password::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 update their own profile without edit users, as Statamic's UserPolicy allows; roles, groups and super stay out of reach, and their own email or password still needs data.current_password over HTTP. The token still needs users:admin.

  • User update with data.super: false removes super admin status instead of ignoring it. As in the Control Panel only a super admin may, and never from themselves.

  • Asset create and update validate data against the container's blueprint and store it processed by the fieldtypes, as the Control Panel does; an invalid value is refused with VALIDATION and nothing is saved. create checks only the fields it is given. Keys the blueprint does not define are stored as given.

  • Asset copy leaves out fields marked duplicate: false and records duplicated_from, as Statamic's Duplicate action does.

Full changelog: v3.7.0...v4.0.0