fix: downgrade declared protocolVersion from 2025-06-18 to 2025-03-26 #4

Closed
opened 2026-05-09 05:43:51 +00:00 by mathias · 0 comments
Owner

Problem

The MCP server declares protocolVersion: "2025-06-18" in its initialize response (internal/mcp/server.go). Claude Code CLI rejects this and fails to load any tools — none of the mcp__gitea__* tools appear in the session.

Root cause

Claude Code CLI supports up to 2025-03-26. When the server responds with a newer unknown version, the client drops the connection silently.

The server already uses the 2025-03-26 Streamable HTTP transport (stateful POST + Mcp-Session-Id header), so 2025-03-26 is the correct version to declare.

Fix

In internal/mcp/server.go, change:

const ProtocolVersion = "2025-06-18"

to:

const ProtocolVersion = "2025-03-26"

Rebuild and redeploy. The 24 tools are fully functional once the handshake succeeds — confirmed via manual curl test.

Verification

After deploy, the mcp__gitea__* tools should appear in Claude Code as deferred tools on session start.

## Problem The MCP server declares `protocolVersion: "2025-06-18"` in its `initialize` response (`internal/mcp/server.go`). Claude Code CLI rejects this and fails to load any tools — none of the `mcp__gitea__*` tools appear in the session. ## Root cause Claude Code CLI supports up to `2025-03-26`. When the server responds with a newer unknown version, the client drops the connection silently. The server already uses the `2025-03-26` Streamable HTTP transport (stateful POST + `Mcp-Session-Id` header), so `2025-03-26` is the correct version to declare. ## Fix In `internal/mcp/server.go`, change: ```go const ProtocolVersion = "2025-06-18" ``` to: ```go const ProtocolVersion = "2025-03-26" ``` Rebuild and redeploy. The 24 tools are fully functional once the handshake succeeds — confirmed via manual curl test. ## Verification After deploy, the `mcp__gitea__*` tools should appear in Claude Code as deferred tools on session start.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/gitea-mcp#4