Skip to content

Unable to set server instructions, always null #98

Closed
@codezjx

Description

@codezjx

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

return Mono.just(new McpSchema.InitializeResult(serverProtocolVersion, this.serverCapabilities,
this.serverInfo, null));

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions