Repository navigation
Description
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
- Merged PR Expose a JavaScript command API for the browser app #1713 exposes
window.solidcraft.request,execute,commandsandinspectthrough the browser app’s existing control queue. docs/web-runtime.mdexplicitly mentions an optional local stdio MCP ↔ tab relay.crates/mcp/src/backend.rsprovides a backend abstraction behind the existing MCP tools.- Web app: embed mode for host apps (viewport only, editable through window.solidcraft) #8517 discusses editable embedding through the browser API.
- 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 cover broader live collaboration. This proposal does not attempt multiplayer or distributed document synchronization.
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:
- The user enables a connection and selects a specific tab/document. Connection status and revocation remain visible.
- 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.
- Document identity is checked so tab switches, reloads or reconnects cannot silently redirect queued edits.
- A missing or disconnected tab produces an explicit error; there is no automatic headless fallback.
- Requests and replies have bounded sizes, queues and timeouts. Ambiguous execution outcomes are reported without blindly retrying mutations.
- 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 ciresults accompany an implementation PR.
Questions for maintainers
- Is this a welcome, bounded follow-up to Expose a JavaScript command API for the browser app #1713 and the browser-runtime design?
- Should the relay live in the CLI, an optional self-hosted service, or existing craft-libs infrastructure?
- What pairing, permission and document-binding behavior should the first slice require?
- 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
github-actions commentedon Oct 30, 2026
Claimed by @Nhandos through #9325. The claim lapses after 14 days without pushes.
github-actions commentedon Nov 13, 2026
Nothing has been pushed for 14 days, so this one is free again. Anyone can
/claimit.