fix(mcp): downgrade protocolVersion to 2025-03-26
Some checks failed
CD / Lint / Test / Vet (push) Failing after 3s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped

Claude Code CLI rejects 2025-06-18 and silently drops the connection;
2025-03-26 is the highest version it supports. Fixes #4.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mathias Bergqvist
2026-05-09 07:53:18 +02:00
parent c4d3735272
commit f63605bdd0
2 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ import (
) )
const ( const (
ProtocolVersion = "2025-06-18" ProtocolVersion = "2025-03-26"
maxRequestBodyBytes = 1 << 20 // 1 MiB maxRequestBodyBytes = 1 << 20 // 1 MiB
) )

View File

@@ -52,7 +52,7 @@ func TestInitialize(t *testing.T) {
var resp map[string]any var resp map[string]any
require.NoError(t, json.Unmarshal(rr.Body.Bytes(), &resp)) require.NoError(t, json.Unmarshal(rr.Body.Bytes(), &resp))
result := resp["result"].(map[string]any) result := resp["result"].(map[string]any)
assert.Equal(t, "2025-06-18", result["protocolVersion"]) assert.Equal(t, mcp.ProtocolVersion, result["protocolVersion"])
si := result["serverInfo"].(map[string]any) si := result["serverInfo"].(map[string]any)
assert.Equal(t, "gitea-mcp", si["name"]) assert.Equal(t, "gitea-mcp", si["name"])
} }