The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Symfony Agent MCP listing page.
Features • Quick Start • Integration • Usage • Documentation • Contributing • License
A production-ready Model Context Protocol (MCP) server for Symfony applications. Gives AI assistants deep, read-only introspection into your entire Symfony codebase — routes, controllers, services, entities, database schema, migrations, events, forms, security, Doctrine, Messenger, Twig, API Platform, and much more.
| Client | Install |
|---|---|
| Claude Code | Run claude mcp add → setup |
| Claude Desktop | Add to claude_desktop_config.json → setup |
| Cursor | Add to .cursor/mcp.json → setup |
| VS Code Copilot | Add to .vscode/mcp.json → setup |
| Any MCP client | stdio transport, command: npx @shakaran/symfony-agent-mcp |
[REDACTED] before any data reaches the AIeval, no PHP runtime)See GETTING_STARTED.md for a step-by-step guide including Node.js setup, troubleshooting, and first-use verification.
| Client | Install |
|---|---|
| Cursor | |
| VS Code | |
| VS Code Insiders | |
| Windsurf | |
| Claude Code | |
| Claude Desktop |
Run once to register the server:
To make it available globally across all projects, add the --scope user flag:
Add to your Claude Desktop configuration file (claude_desktop_config.json):
Add to .cursor/mcp.json:
Add to .vscode/mcp.json:
Every tool accepts an app_path parameter pointing to the root of your Symfony application:
Example prompts you can use with Claude:
doctrine.event_listener?"All configuration is done via environment variables passed to the MCP server process.
| Variable | Default | Description |
|---|---|---|
SYMFONY_MCP_DYNAMIC_TOOLS | true | Enable dynamic tool discovery. When true, tools/list returns only 5 meta-tools instead of all 1,677. Set to false to restore the legacy behaviour (all tools always visible). |
SYMFONY_MCP_TOKEN_BUDGET | 40000 | Maximum estimated tokens that can be activated per session. Activation is blocked when this limit would be exceeded; pass force=true in activate_category to override. |
| Variable | Default | Description |
|---|---|---|
SYMFONY_MCP_ALLOWED_PATHS | (any) | Colon-separated list of absolute app paths the server may inspect. Example: /var/www/app1:/var/www/app2 |
SYMFONY_MCP_REQUIRE_SYMFONY | true | Set to false to skip Symfony project validation (useful for testing). |
SYMFONY_MCP_ALLOWED_TOOLS | (all) | Comma-separated allowlist of tool names. Only listed tools are callable. |
SYMFONY_MCP_BLOCKED_TOOLS | (none) | Comma-separated denylist. Takes precedence over the allowlist. |
SYMFONY_MCP_SIGNING_SECRET | (off) | 32+ character secret for request signing. Enables per-request authentication. |
SYMFONY_MCP_SESSION_SECRET | (off) | Secret for session token generation. |
SYMFONY_MCP_SESSION_TOKEN | (off) | Token to validate on incoming requests. |
SYMFONY_MCP_SESSION_STRICT | false | Set to true to reject requests without a valid session token. |
SYMFONY_MCP_SESSION_WINDOW | 300 | Session token validity window in seconds. |
| Variable | Default | Description |
|---|---|---|
SYMFONY_MCP_RATE_LIMIT | 60 | Max requests per window. Set to 0 to disable. |
SYMFONY_MCP_RATE_WINDOW_MS | 60000 | Rate limit window in milliseconds (1 minute). |
SYMFONY_MCP_RATE_BURST | 10 | Max burst requests in 1 second. |
| Variable | Default | Description |
|---|---|---|
SYMFONY_MCP_HTTP_PORT | (off) | Port for HTTP/SSE transport. When set, starts an HTTP server in addition to stdio. |
SYMFONY_MCP_STDIO | true | Set to false to disable stdio transport (useful when running HTTP-only). |
SYMFONY_MCP_TOOL_TIMEOUT_MS | 30000 | Per-tool execution timeout in milliseconds. |
Use this when you want to run the server from a local clone (no npm publish needed).
Then configure your MCP client to point at the built file:
Claude Code (run once):
Claude Desktop (claude_desktop_config.json):
VS Code (.vscode/mcp.json):
Tip: After rebuilding (
pnpm build), restart your MCP client to pick up the changes.
The server reads files directly from your Symfony app — no database connection, no PHP runtime needed:
config/routes.yaml, config/routes/*.yaml — YAML routes#[Route] attributes on controllers in src/Controller/config/services.yaml — DI container servicesconfig/packages/*.yaml — Framework, security, doctrine, messenger, mailer configsrc/Entity/*.php — Doctrine entity files (PHP 8 attributes + annotations)var/log/*.log — Application logsmigrations/, src/Migrations/ — Doctrine migration filescomposer.json, composer.lock — Package info.env, .env.local, .env.*.local — Environment variables (sensitive values auto-redacted)| Symfony | PHP | ORM mapping |
|---|---|---|
| 5.4 LTS | 8.0+ | Annotations or Attributes |
| 6.x | 8.0+ | Attributes |
| 7.x | 8.2+ | Attributes |
| 8.x | 8.2+ | Attributes |
See DEVELOPMENT.md for the full development guide: architecture overview, adding new tools, testing strategy, and contribution guidelines.
| Document | Description |
|---|---|
| GETTING_STARTED.md | Step-by-step setup, Node.js prerequisites, troubleshooting |
| ARCHITECTURE.md | System design, security pipeline, component overview, all 1,677 tools across 16 categories documented |
| DEVELOPMENT.md | Development workflow, adding tools, testing, contributing |
| SECURITY.md | Threat model, DLP pipeline, responsible disclosure policy |
| CHANGELOG.md | Release history and roadmap |
| PROJECT_SUMMARY.md | High-level project overview and statistics |
Issues and pull requests are welcome at github.com/shakaran/symfony-agent-mcp.
Please read DEVELOPMENT.md before submitting a PR, and SECURITY.md for the responsible disclosure policy.
| Standard | Status |
|---|---|
| OpenSSF Baseline | Level 1, 2 and 3 |
| OpenSSF Best Practices | Passing |
| OpenSSF Scorecard | 7.4 / 10 |
| Supply chain | Published from CI with SLSA provenance and SBOM |
| Reproducible build | Verified in CI, byte-identical across builds |
| Code scanning | Zero open alerts |
| Secret scanning | Zero open alerts |
| Tests | 1,019 — src/utils/ at 100%, transport at 99.5% |
| Licensing | MIT, SPDX headers on every source file |
| Sign-off | Developer Certificate of Origin, checked in CI |
See SECURITY.md for the threat model, the assurance case and the remediation thresholds, and ROADMAP.md for what is planned.
MIT © Ángel Guzmán Maeso