modelcontextprotocol / modelcontextprotocol/conformance

[Tiering] Add conformance tests for Version Negotiation

Open
#102 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
127
Forks
101
Avg merge
6d 1h
Merged PRs (30d)
7

Description

Summary

The MCP lifecycle spec requires specific version negotiation behavior during initialization, but the conformance test suite only tests basic initialization without verifying version negotiation. Additionally, HTTP clients must include the MCP-Protocol-Version header on subsequent requests.

Missing Coverage

Check: version-echo

Spec: "If the server supports the requested protocol version, it MUST respond with the same version."

Server receives initialize with a supported version → server responds with the same version.

Check: version-negotiate

Spec: "Otherwise, the server MUST respond with another protocol version it supports."

Server receives initialize with an unsupported version → server responds with a different supported version (not an error).

Check: http-protocol-version-header

Spec: "If using HTTP, the client MUST include the MCP-Protocol-Version: HTTP header on all subsequent requests to the MCP server."

After initialization, client includes MCP-Protocol-Version header on all HTTP requests.

Spec Requirements

Keyword Statement
MUST The client MUST send a protocol version it supports
SHOULD This SHOULD be the latest version supported by the client
MUST If the server supports the requested protocol version, it MUST respond with the same version
MUST Otherwise, the server MUST respond with another protocol version it supports
SHOULD This SHOULD be the latest version supported by the server
SHOULD If the client does not support the version in the server's response, it SHOULD disconnect
MUST If using HTTP, the client MUST include the MCP-Protocol-Version header on all subsequent requests

Current State

lifecycle.ts only tests that initialization succeeds - no version mismatch scenarios.

Spec References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading lifecycle.ts and the linked Version Negotiation and Protocol Version Header specifications. Extend the initialization coverage for supported and unsupported requested versions, then verify that HTTP requests after initialization include MCP-Protocol-Version. Done means all three named checks are covered by conformance tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.