rokkay/symfony-boost
If you are the rightful owner of symfony-boost and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Symfony Boost is a lightweight Symfony bundle that provides an MCP Server and conventions to enhance AI-assisted development for Symfony projects.
Symfony Boost Bundle
Symfony Boost is a lightweight Symfony bundle that ships an MCP (Model Context Protocol) Server and a set of conventions to supercharge AIâassisted development for Symfony projects. It is designed to work handâinâhand with symfony/mcp-bundle
, exposing your applicationâs context and safe tooling so AI agents (IDE copilots, chat assistants, or CI bots) can generate Symfonyâidiomatic code and perform routine maintenance tasks confidently.
Status: Experimental. API and conventions may evolve ahead of a 1.0 release.
Highlights
- Firstâclass MCP Server for Symfony via
symfony/mcp-bundle
. - Sensible defaults: curated capabilities and safe tools for code generation and refactoring.
- Symfonyâaware prompts, scaffolds, and guardrails for common components (Controllers, Commands, Forms, Messages, Validators, Doctrine, HTTPâKernel, etc.).
- Documentation and patterns to keep AI changes maintainable, testable, and secure.
Requirements
- PHP >= 8.3
- Symfony 6.4 or 7.x components (tested with 7.x)
See composer.json
for exact constraints.
Installation
composer require rokkay/symfony-boost --dev
Why --dev? The MCP server and AI tooling are typically used in development, CI, or local automation contexts.
Bundle registration
If you use Symfony Flex, the bundle will be autoâenabled. Otherwise, add it manually to your config/bundles.php
:
return [
// ...
Rokkay\SymfonyBoostBundle\RokkaySymfonyBoostBundle::class => ['all' => true],
];
What the MCP Server provides
Through the MCP protocol, an AI client can:
- Inspect project structure (safe, readâonly file discovery and snippets)
- Propose code changes as patches with justification
- Generate Symfonyâaware scaffolding (controllers, commands, DTOs, message handlers, etc.)
- Run readâonly diagnostics (containerâlint, router:match, debug:container) and summarize
- Run guarded test commands (phpunit subsets) and parse results
All mutating actions are designed to be explicit, reviewable, and limited to allowed paths.
Using with AI Clients
Most modern AI tools with MCP client support can connect to this server. Typical configurations:
"mcpServers":
{
"symfony-boost": {
"command": "php",
"args": [
"/your/full/path/to/bin/console",
"boost:mcp"
]
}
}
Once connected, the assistant will discover capabilities and available tools automatically.
Boosting AIâassisted development: Recommended Practices
- Keep the context rich and current
- Ensure
composer.json
andsymfony.lock
/composer.lock
are upâtoâdate so the assistant understands dependencies. - Prefer small, focused PRs; AI diff review works best with limited scope.
- Ensure
- Codify constraints
- Use PHPStan and PHPUnit; expose their commands via the MCP diagnostic tools.
- Adopt Rector or PHP CS Fixer for refactor/format, and prefer assistants to output proposed diffs.
- Guide the assistant
- Provide clear intents: feature description, public API, and acceptance criteria.
- Link to domain rules, ADRs, or docs; put them under
docs/
so the MCP readâonly tools can fetch them.
- Be explicit with write permissions
- Restrict write paths to
src/
andtests/
unless necessary. - Require justification for any file deletion or moves.
- Restrict write paths to
- Validate every change
- Run
phpunit
and static analysis before merging. - Prefer âapply patchâ flows over unrestricted file write operations.
- Run
Example workflows
- Generate a controller and test
- Ask your MCP client: âCreate a Controller FooController with route /foo returning JSON, and a corresponding functional test.â
- The assistant proposes files under
src/Controller
andtests/Functional
with a gitâstyle patch. - You review and apply via your IDE.
- Debug a failing route
- âList routes matching GET /api/users/42 and explain controller resolution.â
- The assistant runs
bin/console debug:router | grep users
(or an internal route matching tool) and summarizes.
- Safe refactor
- âExtract service UserPasswordUpgrader, update DI wiring, and adjust consumers. Provide a patch and run PHPUnit subset for security.â
Development
- Install dev tools:
composer install
vendor/bin/phpstan analyse
vendor/bin/phpunit
- Local MCP server:
php bin/console mcp:serve
Contributions are welcome. Please open issues with detailed repro steps and proposed improvements to MCP capabilities or guardrails.
Versioning and Stability
This bundle follows semantic versioning when possible. Until 1.0, minor releases may contain breaking changes. Pin versions in CI if stability is critical.
Security
Never expose your development MCP server to the public internet without proper authentication and network controls. Restrict write paths and prefer patch/diff flows.
License
Licensed under the MIT License. See .
Credits
- MCP foundation:
symfony/mcp-bundle
andsymfony/mcp-sdk
- Author: @rokkay