File tree Expand file tree Collapse file tree 5 files changed +14
-16
lines changed
tests/DependencyInjection Expand file tree Collapse file tree 5 files changed +14
-16
lines changed Original file line number Diff line number Diff line change 1212 "symfony/finder" : " ^7.3|^8.0"
1313 },
1414 "minimum-stability" : " dev" ,
15- "prefer-stable" : true ,
1615 "config" : {
1716 "sort-packages" : true
1817 }
Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4- 0.2
4+ 0.1
55---
66
7- * [ BC BREAK ] Migration from ` symfony/mcp-sdk ` to official ` mcp/sdk `
8- * [ BC BREAK ] Tool definition changed from interfaces to PHP attributes ` #[McpTool] `
9- * [ BC BREAK ] Automatic tool discovery via attributes instead of manual registration
10- * [ BC BREAK ] Server creation now uses ` Server::make() ` builder pattern
7+ * Migration from ` symfony/mcp-sdk ` to official ` mcp/sdk `
8+ * Tool definition changed from interfaces to PHP attributes ` #[McpTool] `
9+ * Automatic tool discovery via attributes instead of manual registration
10+ * Server creation now uses ` Server::make() ` builder pattern
1111 * Updated STDIO transport command to ` mcp:server `
1212 * Simplified service configuration using native SDK patterns
1313 * Enhanced auto-discovery scanning in ` src/ ` directory
14-
15- 0.1
16- ---
17-
1814 * Add Symfony bundle bridging MCP-SDK with Symfony applications
1915 * Add server mode exposing Symfony tools to MCP clients:
2016 - STDIO transport via ` php bin/console mcp:server ` command
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Component \DependencyInjection \Loader \Configurator ;
1313
14+ use Mcp \Server ;
15+ use Mcp \Server \ServerBuilder ;
1416use Mcp \Server \Transport \Sse \Store \CachePoolStore ;
1517
1618return static function (ContainerConfigurator $ container ): void {
1921 ->args ([
2022 service ('cache.app ' ),
2123 ])
22- ->set ('mcp.server.builder ' , ' Mcp \\ Server \\ ServerBuilder ' )
23- ->factory ([' Mcp \\ Server ' , 'make ' ])
24+ ->set ('mcp.server.builder ' , ServerBuilder::class )
25+ ->factory ([Server::class , 'make ' ])
2426 ->call ('setServerInfo ' , [param ('mcp.app ' ), param ('mcp.version ' )])
2527 ->call ('setLogger ' , [service ('logger ' )])
2628 ->call ('setDiscovery ' , [param ('kernel.project_dir ' ), ['src ' ]])
2729
28- ->set ('mcp.server ' , ' Mcp \\ Server ' )
30+ ->set ('mcp.server ' , Server::class )
2931 ->factory ([service ('mcp.server.builder ' ), 'build ' ])
3032
3133 ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ Configuration
7575 name :
7676 transport : ' stdio' # Transport method to use, either 'stdio' or 'sse'
7777 stdio :
78- command : ' php /path/bin/console mcp:server' # Command to execute to start the client
78+ command : ' php /path/bin/console mcp:server' # Command to execute to start the server
7979 arguments : [] # Arguments to pass to the command
8080 sse :
8181 url : ' http://localhost:8000/sse' # URL to SSE endpoint of MCP server
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \AI \McpBundle \Tests \DependencyInjection ;
1313
14+ use Mcp \Server \ServerBuilder ;
1415use PHPUnit \Framework \Attributes \CoversClass ;
1516use PHPUnit \Framework \TestCase ;
1617use Symfony \AI \McpBundle \DependencyInjection \McpToolPass ;
@@ -23,7 +24,7 @@ public function testCreatesServiceLocatorForTaggedServices()
2324 {
2425 $ container = new ContainerBuilder ();
2526
26- $ container ->register ('mcp.server.builder ' , ' Mcp \\ Server \\ ServerBuilder ' );
27+ $ container ->register ('mcp.server.builder ' , ServerBuilder::class );
2728
2829 $ container ->register ('tool1 ' , 'MockTool1 ' )
2930 ->addTag ('mcp.tool ' );
@@ -53,7 +54,7 @@ public function testDoesNothingWhenNoToolsTagged()
5354 {
5455 $ container = new ContainerBuilder ();
5556
56- $ container ->register ('mcp.server.builder ' , ' Mcp \\ Server \\ ServerBuilder ' );
57+ $ container ->register ('mcp.server.builder ' , ServerBuilder::class );
5758 $ container ->register ('service1 ' , 'MockService ' );
5859 $ container ->register ('service2 ' , 'MockService ' );
5960
You can’t perform that action at this time.
0 commit comments