定制 itsjustvita/symfony-boost 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

itsjustvita/symfony-boost

Composer 安装命令:

composer require itsjustvita/symfony-boost

包简介

MCP Server für Symfony und Claude Code (PhpStorm)

README 文档

README

Latest Version Total Downloads License PHP Version

⚠️ 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:

  1. Create .mcp.json with the structure above
  2. Create .claude/settings.local.json:
{
  "permissions": {
    "allow": [
      "mcp__symfony-boost__*"
    ]
  },
  "enableAllProjectMcpServers": true,
  "enabledMcpjsonServers": ["symfony-boost"]
}

Security

  • READ-ONLY Queries Only: The database_query tool 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

  1. Check if .mcp.json exists and is correct
  2. Restart Claude Code
  3. Run php vendor/bin/symfony-boost install --force

"DATABASE_URL not found"

  1. Make sure .env exists
  2. Check if DATABASE_URL is defined in .env
  3. Run symfony-boost install again

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:

  1. Check the troubleshooting section
  2. Create an issue on GitHub
  3. 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

itsjustvita/symfony-boost 适用场景与选型建议

itsjustvita/symfony-boost 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 10 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 itsjustvita/symfony-boost 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 itsjustvita/symfony-boost 我们能提供哪些服务?
定制开发 / 二次开发

基于 itsjustvita/symfony-boost 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 26
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-17