Description
Bug description
Server Instructions
always null and unable to change, server response as following:
19:52:30.866 [pool-1-thread-1] INFO i.m.client.McpAsyncClient - Server response with Protocol: 2024-11-05, Capabilities: ServerCapabilities[experimental=null, logging=LoggingCapabilities[], prompts=null, resources=null, tools=ToolCapabilities[listChanged=false]], Info: Implementation[name=stdio-server-example, version=1.0.0] and Instructions null
Environment
MCP Java sdk version: 0.9.0-SNAPSHOT
Expected behavior
Support set instructions
when init, eg:
McpSyncServer server = McpServer.sync(transport)
.serverInfo("stdio-server-example", "1.0.0")
.instructions("This is a simple MCP server example that provides two tools: xxxx.")
.tool(xxx)
.build();
Source code
It seems that Instructions
is currently fixed to null
java-sdk/mcp/src/main/java/io/modelcontextprotocol/server/McpAsyncServer.java
Lines 353 to 354 in 79ec5b5