D
Debug MCP Symfony Example
MCP server by wachterjohannes
Created 11/29/2025
Updated 17 days ago
README
Repository documentation and setup instructions
symfony/ai-mate Example Project
Example Symfony 8.0 project demonstrating MCP server integration for PHP development
What is this?
Demonstrates the symfony/ai-mate MCP server integration with:
- 5 Tools:
php-version,operating-system,operating-system-family,php-extensions,test_tool - 2 Static Resources:
test://info/about,test://info/help - Auto-discovery: Custom tools and resources from
mate/directory - Configuration: Service container integration via
.mate/services.php
Quick Start
git clone https://github.com/wachterjohannes/debug-mcp-symfony-example.git
cd debug-mcp-symfony-example
composer install
Setup
Claude Code (Recommended)
cd /path/to/debug-mcp-symfony-example
claude mcp add mate $(pwd)/vendor/bin/mate --scope local
claude mcp list # Verify: mate - ✓ Connected
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mate": {
"command": "/absolute/path/to/debug-mcp-symfony-example/vendor/bin/mate"
}
}
}
Restart Claude Desktop.
Testing the MCP Server
Tools
Test the available MCP tools:
- "What PHP version is running?" →
php-versiontool - "What operating system are we on?" →
operating-systemtool - "What PHP extensions are loaded?" →
php-extensionstool - "Run the test tool" →
test_tooltool
Resources
Test the available resources:
- "Show me the test information" →
test://info/aboutresource - "Show me help for the MCP server" →
test://info/helpresource
Use Cases
- Check PHP version and environment info during development
- List loaded PHP extensions without leaving your editor
- Verify system configuration for debugging
- Extend with custom tools in the
mate/directory - Configure services via
.mate/services.phpfor DI container integration
Add Your Own Tools
Create mate/MyTool.php:
<?php
namespace App\Mate;
use Symfony\Component\AiMate\Attribute\Tool;
class MyTool {
#[Tool(name: 'my_tool', description: 'Does something useful')]
public function execute(string $input): array {
return ['result' => "Processed: $input"];
}
}
Tools in mate/ are auto-discovered on the next request.
Configuration
Service Configuration
Edit .mate/services.php to configure the MCP server and add custom services:
<?php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $container): void {
$container->parameters()
->set('mate.cache_dir', sys_get_temp_dir().'/mate')
->set('mate.env_file', ['.env'])
;
$container->services()
// Add your custom services here
;
};
Extension Management
Extensions are managed in .mate/extensions.php (auto-generated by mate discover):
return [
'symfony/ai-mate' => ['enabled' => true],
];
Run mate discover to scan for and register new extensions.
Requirements
PHP 8.4+, Composer
License
MIT
Quick Setup
Installation guide for this server
Installation Command (package not published)
git clone https://github.com/wachterjohannes/debug-mcp-symfony-example
Manual Installation: Please check the README for detailed setup instructions and any additional dependencies required.
Cursor configuration (mcp.json)
{
"mcpServers": {
"wachterjohannes-debug-mcp-symfony-example": {
"command": "git",
"args": [
"clone",
"https://github.com/wachterjohannes/debug-mcp-symfony-example"
]
}
}
}
Author Servers
Other servers by wachterjohannes