Skip to content

feat(dev): add Symfony AI Mate MCP server running through the phpfpm container#483

Merged
turegjorup merged 5 commits into
release/3.0.0from
feature/symfony-ai-mate
Jun 10, 2026
Merged

feat(dev): add Symfony AI Mate MCP server running through the phpfpm container#483
turegjorup merged 5 commits into
release/3.0.0from
feature/symfony-ai-mate

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

Summary

Adds Symfony AI Mate (symfony/ai-mate, dev-only) as a project-aware MCP server for AI coding agents, wired to run inside the phpfpm container via docker compose — matching the project's container-only tooling (no host PHP).

Features Added

  • symfony/ai-mate ^0.9.0 in require-dev, initialised with mate init + mate discover (mate/ config directory, Mate\\ dev autoload, extra.ai-mate config).
  • .mcp.json: new symfony-ai-mate stdio server launched as docker compose exec -T phpfpm vendor/bin/mate serve --force-keep-alive; enabled in .claude/settings.json enabledMcpjsonServers.
  • mate/INSTRUCTIONS.md registered via extra.ai-mate.instructions: project-specific agent instructions (run mate through the container, never host PHP) that survive mate discover regeneration and are served through the MCP handshake instructions field.
  • Dropped the mate-generated root mcp.json and bin/codex* wrappers — they assume host PHP (./vendor/bin/mate) which doesn't exist in this dev setup.
  • Documented in CLAUDE.md (prerequisites section) and CHANGELOG.md.

Files Changed

  • composer.json / composer.lock - new dev dependency + extra.ai-mate config (normalized, lock re-synced)
  • .mcp.json - symfony-ai-mate stdio server through docker compose
  • .claude/settings.json - enable the server
  • mate/ (new) - mate config, extensions registry, agent instructions
  • AGENTS.md (new) - mate-managed instructions block
  • CLAUDE.md, CHANGELOG.md - docs

Test Plan

  • docker compose exec -T phpfpm vendor/bin/mate mcp:tools:list → lists server-info tool ✅
  • MCP initialize handshake through docker compose exec -T phpfpm vendor/bin/mate serve returns serverInfo + project instructions ✅ (verified locally)
  • composer validate + composer normalize --dry-run clean ✅
  • In Claude Code: restart session, run /mcpsymfony-ai-mate should be connected (requires the compose stack up; the SessionStart hook starts it)

🤖 Generated with Claude Code

turegjorup and others added 3 commits June 5, 2026 10:28
…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>
@turegjorup turegjorup self-assigned this Jun 7, 2026
turegjorup and others added 2 commits June 10, 2026 08:21
…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>
@turegjorup
turegjorup merged commit 8f692f9 into release/3.0.0 Jun 10, 2026
22 checks passed
@turegjorup
turegjorup deleted the feature/symfony-ai-mate branch June 10, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant