Skip to content

Commit 5625d93

Browse files
committed
Remove explicit server initialization calls from Java MCP server examples
Signed-off-by: Christian Tzolov <[email protected]>
1 parent 59c48bb commit 5625d93

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

sdk/java/mcp-server.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ McpSyncServer syncServer = McpServer.sync(transport)
3131
.build())
3232
.build();
3333

34-
// Initialize the server
35-
syncServer.initialize();
36-
3734
// Register tools, resources, and prompts
3835
syncServer.addTool(syncToolRegistration);
3936
syncServer.addResource(syncResourceRegistration);
@@ -64,11 +61,6 @@ McpAsyncServer asyncServer = McpServer.async(transport)
6461
.build())
6562
.build();
6663

67-
// Initialize the server
68-
asyncServer.initialize()
69-
.doOnSuccess(v -> logger.info("Server initialized"))
70-
.subscribe();
71-
7264
// Register tools, resources, and prompts
7365
asyncServer.addTool(asyncToolRegistration)
7466
.doOnSuccess(v -> logger.info("Tool registered"))

0 commit comments

Comments
 (0)