Skip to content

Commit 8f692f9

Browse files
authored
Merge pull request #483 from os2display/feature/symfony-ai-mate
feat(dev): add Symfony AI Mate MCP server running through the phpfpm container
2 parents ea835f4 + 26adcec commit 8f692f9

15 files changed

Lines changed: 862 additions & 33 deletions

.claude/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
"playwright@claude-plugins-official": true
66
},
77
"enabledMcpjsonServers": [
8-
"context7"
8+
"context7",
9+
"symfony-ai-mate"
910
],
1011
"permissions": {
1112
"allow": [
13+
"mcp__symfony-ai-mate",
1214
"Bash(docker compose:*)",
1315
"WebFetch(domain:api-platform.com)",
1416
"Bash(grep:*)",

.markdownlintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@
44
# https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#ignoring-files
55
vendor/
66
node_modules/
7+
8+
# AI Mate generates AGENTS.md (maintained between the AI_MATE_INSTRUCTIONS
9+
# markers by the composer plugin) and ships its own agent docs under mate/.
10+
# Both follow Mate's own format, not this project's Markdown conventions, so
11+
# they are excluded from markdownlint rather than hand-fixed (the generated
12+
# parts would be overwritten anyway).
13+
AGENTS.md
14+
mate/

.mcp.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33
"context7": {
44
"type": "http",
55
"url": "https://mcp.context7.com/mcp"
6+
},
7+
"symfony-ai-mate": {
8+
"type": "stdio",
9+
"command": "docker",
10+
"args": [
11+
"compose",
12+
"exec",
13+
"-T",
14+
"phpfpm",
15+
"vendor/bin/mate",
16+
"serve",
17+
"--force-keep-alive"
18+
]
619
}
720
}
821
}

AGENTS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<!-- BEGIN AI_MATE_INSTRUCTIONS -->
2+
AI Mate Summary:
3+
- Role: MCP-powered, project-aware coding guidance and tools.
4+
- Required action: Read and follow `mate/AGENT_INSTRUCTIONS.md` before taking any action in this project, and prefer MCP tools over raw CLI commands whenever possible.
5+
- Installed extensions: symfony/ai-mate, symfony/ai-monolog-mate-extension.
6+
<!-- END AI_MATE_INSTRUCTIONS -->

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
- Added Symfony AI Mate (`symfony/ai-mate`, dev-only) as a project-aware MCP server for AI coding
8+
agents; wired in `.mcp.json` to run inside the `phpfpm` container via `docker compose exec`.
9+
Includes the Monolog bridge (`symfony/ai-monolog-mate-extension`) exposing log search/tail tools.
710
- Sped up the Playwright CI job: it now runs in parallel (3 workers, sized to the 4-vCPU public
811
GitHub runner) instead of the default 2, added `ipc: host` to the `playwright` Compose
912
service so parallel Chromium does not exhaust Docker's default 64 MB `/dev/shm`, pulls the

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ A few things teammates install once on their host so the project's hooks, auto-e
4545
across the Entity ↔ DTO ↔ Provider/Processor chain. Static analyser only — does not need host PHP.
4646
- **context7 MCP** — auto-enabled via `.mcp.json` + `.claude/settings.json` `enabledMcpjsonServers`. No
4747
install step; Claude Code fetches it on first use. Used for live Symfony/API Platform/Doctrine docs lookup.
48+
- **Symfony AI Mate MCP** — auto-enabled via `.mcp.json` + `enabledMcpjsonServers`. No host install; the
49+
stdio server runs inside the `phpfpm` container, so it just needs the compose stack up. Project-aware PHP
50+
tools (see `mate/AGENT_INSTRUCTIONS.md`); after changing Mate extensions, run
51+
`task compose -- exec phpfpm vendor/bin/mate discover`.
4852

4953
## The `/v2/` API is versioned — no breaking changes allowed
5054

composer.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
"phpstan/phpstan-symfony": "^2.0",
6464
"phpunit/phpunit": "^9.5",
6565
"rector/rector": "^2.4",
66+
"symfony/ai-mate": "^0.9.0",
67+
"symfony/ai-monolog-mate-extension": "^0.9.0",
6668
"symfony/browser-kit": "~6.4.0",
6769
"symfony/css-selector": "~6.4.0",
6870
"symfony/debug-bundle": "~6.4.0",
@@ -91,7 +93,8 @@
9193
"autoload-dev": {
9294
"psr-4": {
9395
"App\\PhpStan\\": "tools/phpstan/",
94-
"App\\Tests\\": "tests/"
96+
"App\\Tests\\": "tests/",
97+
"Mate\\": "mate/src/"
9598
}
9699
},
97100
"config": {
@@ -110,6 +113,16 @@
110113
"sort-packages": true
111114
},
112115
"extra": {
116+
"ai-mate": {
117+
"extension": false,
118+
"includes": [
119+
"mate/config.php"
120+
],
121+
"instructions": "mate/INSTRUCTIONS.md",
122+
"scan-dirs": [
123+
"mate/src"
124+
]
125+
},
113126
"symfony": {
114127
"allow-contrib": false,
115128
"require": "~6.4.0"

0 commit comments

Comments
 (0)