Symfony MCP Bundle

v1.0.0Developer Toolsstable

Symfony integration bundle for Model Context Protocol (via official mcp/sdk)

aillmsymfonysymfony-ai
Share:
43
Stars
0
Downloads
0
Weekly
0/5

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

Symfony AI integration
PHP framework MCP support
symfony

Maintainer

LicenseMIT
Languagephp
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-bundle

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 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)
1

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

Create 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: 3600
3

Add MCP routes

Register the MCP bundle routes by adding a resource entry to config/routes.yaml.

# config/routes.yaml
mcp:
    resource: .
    type: mcp
4

Define 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";
    }
}
5

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

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

Symfony 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.

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": { "mcp-bundle": { "command": "npx", "args": ["-y", "mcp-bundle"] } } }

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

Read the full setup guide →

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.

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