itsjustvita / symfony-boost
MCP Server fΓΌr Symfony und Claude Code (PhpStorm)
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/itsjustvita/symfony-boost
Requires
- php: >=8.1
- doctrine/dbal: ^3.0|^4.0
- symfony/console: ^6.0|^7.0
- symfony/dotenv: ^6.0|^7.0
- symfony/filesystem: ^6.0|^7.0
This package is auto-updated.
Last update: 2025-10-21 09:15:07 UTC
README
β οΈ BETA VERSION - This package is currently in beta. Please report any issues you encounter.
An MCP (Model Context Protocol) server for Symfony projects that provides Claude Code and PhpStorm with advanced functionality.
Features
- ποΈ Database Tools: List tables, describe structure, execute queries
- π Doctrine Integration: List entities, show foreign keys
- π£οΈ Routing: Display all routes
- π Logs: Read log files, find last errors
- π― Console: Execute Symfony console commands
- βΉοΈ App Info: PHP version, Symfony version, database platform, bundles
- βοΈ Configuration: Get config values, list environment variables
- π¦ 14 MCP Tools: Comprehensive toolkit for Symfony development
Installation
1. Install Package
Local in project (recommended):
composer require itsjustvita/symfony-boost --dev
Or globally:
composer global require itsjustvita/symfony-boost
2. Generate Configuration
php vendor/bin/symfony-boost install
This command automatically creates:
.mcp.json- MCP server configuration.claude/settings.local.json- Claude Code permissions
3. Start Claude Code/PhpStorm
The tools are now available! Test with: "List all database tables"
Available Tools
Symfony Boost comes with 14 powerful MCP tools designed specifically for Symfony development:
Application & Configuration
| Tool | Description |
|---|---|
application_info |
Shows PHP version, Symfony version, database info |
get_config |
Get configuration values using dot notation |
list_env_vars |
Lists all environment variables from .env files |
list_bundles |
Lists all installed Symfony bundles |
Database Operations
| Tool | Description |
|---|---|
list_tables |
Lists all database tables |
describe_table |
Shows table structure (columns, indexes) |
list_entities |
Lists all Doctrine entities |
get_table_sizes |
Shows number of rows per table |
show_foreign_keys |
Shows all foreign key constraints |
database_query |
Executes READ-ONLY SQL queries |
Debugging & Development
| Tool | Description |
|---|---|
list_routes |
Lists all Symfony routes |
read_logs |
Reads the last N log entries |
last_error |
Reads the last error from application logs |
console_command |
Executes Symfony console commands |
Usage
With Claude Code
Simply use natural language commands:
"Show me all tables"
"Describe the 'users' table"
"Execute a SELECT on 'products'"
"List all routes"
"Show the last 50 log entries"
Direct (for debugging)
# Start server (stdio mode) php vendor/bin/symfony-boost # Show help php vendor/bin/symfony-boost --help # Show installation help php vendor/bin/symfony-boost install --help
Configuration
.mcp.json Structure
{
"mcpServers": {
"symfony-boost": {
"command": "php",
"args": ["vendor/bin/symfony-boost"],
"cwd": "/path/to/project",
"env": {
"DATABASE_URL": "mysql://user:pass@localhost/dbname",
"APP_ENV": "dev"
}
}
}
}
Manual Configuration
If install doesn't work, you can create the files manually:
- Create
.mcp.jsonwith the structure above - Create
.claude/settings.local.json:
{
"permissions": {
"allow": [
"mcp__symfony-boost__*"
]
},
"enableAllProjectMcpServers": true,
"enabledMcpjsonServers": ["symfony-boost"]
}
Security
- READ-ONLY Queries Only: The
database_querytool only allows SELECT, SHOW, EXPLAIN, DESCRIBE - Automatic LIMIT: Queries without LIMIT are automatically limited to 100 rows
- Shell Escaping: All paths are properly escaped
- Trusted Source: Commands come from Claude Code
Troubleshooting
"Tool not available" Error
- Check if
.mcp.jsonexists and is correct - Restart Claude Code
- Run
php vendor/bin/symfony-boost install --force
"DATABASE_URL not found"
- Make sure
.envexists - Check if
DATABASE_URLis defined in.env - Run
symfony-boost installagain
Server doesn't start
# Test manually echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | php vendor/bin/symfony-boost # Should return JSON-RPC response
Tools not showing
# List all tools echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | php vendor/bin/symfony-boost
Development
Project Structure
symfony-boost/
βββ bin/
β βββ symfony-boost # Executable
βββ src/
β βββ McpServer.php # JSON-RPC Server
β βββ SymfonyBoostServer.php # Tool implementations
β βββ InstallCommand.php # Install command
βββ composer.json
βββ README.md
Testing
# Test server manually php vendor/bin/symfony-boost install --help php vendor/bin/symfony-boost --help # Test MCP protocol echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | php vendor/bin/symfony-boost echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | php vendor/bin/symfony-boost
Requirements
- PHP 8.1+
- Symfony 6.0+ or 7.0+
- Doctrine DBAL 3.0+ or 4.0+
- Claude Code or PhpStorm with MCP support
License
MIT
Support
For issues or questions:
- Check the troubleshooting section
- Create an issue on GitHub
- Contact the maintainer
Changelog
1.0.0-beta (Current)
- Initial beta release
- 14 MCP tools for Symfony development
- CLAUDE.md generation with AI development guidelines
- Automatic installation command
- Support for both local and global installation
- Doctrine DBAL 3.x and 4.x compatibility
- New tools:
get_config,list_env_vars,last_error,list_bundles
Made with β€οΈ for Symfony Developers