ARCHITECTURE

A small, local chain of custody.

Components

ComponentResponsibility
Chrome extensionOwns Chrome permissions and performs tab, DOM, screenshot, and DevTools Protocol operations.
Loopback bridgeAuthenticates commands with the shared token and relays them between HTTP clients and the extension WebSocket.
MCP serverExposes a small standard stdio interface: status and generic browser commands.
MCP clientProvides the agent and decides which tool calls to make. This is the trust boundary for prompts and model behavior.

Command lifecycle

  1. An MCP client calls browser_command over stdio.
  2. The MCP server posts the action to 127.0.0.1:8765, authenticated by the bridge token.
  3. The local bridge forwards the command through its existing extension WebSocket.
  4. The Chrome extension uses Chrome APIs, content-script execution, or the DevTools Protocol as needed.
  5. The result returns through the same path as structured JSON.

Interaction strategy

The agent should first use a viewport-only snapshot. The extension walks the standard DOM, open shadow roots, and same-origin frames, returning accessible names and a temporary agentId. The next action can use that ID rather than guessing a CSS selector or physical location.

For inputs controlled by frontend frameworks, type uses the native value setter and dispatches input events. For rich text, insert_text, press, and clear send trusted DevTools Protocol input, which many editors require.

Boundaries and limitations

For implementation detail, see the extension source and the MCP server.