Switch to set* and add* on ServerBuilder instead of with* (#71)

This commit is contained in:
Christopher Hertel 2025-09-15 08:30:41 +02:00 • committed by GitHub
commit b1e54f1f86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,12 +20,12 @@ use Mcp\Server\Transports\HttpServerTransport;
logger()->info('Starting MCP Combined Registration (HTTP) Server...');
Server::make()
->withServerInfo('Combined HTTP Server', '1.0.0')
->withLogger(logger())
->withContainer(container())
->withDiscovery(__DIR__, ['.'])
->withTool([ManualHandlers::class, 'manualGreeter'])
->withResource(
->setServerInfo('Combined HTTP Server', '1.0.0')
->setLogger(logger())
->setContainer(container())
->setDiscovery(__DIR__, ['.'])
->addTool([ManualHandlers::class, 'manualGreeter'])
->addResource(
[ManualHandlers::class, 'getPriorityConfigManual'],
'config://priority',
'priority_config_manual',