
Symfony Agent MCP
io.github.shakaranPublished by GitHub account shakaranv1.0.2Updated Oct 24, 2026
Read-only Symfony introspection: routes, services, entities, Doctrine, security, Twig and more.
Overview
A local, read-only MCP server that lets an AI assistant inspect a Symfony application's routes, services, entities, security, Twig and more.
- What you can do
- Inspect Symfony core structure: routes, controllers, services, DI container, events, commands and bundles, plus configuration and environment settings. Explore Doctrine entities, relationships, migrations, indexes and database schema. Review security setup: voters, firewalls, authenticators, JWT, OAuth, CSRF and access control. Examine frontend assets, Twig templates, translations and Symfony UX, and review tests and static analysis setup. Check messaging, API Platform, cache, sessions, queues and cloud integration configuration. Produce code quality and error summaries, including log excerpts and dependency checks.
- When to use it
- Useful when an assistant needs to answer questions about an existing Symfony codebase, such as which routes exist, how services are wired, which entities relate to each other, or where security attributes are missing. Suited to code review, onboarding and debugging work on a local Symfony project.
- Requirements
- Runs locally over stdio, typically via npx or a global npm install; Node.js 22 or newer is required. Each tool call takes an app_path pointing at the Symfony project root. Optional environment variables control allowed paths, tool allow/block lists, rate limits, token budget and session authentication.
Installation
In SourceWeft
- Open Symfony Agent MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
symfony-agent-mcp
[npm version] [License: MIT] [Node.js] [MCP] [PRs Welcome] [GitHub issues] [GitHub stars] [Build Status] [Coverage] [OpenSSF Scorecard] [Glama score] [smithery badge] [OpenSSF Baseline]
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.
Features
1,677 Tools across 16 Categories
Security-first design
- Read-only — never writes, modifies, or executes anything
- Auto-redaction — passwords, tokens, API keys, and database credentials are replaced with
[REDACTED]before any data reaches the AI - DLP pipeline — multi-layer Data Loss Prevention scanner (regex patterns + structural detection for credit cards, JWTs, SSH keys, cloud credentials, etc.)
- Path validation — directory traversal attacks are blocked at the input layer
- No code execution — PHP files are parsed statically (no
eval, no PHP runtime) - No network calls — all data comes from local files only
- Prompt injection filter — tool output is scanned for injection patterns before being forwarded to the AI
Quick Start
Option A: npx (no install required)
Option B: Install globally
Option C: From source
See GETTING_STARTED.md for a step-by-step guide including Node.js setup, troubleshooting, and first-use verification.
Integration
One-click Install
Claude Code
Run once to register the server:
To make it available globally across all projects, add the --scope user flag:
Claude Desktop
Add to your Claude Desktop configuration file (claude_desktop_config.json):
Cursor
Add to .cursor/mcp.json:
VS Code Copilot
Add to .vscode/mcp.json:
Usage
Every tool accepts an app_path parameter pointing to the root of your Symfony application:
Example prompts you can use with Claude:
- "Show me all routes with POST methods and their controllers"
- "Which services are tagged with
doctrine.event_listener?" - "List the last 50 lines of the production log"
- "Are there any circular dependencies in the service container?"
- "What Doctrine entities have relationships with User?"
- "Show me the migration history and any destructive migrations"
- "Which controllers have no security attributes?"
Configuration
All configuration is done via environment variables passed to the MCP server process.
Tool Discovery
Security & Access
Rate Limiting
Transport
Example: Claude Code with dynamic tools disabled
Example: token budget increased to 80 000 tokens
Local Install (from source)
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.
What It Reads
The server reads files directly from your Symfony app — no database connection, no PHP runtime needed:
config/routes.yaml,config/routes/*.yaml— YAML routes- PHP 8
#[Route]attributes on controllers insrc/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 Compatibility
Requirements
- Node.js ≥ 22.0.0
- pnpm ≥ 11.0.0 (or npm/yarn for development)
Development
See DEVELOPMENT.md for the full development guide: architecture overview, adding new tools, testing strategy, and contribution guidelines.
Documentation
Contributing
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.
Project standards
See SECURITY.md for the threat model, the assurance case and the remediation thresholds, and ROADMAP.md for what is planned.
License
MIT © Ángel Guzmán Maeso
Source: README.md at commit 6af2551
Tools
0Version history
1- v1.0.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts