Skip to content

Modern-era connection with no serverInfo renders an empty header (no tabs) #1772

Description

@cliffhall

Summary

Connecting to a modern-era MCP server whose server/discover response omits the (now-optional) serverInfo produces a connected session with no header tab bar at all — no Servers / Tools / Resources / Tasks tabs, just the "MCP Inspector" title. The connection itself succeeds (status connected, protocol traffic flows), but the entire top menu is missing, so the server is effectively uninspectable through the UI.

Reproduced against test-servers/configs/tasks-modern-http.json (modern Tasks showcase, port 3222): connect with Protocol Era = Modern → green "Connected", modern server/discover + tools/list in the Protocol view, but the header shows only the title and no tabs.

Root cause

The connected header (and its whole tab bar) is gated on initializeResult:

  • InspectorView.tsx:1274{connectionStatus === "connected" && initializeResult ? <ViewHeader connected .../> : <ViewHeader connected={false} .../>}
  • App.tsx:1485initializeResult is undefined when !serverInfo.
  • serverInfo is populated from client.getServerVersion() (core/mcp/inspectorClient.ts:4108), which the SDK fills from the discover result via serverInfoFromDiscover().
  • Per the modern spec, DiscoverResult.serverInfo is optional (SHOULD, not MUST). A conforming modern server may omit it, leaving serverInfo — and therefore initializeResultundefined, which collapses the header to the disconnected title branch.

Legacy servers always return serverInfo in their initialize response, so they never hit this — the bug is modern-era-specific.

Confirmed via live DOM: data-status="connected" while the header renders the title branch, i.e. initializeResult is falsy despite being connected.

Proposed fix

Don't hide the entire connected header when serverInfo is absent — modern makes it optional. Gate the connected header on connectionStatus === "connected" (build initializeResult when connected, tolerating a missing serverInfo with a sensible fallback, e.g. the server's catalog name). This mirrors the existing deliberate choice to not gate on protocolVersion (see the App.tsx:1480 comment: "a missing/edge-case version must not hide those").

Not related to #1762

Surfaced while manually testing PR #1771 (the AGENTS.md .withProps() styling sweep), but it is a pre-existing connection/modern-era bug — git diff origin/v2/main shows #1771 changes none of the implicated code (header gate, initializeResult, serverInfo, ViewHeader conditionals, InspectorView.tsx, or core/ connection layer).

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions