Skip to content

chore: remove no-op protocol-version negotiation in MCP initialize#735

Open
toddfil wants to merge 1 commit into
tempoxyz:mainfrom
toddfil:chore/mcp-simplify-protocol-version
Open

chore: remove no-op protocol-version negotiation in MCP initialize#735
toddfil wants to merge 1 commit into
tempoxyz:mainfrom
toddfil:chore/mcp-simplify-protocol-version

Conversation

@toddfil

@toddfil toddfil commented Jun 23, 2026

Copy link
Copy Markdown

Remove no-op protocol-version negotiation in MCP initialize

Problem

initializeResult read the client's requested protocolVersion from params, computed a protocolVersion local, then returned it through a ternary whose two branches are identical:

protocolVersion:
  protocolVersion === PROTOCOL_VERSION
    ? PROTOCOL_VERSION
    : PROTOCOL_VERSION,

The result is always PROTOCOL_VERSION regardless of input, so the entire requested / protocolVersion computation is dead code. It reads as if the server negotiates the version, but it never does.

Fix

This server supports exactly one protocol version, so always advertising PROTOCOL_VERSION is the correct MCP reply — whether or not the client asked for that same version. The behavior is unchanged; the dead computation and the now-unused params argument are removed, and the call site is updated.

function initializeResult() {
  // This server supports exactly one protocol version, so the response always
  // advertises PROTOCOL_VERSION. Per the MCP spec this is the correct reply
  // whether or not the client requested that same version.
  return {
    protocolVersion: PROTOCOL_VERSION,
    capabilities: { tools: {} },
    serverInfo: serverInfo(),
    instructions: INITIALIZE_INSTRUCTIONS,
  };
}

The existing initialize test (index.test.ts) sends params: {} and asserts only serverInfo and instructions, so it continues to pass.

@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@toddfil is attempting to deploy a commit to the Tempo Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant