feat(dev): add Symfony AI Mate MCP server running through the phpfpm container#483
Merged
Conversation
…container Install symfony/ai-mate (dev-only) and wire its stdio MCP server into .mcp.json via 'docker compose exec -T phpfpm vendor/bin/mate serve' so it works without host PHP, matching the project's container-only tooling. Enable it in .claude/settings.json, document it in CLAUDE.md, and add project instructions (extra.ai-mate.instructions) telling agents to run mate through the container. Drop the mate-generated host-path mcp.json and Codex wrappers, which assume host PHP. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds symfony/ai-monolog-mate-extension (PHP-only constraints, no Symfony 7 requirement) exposing monolog-search/-context-search/-tail/ -list-files/-list-channels against var/log inside the container. The Symfony bridge (container/profiler introspection) is skipped for now: it requires symfony/dependency-injection ^7.3, incompatible with this Symfony 6.4 app — revisit on the 7.x upgrade. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ony-ai-mate # Conflicts: # CHANGELOG.md # composer.lock
…tion - php-cs-fixer: format mate/config.php and mate/extensions.php. - markdownlint: ignore the AI Mate docs (generated AGENTS.md + the mate/ directory), which follow Mate's own format rather than this project's Markdown conventions and are partly generated by the composer plugin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Symfony AI Mate (
symfony/ai-mate, dev-only) as a project-aware MCP server for AI coding agents, wired to run inside thephpfpmcontainer via docker compose — matching the project's container-only tooling (no host PHP).Features Added
symfony/ai-mate^0.9.0 inrequire-dev, initialised withmate init+mate discover(mate/config directory,Mate\\dev autoload,extra.ai-mateconfig)..mcp.json: newsymfony-ai-matestdio server launched asdocker compose exec -T phpfpm vendor/bin/mate serve --force-keep-alive; enabled in.claude/settings.jsonenabledMcpjsonServers.mate/INSTRUCTIONS.mdregistered viaextra.ai-mate.instructions: project-specific agent instructions (run mate through the container, never host PHP) that survivemate discoverregeneration and are served through the MCP handshakeinstructionsfield.mcp.jsonandbin/codex* wrappers — they assume host PHP (./vendor/bin/mate) which doesn't exist in this dev setup.CLAUDE.md(prerequisites section) andCHANGELOG.md.Files Changed
composer.json/composer.lock- new dev dependency +extra.ai-mateconfig (normalized, lock re-synced).mcp.json-symfony-ai-matestdio server through docker compose.claude/settings.json- enable the servermate/(new) - mate config, extensions registry, agent instructionsAGENTS.md(new) - mate-managed instructions blockCLAUDE.md,CHANGELOG.md- docsTest Plan
docker compose exec -T phpfpm vendor/bin/mate mcp:tools:list→ listsserver-infotool ✅initializehandshake throughdocker compose exec -T phpfpm vendor/bin/mate servereturns serverInfo + project instructions ✅ (verified locally)composer validate+composer normalize --dry-runclean ✅/mcp—symfony-ai-mateshould be connected (requires the compose stack up; the SessionStart hook starts it)🤖 Generated with Claude Code