Skip to content

fix[compatibility]: default missing MCP initialize version - #143

Open
Oscar-Williams wants to merge 1 commit into
golf-mcp:mainfrom
Oscar-Williams:fix/default-initialize-version
Open

Oscar-Williams wants to merge 1 commit into
golf-mcp:mainfrom
Oscar-Williams:fix/default-initialize-version

Conversation

@Oscar-Williams

Copy link
Copy Markdown

Description

Generated stdio servers reject legacy initialize requests when protocolVersion is omitted, even though the remaining handshake fields are valid. Add a low-level compatibility middleware to default the missing version before FastMCP validates the request, and cover the generated stdio boundary with a regression test.

Fixes #139

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Security enhancement
  • Performance improvement
  • Code refactoring (no functional changes)

Test plan

  • python -m pytest tests/ -q --disable-warnings (306 passed, 1 skipped)
  • ruff format --check src
  • python -m compileall -q src
  • uv build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP spec conformance: 1 requirement violated (via @hasmcp/mcp-spec-test) — spec 2025-11-25

1 participant