Search by

stimmt / craft-mcp

stimmt

Developer tools, Commerce and content extras for Craft CMS's built-in MCP server

Package info

github.com/stimmtdigital/craft-mcp

Homepage

Type:craft-plugin

pkg:composer/stimmt/craft-mcp

Statistics

Installs: 9 558

Dependents: 1

Suggesters: 2

Stars: 35

Open Issues: 0

v2.0.1 2026-11-17 20:00 UTC

README

Craft MCP

CI Total Downloads Latest Stable Version License

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

  1. Install the plugin:

    composer require stimmt/craft-mcp
    php craft plugin/install mcp
  2. In the control panel, go to Settings → MCP and enable the authenticated server. Use endpoint paths that do not start with mcp inside the control panel, for example /admin/ai and /admin/ai/auth (or /ai and /ai/auth when the control panel has no cpTrigger). The plugin's handle is mcp, so Craft would send a control panel path starting with mcp to the plugin, and clients would get a login page.

  3. 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/install writes 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_health call 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_summary groups 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_report gathers 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:

Contributing

Thank you for considering contributing to Craft MCP! Please see GitHub Issues for bug reports, feature requests, and discussion.

Credits

License

Craft MCP is open-sourced software licensed under the MIT license.