Skip to content

Expose negotiated protocol version in v2#1335

Open
shusingh wants to merge 1 commit into
modelcontextprotocol:v2/mainfrom
shusingh:expose-protocol-version-v2
Open

Expose negotiated protocol version in v2#1335
shusingh wants to merge 1 commit into
modelcontextprotocol:v2/mainfrom
shusingh:expose-protocol-version-v2

Conversation

@shusingh
Copy link
Copy Markdown

Summary

  • expose the negotiated MCP protocolVersion through InspectorClient and useInspectorClient
  • update the v2 app header data to use the negotiated version instead of a hard-coded value
  • add hook and integration coverage for protocol version propagation

Fixes #1324.

Validation

  • node node_modules/vitest/vitest.mjs run --project=unit src/test/core/react/useInspectorClient.test.tsx
  • node node_modules/vitest/vitest.mjs run --project=integration src/test/integration/mcp/inspectorClient.test.ts -t "captures the negotiated protocol version"
  • node node_modules/typescript/bin/tsc -b
  • node node_modules/vite/bin/vite.js build
  • node node_modules/prettier/bin/prettier.cjs --check <touched files>
  • node node_modules/eslint/bin/eslint.js .
  • git diff --check

@shusingh shusingh force-pushed the expose-protocol-version-v2 branch from 6b457ed to 2b323f3 Compare June 6, 2026 13:38
@shusingh
Copy link
Copy Markdown
Author

shusingh commented Jun 6, 2026

Updated this branch against the latest v2/main and resolved the merge conflict in the Inspector client state fields. Verified with npm run build, the focused useInspectorClient unit test, and the focused MCP inspector client integration test.

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