Draft
Conversation
Adds specification/v2_ux_interfaces_plan.md, the implementation plan for the component interface refactor scoped in v2_ux_interfaces.md. Uses the v1.5/main branch of this repo as the source of truth for Inspector-owned wrapper types (MCPServerConfig, ConnectionStatus, MessageEntry, FetchRequestEntry, StderrLogEntry, ServerState, the *Invocation cache types) and pins @modelcontextprotocol/sdk at the latest 1.x line (^1.29.0). Includes a name-mapping table that translates the Inspector* placeholders in v2_ux_interfaces.md to v1.5's actual type names. Plan organizes the work into phases: foundations (SDK + wrapper types), elements, group+screen feature clusters (folded together to keep the build green at every commit), views, and a cleanup sweep. Calls out the discovered ServerCard auto-connect useEffect violation to fix in-place during the server cluster, and flags that Task is already exported by the SDK 1.x so the InspectorTask wrapper framing in v2_ux_interfaces.md is stale and needs a follow-up correction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The interfaces doc was produced by parallel research subagents that were instructed to prefix uncertain hook names with (likely) rather than fail to fill in a section. The result is 52 instances of "likely" in v2_ux_interfaces.md, almost all attached to hook names that were never cross-checked against v1.5/main. Several are actively wrong: - useTools / usePrompts / useResources do not exist in v1.5; the actual hooks are useManagedTools / useManagedPrompts / useManagedResources. - useTasks does not exist; v1.5 has useManagedRequestorTasks (and Task itself is a raw SDK 1.x type, not an Inspector wrapper). - useMcpClient does not exist; v1.5 has useInspectorClient. - useLogs conflates three v1.5 hooks: useMessageLog, useStderrLog, useFetchRequestLog. - useHistory does not exist; v1.5 uses useMessageLog as the history. - useElicitation / useSampling / useRoots do not exist as discrete React hooks in v1.5; those flows are handled inside InspectorClient via SDK request handlers. - useServerCapabilities is not a separate hook; capabilities live on useInspectorClient's result. - Appendix A's "v1.5 bundles primitive logic in App.tsx" claim is wrong about v1.5 in this repo; that's true of upstream modelcontextprotocol/inspector v1.x mainline, not v1.5/main here, which has the full core/react/* split. Adds Phase 0.3 to walk every (likely) instance and either resolve it against v1.5 source or strike it, with a confirmed rename table and explicit definition-of-done (zero "likely" matches in v2_ux_interfaces.md after the pass). Adds Risk #11 capturing the underlying rule: hedging words next to type/hook/file claims must be vetted before a planning doc ships. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the implementation plan for the work scoped in
specification/v2_ux_interfaces.md: refactoring every dumb component underclients/web/src/components/so its props consume MCP SDK schema types or Inspector-owned wrapper types, instead of the ad hoc shapes invented during the visual-design phase.This PR is plan-only. No component code changes. Subsequent PRs against this branch will execute the plan in phases.
Source-of-truth decisions
The plan establishes two authoritative sources:
MCP schema types —
@modelcontextprotocol/sdkpinned at the latest 1.x line (^1.29.0).Inspector-owned wrapper types — the
v1.5/mainbranch of this repo, specificallycore/mcp/types.ts(416 lines, fully defined). v1.5 already has every wrapper this refactor needs:MCPServerConfigdiscriminated union (StdioServerConfig/SseServerConfig/StreamableHttpServerConfig)ServerType,MCPConfig,ConnectionStatusMessageEntry(history wrapper,timestamp: Date)FetchRequestEntry/FetchRequestEntryBase/FetchRequestCategoryStderrLogEntry,ServerStateResourceReadInvocation,ResourceTemplateReadInvocation,PromptGetInvocation,ToolCallInvocationPlus the JSON Schema typing helpers at
clients/web/src/utils/{jsonUtils,schemaUtils}.tsandclients/web/src/lib/types/customHeaders.ts.The plan includes a name-mapping table that translates every
Inspector*placeholder inv2_ux_interfaces.mdto its v1.5 actual name. Notably:InspectorServerConfig→MCPServerConfigInspectorHistoryEntry→MessageEntryInspectorTransportType→ServerTypeInspectorTask/InspectorTaskStatus→ dropped.Taskis exported by the MCP SDK 1.x at@modelcontextprotocol/sdk/types.js, and v1.5'suseManagedRequestorTasksalready returnsTask[]raw. The interfaces doc's claim that "MCP 2025-11-25 doesn't have a task primitive" is stale and needs a follow-up correction.Phase structure
core/mcp/types.tsin v2 by copying the types-only subset from v1.5, copy the JSON Schema helpers, inventory local re-declarations to delete.npm run buildgreen at every commit and avoid adapter shims.ConnectedView,UnconnectedView).JsonSchema,LogLevel,TaskStatus,RootEntry,PromptItem,ResourceItem, etc., and confirm zero matches.In-place fixes flagged for execution
ServerCardauto-connectuseEffect— violates the dumb-component principle. Fixed in the same commit as the server cluster refactor, not deferred.UnconnectedView'sHomeLayoutProps— renamed toUnconnectedViewPropsfor consistency with the component name.Out of scope
core/hook layer (useInspectorClient,useManaged*,useMessageLog, etc.). v1.5 has the full surface (core/react/*+core/mcp/state/managed*State.ts); porting it wholesale to v2 is a separate effort that consumes the contracts produced here as input.App.tsxto the v2 core hook layer (currently a 42-line theme-toggle shell).Test plan
npm run format && npm run lint && npm run buildclean inclients/web, withcore/mcp/types.tspopulated and@modelcontextprotocol/sdk@^1.29.0resolving.ResourceListItemannotations).🤖 Generated with Claude Code