Symfony MCP Framework

v1.0.0Developer Toolsstable

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

agentic-aiagentsaimcpmcp-prompts
Share:
30
Stars
0
Downloads
0
Weekly
0/5

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

Build MCP servers
Enterprise architecture
Real-time communication
klapaudius

Maintainer

LicenseMIT
Languagephp
Versionv1.0.0
UpdatedMay 10, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx symfony

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-server
2

Create 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
    - sse
3

Add 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: php
4

Generate 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 MyCustomTool
5

Test 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"}'
6

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.

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.

Quick Config Preview

{ "mcpServers": { "symfony": { "command": "npx", "args": ["-y", "symfony"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides