fix(mcp): enable stimmt/craft-mcp via committed config/mcp.php #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/enable-craft-mcp-prod"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Both
craft-cmsMCP profiles were dead (/mcpreconnect →-32000), for two distinct reasons:craft-cms): thephilflow_php_localcontainer simply wasn't running —docker exec philflow_php_local …failed immediately. Fixed by bringing the local stack up.craft-cms-prod): container healthy + SSH fine, but the MCP server exited withError: Craft MCP is disabled. The plugin'sapplyProductionDefaults()(vendor/stimmt/craft-mcp/src/Mcp.php) hard-disables MCP whenCRAFT_ENVIRONMENT=productionand noconfig/mcp.phpexists. That file was never tracked, so prod never actually had MCP enabled despite the 2026-05-20 deploy notes.Fix
Commit
config/mcp.phpreturning['enabled' => true]. The plugin only reads flat top-level keys (Craft's multi-environment'*'/'production'form is not supported), so the config is intentionally flat. This makes the enabled state reproducible from a cleandocker compose up, per project rule #5.Verification
initializehandshake returnsCraft CMS MCP Server v1.2.2✅philflow:latest(config baked viaDockerfile.prod), recreatedphilflow_php(healthy),initializenow returns the server descriptor instead of "disabled" ✅HTTP 200✅backups/predeploy_20260620_190016.sql.gz, 14M)🤖 Generated with Claude Code