Skip to content

web: deep-link auto-connect (?serverUrl&transport&autoConnect) + machine-readable connection status #1576

Closed

Description

@cliffhall

Summary

URL-driven auto-connect with a machine-readable status surface, so a driver can reach a connected inspector with one navigate:

http://127.0.0.1:6274/?serverUrl=<url>&transport=http|sse&autoConnect=<token>
  • parseDeepLink() / deepLinkParseStatus() in a new clients/web/src/utils/deepLink.ts: serverUrl restricted to http(s) (rejects javascript:/data:/file:); autoConnect must equal the per-launch MCP_INSPECTOR_API_TOKEN (CSRF gate — same exposure as the existing ?MCP_INSPECTOR_API_TOKEN= param); stable deep-link server id so reloads reconnect to the same row.
  • App.tsx: ensure/connect effects — upsert the full server config (not just the URL), then connect via a fresh closure; connectErrorMessage records connection-level failures.
  • InspectorView header: data-testid="connection-status" with data-status, data-error-message, and data-deeplink="parsed|rejected|none" so drivers can waitForSelector and read failure reasons without scraping toasts.

Why

Reaching a connected inspector today takes several manual steps; automation has no deterministic signal for "connected" or "why not". This implements the v2 version of #1183 (?autoConnect query param).

Reference implementation (PR #1510)

Re-implement informed by these changes at 33fac3f:

Depends on

Wave 4 — after the Wave 2/3 lanes. The openApp/appArgs/autoOpen params are a separate follow-up issue.

Refs #1183.

Notes

  • The token gate is the security boundary: a launcher/agent that knows the token can mint links; a third-party page cannot. Keep the validation inside parseDeepLink() so a returned DeepLink is proof of validation.
  • Document the deep-link scheme and the data-* contract in clients/web/README.md.
  • Coverage gate ≥90 on all four dimensions.

Part of the PR #1510 decomposition (see tracking issue).

Activity

  1. self-assigned this
    on Jul 1, 2026
  2. added a commit that references this issue on Jul 12, 2026
  3. cliffhall commented on Jul 12, 2026

    @cliffhall
    MemberAuthor

    Implemented and reviewed to LGTM on its branch, then consolidated into the Wave 4 rollup #1676 (tracking #1675). Closing as done; the board card moves to Done. The change ships to v2/main when the rollup merges.

  4. added this to the v2.0.0 milestone on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions