Skip to content

Conversation

@claytonsheets7
Copy link

@claytonsheets7 claytonsheets7 commented Dec 17, 2025

Improves Inspector V1 connection error UX when an MCP server returns a JSON-RPC/MCP error during initialize (notably -32602
Unsupported protocol version). Instead of showing generic “proxy session token” guidance, the Sidebar now surfaces the actual MCP
error code and message, with a small expandable “Error details” section and a spec link for version negotiation.

This makes protocol version failures immediately visible and avoids misleading guidance when the error is not proxy-related.

Note: Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should
focus on bug fixes and MCP spec compliance. See CONTRIBUTING.md (../CONTRIBUTING.md) for more details.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Refactoring (no functional changes)
  • Test updates
  • Build/CI improvements

Changes Made

  • Sidebar now detects MCP/JSON-RPC errors and renders MCP error : in the connection status area.
  • Adds an expandable error details block (data-testid="connection-error-details") and, for -32602, a neutral note with a link to
    the spec’s version negotiation section. Supported versions are shown when present in the error message.
  • Proxy token hint now only appears for connectionType === "proxy" and is fully suppressed when an MCP error is present.

Related Issues

  • #962
  • #959

Testing

  • Tested in UI mode
  • Tested in CLI mode
  • Tested with STDIO transport
  • Tested with SSE transport
  • Tested with Streamable HTTP transport
  • Added/updated automated tests
  • Manual testing performed

Automated

  • npm test --workspace=client
  • npx playwright test -c client/playwright.config.ts client/e2e/protocol-version-error.spec.ts

Repro validation (confidence check)

  • On origin/main, the fixed-behavior e2e assertions fail because MCP error details are not surfaced.
  • When assertions are temporarily inverted to check the legacy behavior (proxy token hint visible, no error details), the test
    passes on origin/main.
  • On this PR branch, the fixed-behavior e2e test passes, confirming the change resolves the issue.

Checklist

  • Code follows the style guidelines (ran npm run prettier-fix)
  • Self-review completed
  • Code is commented where necessary
  • Documentation updated (README, comments, etc.)

Breaking Changes

None.

Additional Context

  • Formatting: npm run prettier-check passes (no changes required).
  • Note: OpenAI Codex was used to assist with drafting parts of this change. All behavior and tests were reviewed and validated locally.

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