stimmt / craft-mcp
Developer tools, Commerce and content extras for Craft CMS's built-in MCP server
Requires
- php: ^8.3
- composer/semver: ^3.3.2
- craftcms/cms: ^5.12.1
- guzzlehttp/guzzle: ^7.2.0
- mcp/sdk: ^0.9
- psy/psysh: ^0.12
- symfony/polyfill-php84: ^1.31
Requires (Dev)
- laravel/pint: ^1.18
- pestphp/pest: ^4.0
- pestphp/pest-plugin-type-coverage: ^4.0
- phpstan/phpstan: ^2.0
- rector/rector: ~2.8.3
- sanmai/phpstan-rules: ^0.3.13
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-master
- v2.0.1
- v2.0.0
- v2.0.0-beta.2
- v2.0.0-beta.1
- v1.8.1
- v1.8.0
- v1.7.1
- v1.7.0
- v1.6.3
- v1.6.2
- v1.6.1
- v1.6.0
- v1.5.0
- v1.4.0
- v1.4.0-beta.13
- v1.4.0-beta.12
- v1.4.0-beta.11
- v1.4.0-beta.10
- v1.4.0-beta.9
- v1.4.0-beta.8
- v1.4.0-beta.7
- v1.4.0-beta.6
- v1.4.0-beta.5
- v1.4.0-beta.4
- v1.4.0-beta.3
- v1.4.0-beta.2
- v1.4.0-beta.1
- v1.3.0
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.1
- v1.0.0
This package is auto-updated.
Last update: 2026-11-17 20:00:36 UTC
README
Introduction
Craft CMS 5.12 ships its own MCP (Model Context Protocol) server: an HTTP endpoint with OAuth login and scopes, and a stdio server for local tools. Craft MCP 2.0 is no longer a server of its own. It adds tools to Craft's:
- Install health and developer tools (Lite): a one-call health check, error triage, failed queue jobs, slow requests, security advisories, database schema and read-only SQL, logs, config, routes, GraphQL, backups, and a tinker tool for running PHP
- Content extras (Lite): grouped entry counts, natural keys (
{"section": "news", "slug": "launch"}) turned into the ids Craft's tools take, preview links, and categories, global sets and Craft Commerce, which Craft's own tools do not cover - Site management (Pro): draft review and validated publishing, translation gaps, broken links, unused assets, a change feed, Retour, SEOmatic and Formie insights, a maintenance report, copying entries between sites, and adding or moving a single Matrix block
Every plugin tool is named stimmt_…. Clients connect to Craft's endpoint, log in with their Craft account, and see the plugin's tools next to Craft's.
Upgrading from 1.x? 2.0 changes the config file, the endpoint and every tool name: follow UPGRADE.md.
Requirements
- Craft CMS 5.12.1 or later
- PHP 8.3 or later
Quick Start
-
Install the plugin:
composer require stimmt/craft-mcp php craft plugin/install mcp
-
In the control panel, go to Settings → MCP and enable the authenticated server. Use endpoint paths that do not start with
mcpinside the control panel, for example/admin/aiand/admin/ai/auth(or/aiand/ai/authwhen the control panel has nocpTrigger). The plugin's handle ismcp, so Craft would send a control panel path starting withmcpto the plugin, and clients would get a login page. -
Check the setup:
php craft mcp/check
It reports Craft's MCP server, the endpoint paths, the OAuth keys, leftover 1.x settings in
config/mcp.php, the plugin's tools and the edition, and exits non-zero on an error.
See Installation for details.
Connecting clients
- Claude (web, Desktop, mobile), ChatGPT and other HTTP clients: add a custom connector with Craft's endpoint URL, log in to Craft, and choose read only, read and write, or (admins) full access.
- Claude Code:
claude mcp add --transport http craft <url>, or run Craft's stdio server locally. - Local tools, scripts and CI:
php craft mcp/serve --user=<id|username|email>runs Craft's stdio server as that user.php craft mcp/installwrites the config for Claude Code, Cursor, Claude Desktop and Codex.
See Connecting clients. For editors: Using Claude with your Craft site.
The Toolbox
| Area | Tools | Gate | Edition |
|---|---|---|---|
| Content | stimmt_entries_count, stimmt_refs_resolve, stimmt_entries_preview_url, stimmt_categories_list |
read | Lite |
stimmt_globals_list |
admin | Lite | |
stimmt_drafts_publish, stimmt_entries_copy_to_site, stimmt_nested_entries_create, stimmt_nested_entries_move |
write | Pro | |
| Content review and health | stimmt_drafts_diff, stimmt_entries_untranslated, stimmt_links_broken, stimmt_assets_unused, stimmt_activity_recent |
read | Pro |
| Operations | stimmt_health, stimmt_errors_summary, stimmt_queue_failures, stimmt_requests_slow, stimmt_dependencies_audit |
admin | Lite |
stimmt_maintenance_report |
admin | Pro | |
| Database | stimmt_db_schema, stimmt_db_info, stimmt_db_table_counts, stimmt_db_query, stimmt_db_explain |
admin | Lite |
| System | stimmt_config_get, stimmt_logs_read, stimmt_errors_last, stimmt_console_commands_list, stimmt_routes_list |
admin | Lite |
| Debugging | stimmt_deprecations_list, stimmt_environment_get, stimmt_event_handlers_list, stimmt_tinker |
admin | Lite |
| GraphQL | stimmt_graphql_schemas_list, stimmt_graphql_schema_get, stimmt_graphql_query, stimmt_graphql_execute, stimmt_graphql_tokens_list |
admin | Lite |
| Backup | stimmt_backups_list, stimmt_backups_create |
admin | Lite |
| Commerce | stimmt_commerce_products_list, stimmt_commerce_product_get, stimmt_commerce_orders_list, stimmt_commerce_order_get |
admin | Lite |
stimmt_commerce_order_statuses_list, stimmt_commerce_product_types_list |
read | Lite | |
| Plugin integrations | stimmt_redirects_404s (Retour), stimmt_seo_gaps (SEOmatic) |
read | Pro |
stimmt_forms_failures (Formie) |
admin | Pro |
What these add that Craft's own MCP server does not do:
- Install health and operations: one
stimmt_healthcall judges the whole install (environment, migrations, project config, queue, storage, recent errors) and gives a fix per problem; failed queue jobs with their errors; slow requests with repeated queries; security advisories for installed Composer packages. - Error triage:
stimmt_errors_summarygroups logged errors by cause, with counts and first and last occurrence, instead of a list of raw lines. - Content review and health: a field-by-field diff of a draft against its live entry, translation gaps between sites, links to content that is no longer live, assets nothing refers to, and a change feed of who edited what.
- Plugin integrations: Retour 404s with a suggested redirect target, SEOmatic metadata gaps as SEOmatic resolves them, and Formie deliveries that failed, without submitted values.
- Maintenance reporting:
stimmt_maintenance_reportgathers health, top errors and content changes per section and editor for a period in one call.
All of these only read.
read, write and admin are the scopes a user approves when connecting (mcp:read, mcp:write, mcp:admin). Admin tools are for Craft admin users only. Commerce tools exist only while Craft Commerce is installed; the Retour, SEOmatic and Formie tools only while that plugin is installed, enabled and on a supported version (Retour 5, SEOmatic 5, Formie 4).
stimmt_tinker, stimmt_db_query, stimmt_graphql_execute and stimmt_backups_create are dangerous: they are off in production unless enableDangerousTools is set for that environment in config/craft-mcp.php. See Configuration and the Tools Reference.
Editions
Lite is the free toolkit for investigating an install: health and operations, error triage, logs, SQL, GraphQL, Tinker and the other developer tools. Pro is the edition for managing and maintaining sites: draft review and validated publishing, content health, the change feed, the Retour, SEOmatic and Formie insights, the maintenance report, copying entries between sites and single Matrix-block tools. Upgrade in the control panel under Settings → Plugins. See Editions.
Documentation
The documentation index links everything:
- Installation: setup and troubleshooting
- Connecting clients: HTTP, scopes, stdio and the install wizard
- Configuration:
config/craft-mcp.php - Editions: Lite and Pro
- Tools Reference: every tool
- Agent guide: how the tools fit together, written for the AI agent
- Extending: your own tools, and field translators
- Upgrading from 1.x
Contributing
Thank you for considering contributing to Craft MCP! Please see GitHub Issues for bug reports, feature requests, and discussion.
Credits
- Created by Max van Essen
- Inspired by Laravel Boost
- Plugin icon from Lucide (MIT)
License
Craft MCP is open-sourced software licensed under the MIT license.