Remove explicit server initialization calls from Java MCP server examples
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
59c48bb8c1
commit
5625d93f2a
1 changed files with 0 additions and 8 deletions
|
|
@ -31,9 +31,6 @@ McpSyncServer syncServer = McpServer.sync(transport)
|
|||
.build())
|
||||
.build();
|
||||
|
||||
// Initialize the server
|
||||
syncServer.initialize();
|
||||
|
||||
// Register tools, resources, and prompts
|
||||
syncServer.addTool(syncToolRegistration);
|
||||
syncServer.addResource(syncResourceRegistration);
|
||||
|
|
@ -64,11 +61,6 @@ McpAsyncServer asyncServer = McpServer.async(transport)
|
|||
.build())
|
||||
.build();
|
||||
|
||||
// Initialize the server
|
||||
asyncServer.initialize()
|
||||
.doOnSuccess(v -> logger.info("Server initialized"))
|
||||
.subscribe();
|
||||
|
||||
// Register tools, resources, and prompts
|
||||
asyncServer.addTool(asyncToolRegistration)
|
||||
.doOnSuccess(v -> logger.info("Tool registered"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue