Skip to content

Commit 91aca04

Browse files
committed
Allow users to not specify server info
1 parent 2ea4e0b commit 91aca04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Server/Builder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,9 @@ public function build(): Server
481481
logging: false,
482482
completions: true,
483483
);
484-
$configuration = new Configuration($this->serverInfo, $capabilities, $this->paginationLimit, $this->instructions, $this->protocolVersion);
484+
485+
$serverInfo = $this->serverInfo ?? new Implementation('MCP SDK for PHP');
486+
$configuration = new Configuration($serverInfo, $capabilities, $this->paginationLimit, $this->instructions, $this->protocolVersion);
485487
$referenceHandler = new ReferenceHandler($container);
486488

487489
$requestHandlers = array_merge($this->requestHandlers, [

0 commit comments

Comments
 (0)