Skip to content

Surface negotiated protocolVersion through useInspectorClient #1324

@cliffhall

Description

@cliffhall

Background

useInspectorClient returns status, capabilities, serverInfo, instructions — but not the protocolVersion the InspectorClient negotiated with the server. The MCP InitializeResult includes protocolVersion as a top-level field.

#1244's App.tsx builds an InitializeResult for InspectorView's connected header by hard-coding protocolVersion: "2025-06-18" since the hook doesn't expose the real value. That's a placeholder; the connected header doesn't read protocolVersion today, but as soon as anything wants to display "MCP 2025-06-18 over stdio" the hard-code becomes a bug.

Scope

  • Add protocolVersion?: string to UseInspectorClientResult in core/react/useInspectorClient.ts.
  • Track it via the existing serverInfoChange / capabilitiesChange event family, or add a dedicated protocolVersionChange event to InspectorClientEventMap if it can land independently of capabilities.
  • Update App.tsx (#1244) to read the value from the hook and drop the hard-coded "2025-06-18".

Out of scope

  • Negotiation strategy / version compatibility checks — separate concern.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2Issues and PRs for v2

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions