From f8f137b4652ec8d002db4ad0b60cfbfb1de06932 Mon Sep 17 00:00:00 2001 From: Snider Date: Wed, 8 Apr 2026 20:50:46 +0100 Subject: [PATCH] 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 --- pkg/mcp/mcp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/mcp/mcp.go b/pkg/mcp/mcp.go index 3cc05b0..3523cb6 100644 --- a/pkg/mcp/mcp.go +++ b/pkg/mcp/mcp.go @@ -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(), },