Symfony MCP Framework
A Symfony package designed for building secure servers based on the Model Context Protocol, utilizing Server-Sent Events (SSE) and/or StreamableHTTP for real-time communication. It offers a scalable tool system tailored for enterprise-grade applicati
What is Symfony MCP Framework?
Symfony MCP Framework is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to symfony package designed for building secure servers based on the model context protocol, utilizing server-sent events (sse) and/or streamablehttp for real-time communication. it offers a scalable too...
A Symfony package designed for building secure servers based on the Model Context Protocol, utilizing Server-Sent Events (SSE) and/or StreamableHTTP for real-time communication. It offers a scalable tool system tailored for enterprise-grade applicati
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Symfony package designed for building secure servers based
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx symfonyConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Symfony MCP Framework
The Symfony MCP Server package (klapaudius/symfony-mcp-server) is a Composer library for building enterprise-grade MCP servers inside existing Symfony applications, supporting both Server-Sent Events (SSE) and StreamableHTTP transports for real-time communication with AI clients. It provides a scalable, annotation-free tool registration system, Symfony Console commands for generating and testing tools locally, and first-class support for sampling — allowing agents to consult AI models mid-execution. Teams with existing Symfony backends can expose business logic as MCP tools without leaving the PHP ecosystem.
Prerequisites
- PHP 8.2 or later
- Symfony 6.4 or later (Symfony 7.x also supported)
- Composer package manager
- An MCP-compatible client such as Claude Desktop or any SSE/StreamableHTTP capable client
Install the package via Composer
Require the package into your existing Symfony project. Symfony Flex will handle bundle registration automatically.
composer require klapaudius/symfony-mcp-serverCreate the bundle configuration file
Create the configuration file at config/packages/klp_mcp_server.yaml to enable the server and configure transport, endpoints, and ping settings.
# config/packages/klp_mcp_server.yaml
klp_mcp_server:
enabled: true
server:
name: 'My Symfony MCP Server'
version: '1.0.0'
default_path: 'mcp'
ping:
enabled: true
interval: 30
server_providers:
- streamable_http
- sseAdd routes to your routing configuration
Import the bundle's route definitions into your config/routes.yaml so the MCP endpoints are registered.
# config/routes.yaml
klp_mcp_server:
resource: '@KlpMcpServerBundle/Resources/config/routes.php'
type: phpGenerate and implement a tool
Use the Symfony console command to scaffold a new MCP tool class, then implement its logic.
php bin/console make:mcp-tool MyCustomToolTest the tool locally
Use the built-in test command to exercise your tool with JSON input before connecting a real MCP client.
php bin/console mcp:test-tool MyCustomTool --input='{"param":"value"}'Connect your MCP client to the server endpoint
Start your Symfony application and point your MCP client at the exposed endpoint. The StreamableHTTP endpoint is at /mcp and the SSE endpoint is at /mcp/sse by default.
{
"mcpServers": {
"symfony": {
"type": "http",
"url": "http://your-symfony-app.local/mcp"
}
}
}Symfony MCP Framework Examples
Client configuration
Claude Desktop JSON configuration connecting to a Symfony MCP server via StreamableHTTP.
{
"mcpServers": {
"symfony-app": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}Prompts to try
Example prompts for testing tools and resources exposed by a Symfony MCP server.
- "List all available tools on the symfony-app server"
- "Call the GetUserProfile tool with userId=42"
- "Read the resource at config://app-settings and summarize the configuration"
- "Use the GenerateReport prompt to create a monthly sales summary"
- "Execute the SendNotification tool with recipient='[email protected]' and message='Deployment complete'"Troubleshooting Symfony MCP Framework
Routes are not found — 404 on /mcp or /mcp/sse
Ensure the route import is present in config/routes.yaml using the correct resource path '@KlpMcpServerBundle/Resources/config/routes.php' with type: php. Clear the Symfony cache with 'php bin/console cache:clear' after adding routes.
SSE connection drops immediately or client cannot maintain the stream
Check that your web server (Nginx/Apache) is not buffering the response. For Nginx, add 'proxy_buffering off;' and 'X-Accel-Buffering: no' headers. For development, the Symfony built-in server ('symfony server:start') handles SSE streaming correctly without additional configuration.
Custom tool is not visible to MCP clients
Tools must be registered in the klp_mcp_server.yaml configuration under the tools key, or registered programmatically via the service container. Run 'php bin/console mcp:test-tool YourToolName' to verify the tool is discoverable before testing with a remote client.
Frequently Asked Questions about Symfony MCP Framework
What is Symfony MCP Framework?
Symfony MCP Framework is a Model Context Protocol (MCP) server that symfony package designed for building secure servers based on the model context protocol, utilizing server-sent events (sse) and/or streamablehttp for real-time communication. it offers a scalable tool system tailored for enterprise-grade applicati It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Symfony MCP Framework?
Follow the installation instructions on the Symfony MCP Framework GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Symfony MCP Framework?
Symfony MCP Framework works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Symfony MCP Framework free to use?
Yes, Symfony MCP Framework is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Symfony MCP Framework Alternatives — Similar Developer Tools Servers
Looking for alternatives to Symfony MCP Framework? 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 Framework 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 Framework?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.