Skip to content

[RFC] MCP bridge to the live browser design for human–agent editing #9304

Open

Description

@Nhandos

Problem

When evaluating the self-hosted browser app alongside solidcraft-cli mcp --headless, the human and agent work in separate engine sessions. Agent edits do not appear in the browser’s open design; exchanging saved files interrupts the edit–inspect loop.

The goal is for an external MCP client, such as OpenCode, to inspect and edit the exact document the user sees in a browser tab, while the user retains the normal SolidCraft UI.

Existing foundations

I searched related issues and open PRs, including drafts, and did not find an implementation of this specific MCP-to-live-tab connection. Please point me to any existing or unpublished work.

Proposed first scope

An optional, explicitly paired browser connection that reuses the existing MCP tool catalog and control handlers:

  1. The user enables a connection and selects a specific tab/document. Connection status and revocation remain visible.
  2. MCP commands execute against that document’s existing session and command queue—not a second headless engine. Human and agent edits use its existing undo history.
  3. Document identity is checked so tab switches, reloads or reconnects cannot silently redirect queued edits.
  4. A missing or disconnected tab produces an explicit error; there is no automatic headless fallback.
  5. Requests and replies have bounded sizes, queues and timeouts. Ambiguous execution outcomes are reported without blindly retrying mutations.
  6. Browser save/export and screenshot capabilities are documented and tested separately from native filesystem behavior.

Application changes would be Rust, with browser wiring compiled to WASM. The transport and host location should be agreed with maintainers before implementation. An authenticated same-origin WebSocket relay is one candidate, not a settled design.

Security and boundaries

Pairing must be explicit and revocable. The bridge must validate origins and authorization, preserve file restrictions, and never grant arbitrary host filesystem or shell access. It must not expose the native desktop control port publicly or put long-lived credentials in URLs.

No new command registry, kernel changes, required cloud account, storage-format changes, multiplayer, or shared server storage are proposed for the first slice. Browser suspension and tab closure remain explicit limitations.

Acceptance and validation

  • An MCP client creates a simple parametric solid in the paired browser document; the user sees it.
  • A human parameter edit is returned by the agent’s next inspection; an agent edit appears in the same timeline.
  • Undo/redo and document switching are verified.
  • Wrong pairing, unauthorized origins, oversized requests, queue limits, reloads and disconnects are tested.
  • Existing native/headless MCP behavior is preserved.
  • Real browser evidence, targeted regression tests, WASM checks and cargo xtask ci results accompany an implementation PR.

Questions for maintainers

  1. Is this a welcome, bounded follow-up to Expose a JavaScript command API for the browser app #1713 and the browser-runtime design?
  2. Should the relay live in the CLI, an optional self-hosted service, or existing craft-libs infrastructure?
  3. What pairing, permission and document-binding behavior should the first slice require?
  4. Is coordination needed with Web app: embed mode for host apps (viewport only, editable through window.solidcraft) #8517, Live Co-Editing: several people in one design at the same time (research) #5184 / Live co-editing: several people work in one design at the same time (#5184) #7547, or another contributor?

This is a proposal only. The native MCP workflow was tested on macOS with release 0.27.1; a browser bridge has not been implemented or validated. I would like to agree on scope before claiming implementation with a draft PR.

Changes a default: no — the bridge would be opt-in; existing browser and MCP modes would remain unchanged.

Activity

  1. added
    needs-triage
    in progress
    on Oct 30, 2026
  2. github-actions commented on Oct 30, 2026

    @github-actions
    Contributor

    Claimed by @Nhandos through #9325. The claim lapses after 14 days without pushes.

  3. github-actions commented on Nov 13, 2026

    @github-actions
    Contributor

    Nothing has been pushed for 14 days, so this one is free again. Anyone can /claim it.

  4. removed
    in progress
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions