From 8ec30b939cc4c516bbfca0e8cc5ed6fdcdb61564 Mon Sep 17 00:00:00 2001 From: olaservo Date: Sat, 1 Aug 2026 16:08:34 -0700 Subject: [PATCH] Stop advertising the deprecated logging capability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit go-sdk defaults ServerCapabilities to {"logging":{}} when ServerOptions is nil — "for historical reasons", as its own doc comment puts it. This server does no logging, and logging is deprecated as of 2026-07-28 (SEP-2577), so an example for that revision should not be advertising it. Passing an empty Capabilities suppresses the default. The tools capability is still inferred from the registered tools, so server/discover now reports {"tools":{"listChanged":true}} rather than logging alongside it. Co-Authored-By: Claude Opus 5 --- weather-server-go/main.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/weather-server-go/main.go b/weather-server-go/main.go index ade4f5b..caecbd8 100644 --- a/weather-server-go/main.go +++ b/weather-server-go/main.go @@ -260,11 +260,18 @@ func alertsOutputSchema() *jsonschema.Schema { } func main() { - // Create MCP server + // Create MCP server. + // + // Passing an empty Capabilities suppresses the SDK's historical default of + // advertising {"logging":{}} — this server does no logging, and the logging + // feature is deprecated as of 2026-07-28 (SEP-2577). The tools capability is + // still inferred from the tools registered below. server := mcp.NewServer(&mcp.Implementation{ Name: "weather", Version: "1.0.0", - }, nil) + }, &mcp.ServerOptions{ + Capabilities: &mcp.ServerCapabilities{}, + }) // Add get_forecast tool mcp.AddTool(server, &mcp.Tool{