From 3a14503c83513c8066a7734fbad2572d73478502 Mon Sep 17 00:00:00 2001 From: Joachim Rosskopf Date: Mon, 13 Jul 2026 19:56:13 +0200 Subject: [PATCH] fix: Emit MCP logging capability as empty object, not null Strict MCP clients (Claude Code) validate the initialize response schema and reject 'logging': null, failing the whole connection. Emit {} instead, matching the spec and the wvalue::object() idiom used elsewhere. Closes #100 --- src/mcp_route_handlers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcp_route_handlers.cpp b/src/mcp_route_handlers.cpp index 77b351f..a88b07f 100644 --- a/src/mcp_route_handlers.cpp +++ b/src/mcp_route_handlers.cpp @@ -759,7 +759,7 @@ MCPResponse MCPRouteHandlers::handleInitializeRequest(const MCPRequest& request, result["capabilities"]["resources"]["listChanged"] = true; result["capabilities"]["prompts"] = crow::json::wvalue(); result["capabilities"]["prompts"]["listChanged"] = true; - result["capabilities"]["logging"] = crow::json::wvalue(); // NEW in 2025-11-25 + result["capabilities"]["logging"] = crow::json::wvalue::object(); // NEW in 2025-11-25; must serialize as {} — null fails strict client schema validation (#100) result["serverInfo"]["name"] = server_info_.name; result["serverInfo"]["version"] = server_info_.version;