Symfony MCP Bundle
Symfony integration bundle for Model Context Protocol (via official mcp/sdk)
What is Symfony MCP Bundle?
Symfony MCP Bundle is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to symfony integration bundle for model context protocol (via official mcp/sdk)
Symfony integration bundle for Model Context Protocol (via official mcp/sdk)
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Symfony integration bundle for Model Context Protocol (via o
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-bundleConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Symfony MCP Bundle
The Symfony MCP Bundle (symfony/mcp-bundle) is an official Symfony PHP bundle that lets you expose your Symfony application as a Model Context Protocol server, making it accessible to AI assistants like Claude through both HTTP and STDIO transports. Using PHP attributes on service classes, developers can declare MCP tools (callable functions), prompts (system instruction templates), and resources (static data endpoints) that AI clients can discover and invoke. PHP teams building Symfony applications can use this bundle to give Claude direct access to application logic, database queries, or business workflows through structured MCP tool calls.
Prerequisites
- PHP 8.2 or higher and Composer installed
- A Symfony 7.x application (the bundle uses Symfony AI components)
- An MCP-compatible client that supports HTTP or STDIO transport (e.g. Claude Desktop, Claude Code)
- The official mcp/sdk PHP package (installed automatically as a dependency)
Install the bundle via Composer
Add the bundle to your Symfony project using Composer. Note that this bundle is experimental and not covered by Symfony's Backward Compatibility Promise.
composer require symfony/mcp-bundleCreate the MCP bundle configuration file
Create config/packages/mcp.yaml in your Symfony project and configure the server metadata and transport options.
# config/packages/mcp.yaml
mcp:
app: 'my-app'
version: '1.0.0'
description: 'My Symfony MCP server'
client_transports:
stdio: true
http: true
http:
path: /_mcp
session:
store: file
directory: '%kernel.cache_dir%/mcp-sessions'
ttl: 3600Add MCP routes
Register the MCP bundle routes by adding a resource entry to config/routes.yaml.
# config/routes.yaml
mcp:
resource: .
type: mcpDefine an MCP Tool using PHP attributes
Create a Symfony service class and annotate methods (or the class itself) with #[McpTool] to expose them as callable MCP tools. Symfony's dependency injection container manages these services automatically.
<?php
use Mcp\Capability\Attribute\McpTool;
class MyAppTools
{
#[McpTool(name: 'get-order-status')]
public function getOrderStatus(string $orderId): string
{
// Your application logic here
return "Order $orderId is shipped";
}
}Configure your MCP client for HTTP transport
Add the Symfony application's MCP endpoint to your AI client config. For STDIO, use the Symfony console command instead.
{
"mcpServers": {
"symfony-app": {
"type": "http",
"url": "http://localhost:8000/_mcp"
}
}
}Start the Symfony server and test
Start your Symfony development server. For STDIO transport, use the built-in console command instead of HTTP.
# HTTP transport: start the Symfony dev server
symfony server:start
# STDIO transport: run the MCP console command
php bin/console mcp:serverSymfony MCP Bundle Examples
Client configuration
Example claude_desktop_config.json entry for connecting to a Symfony MCP Bundle application over HTTP.
{
"mcpServers": {
"symfony-app": {
"type": "http",
"url": "http://localhost:8000/_mcp"
}
}
}Prompts to try
Example prompts for interacting with a Symfony application exposed via the MCP Bundle.
- "Call the get-order-status tool for order ID 12345"
- "List all available MCP tools exposed by this Symfony application"
- "Use the time-management tool to get the current server time in UTC"
- "Invoke the product-search tool to find all products in the 'electronics' category"
- "Get the prompt template named 'customer-support' and use it to draft a reply"Troubleshooting Symfony MCP Bundle
MCP client cannot reach the /_mcp endpoint
Verify the Symfony dev server is running ('symfony server:start') and the MCP route is registered in config/routes.yaml. Check that the URL in your client config matches the actual server port. Run 'php bin/console debug:router | grep mcp' to confirm the route is registered.
Tools defined with #[McpTool] do not appear in the client
Ensure the service class is registered in Symfony's dependency injection container (services.yaml or via autoconfiguration). Run 'php bin/console debug:container --tag mcp.tool' to list all discovered MCP tools. If the service is not listed, check that autoconfigure is enabled in services.yaml.
Bundle installation fails or causes Composer conflicts
The bundle requires Symfony 7.x and PHP 8.2+. Run 'composer diagnose' to check for platform constraint issues. Because the bundle is experimental, use a specific version constraint in composer.json rather than a wildcard to avoid unexpected breaks on updates.
Frequently Asked Questions about Symfony MCP Bundle
What is Symfony MCP Bundle?
Symfony MCP Bundle is a Model Context Protocol (MCP) server that symfony integration bundle for model context protocol (via official mcp/sdk) It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Symfony MCP Bundle?
Follow the installation instructions on the Symfony MCP Bundle GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Symfony MCP Bundle?
Symfony MCP Bundle works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Symfony MCP Bundle free to use?
Yes, Symfony MCP Bundle is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Symfony MCP Bundle Alternatives — Similar Developer Tools Servers
Looking for alternatives to Symfony MCP Bundle? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Symfony MCP Bundle in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Symfony MCP Bundle?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.