fix(mcp): disable ListChanged to prevent premature stdio notifications
The go-sdk fires notifications/tools/list_changed and notifications/resources/list_changed with 10ms delay after AddTool/AddResource. Since all registration happens before server.Run(), these hit stdout before the client sends initialize, breaking the MCP handshake. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
429f1c2b6c
commit
f8f137b465
1 changed files with 2 additions and 1 deletions
|
|
@ -74,7 +74,8 @@ func New(opts Options) (*Service, error) {
|
|||
|
||||
server := mcp.NewServer(impl, &mcp.ServerOptions{
|
||||
Capabilities: &mcp.ServerCapabilities{
|
||||
Tools: &mcp.ToolCapabilities{ListChanged: true},
|
||||
Resources: &mcp.ResourceCapabilities{ListChanged: false},
|
||||
Tools: &mcp.ToolCapabilities{ListChanged: false},
|
||||
Logging: &mcp.LoggingCapabilities{},
|
||||
Experimental: channelCapability(),
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue