diff --git a/src/Config.zig b/src/Config.zig index 9194ec12..8f133b15 100644 --- a/src/Config.zig +++ b/src/Config.zig @@ -192,7 +192,7 @@ pub fn webBotAuth(self: *const Config) ?WebBotAuthConfig { pub fn mcpVersion(self: *const Config) []const u8 { return switch (self.mode) { .mcp => |opts| @tagName(opts.version), - else => @tagName(mcp.Version.latest), + else => @tagName(mcp.Version.default), }; } @@ -230,7 +230,7 @@ pub const Serve = struct { pub const Mcp = struct { common: Common = .{}, - version: mcp.Version = .latest, + version: mcp.Version = .default, }; pub const DumpFormat = enum { @@ -467,7 +467,7 @@ pub fn printUsageAndExit(self: *const Config, success: bool) void { \\ Override the reported MCP version. \\ Valid: 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25. \\ Can also be set via LIGHTPANDA_MCP_VERSION env var. - \\ Defaults to "2025-11-25". + \\ Defaults to "2024-11-05". \\ ++ common_options ++ \\ diff --git a/src/mcp/Server.zig b/src/mcp/Server.zig index 165b344d..a334bc38 100644 --- a/src/mcp/Server.zig +++ b/src/mcp/Server.zig @@ -114,7 +114,7 @@ test "MCP.Server - Integration: synchronous smoke test" { try router.processRequests(server, &in_reader); - try testing.expectJson(.{ .jsonrpc = "2.0", .id = 1, .result = .{ .protocolVersion = "2025-11-25" } }, out_alloc.writer.buffered()); + try testing.expectJson(.{ .jsonrpc = "2.0", .id = 1, .result = .{ .protocolVersion = "2024-11-05" } }, out_alloc.writer.buffered()); } test "MCP.Server - Integration: ping request returns an empty result" { diff --git a/src/mcp/protocol.zig b/src/mcp/protocol.zig index fb02ad8b..02927278 100644 --- a/src/mcp/protocol.zig +++ b/src/mcp/protocol.zig @@ -6,7 +6,7 @@ pub const Version = enum { @"2025-06-18", @"2025-11-25", - pub const latest: Version = .@"2025-11-25"; + pub const default: Version = .@"2024-11-05"; }; pub const Request = struct { diff --git a/src/mcp/router.zig b/src/mcp/router.zig index 76e1b8fe..e3b08c68 100644 --- a/src/mcp/router.zig +++ b/src/mcp/router.zig @@ -121,7 +121,7 @@ test "MCP.router - handleMessage - synchronous unit tests" { \\{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}} ); try testing.expectJson( - \\{ "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2025-11-25", "capabilities": { "tools": {} } } } + \\{ "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2024-11-05", "capabilities": { "tools": {} } } } , out_alloc.writer.buffered()); out_alloc.writer.end = 0;