Skip to main content
Glama
codex-browser-workspaces
by Mingll22

Codex Browser Workspaces

Thread-owned Chrome tab groups for Codex CLI, built on the official Chrome DevTools MCP.

中文说明 · Install · Architecture · Related projects

Run several Codex conversations against one already-running, logged-in Chrome profile. Each real Codex thread owns a colored tab group and can operate only on its registered pages through this MCP adapter. Your ordinary tabs remain outside its ownership.

Status: early release, version 0.3.1. The validated environment is Codex CLI in WSL + Windows Chrome. This is an independent community project, not an official OpenAI or Google product.

Why this exists

Page routing identifies a target; it does not establish which conversation owns it. This adapter binds each call to Codex's thread metadata, checks page ownership, and coordinates the shared window without asking the model to choose a thread ID.

  • One stable colored tab group per thread, in the shared Chrome window.

  • Named page slots such as main and reference, with explicit close and retention controls.

  • Page, element, console and network references scoped to their owning page and connection generation.

  • Ordinary tabs are never adopted because their URL or group title happens to match.

  • Owned popups inherit ownership through their actual CDP opener; dragging a tab out revokes access.

  • Screenshots restore the previous active tab and do not bring Chrome to the foreground. Minimized-window capture is supported in the validated Windows environment.

  • Cancellation, deadlines and disconnects return explicit errors; browser mutations are not automatically replayed.

  • Browser/extension session changes require explicit workspace reset rather than guessing old ownership.

This is tool-level page ownership, not account isolation or an OS security sandbox. Cookies, storage and website accounts remain shared. Programs with independent shell/CDP access are outside this boundary.

Related MCP server: chrome-devtools-mcp-mux

Requirements and setup

  • Node.js 22.22 or newer in WSL; Windows Chrome with a reachable loopback CDP endpoint.

  • A Codex CLI build that supplies matching _meta.threadId and _meta["x-codex-turn-metadata"].thread_id values on tool calls. Other MCP clients are not currently supported.

  • Ability to load a local Manifest V3 extension into that Chrome profile.

git clone https://github.com/Mingll22/codex-browser-workspaces.git
cd codex-browser-workspaces
npm ci --ignore-scripts
npm run build
npm test

Continue with installation to install the broker, pair the Windows extension and register the MCP entry. Building alone does not connect the browser or edit your Codex configuration. No npm registry publication or Chrome Web Store listing is currently provided.

The adapter attaches to a debugging-enabled Chrome profile; it cannot enable remote debugging on an arbitrary running personal profile. Follow the official connection guide when preparing Chrome, then reuse that profile's login state. Do not expose the debugging port to your network.

Tools

Workspace tools: open_page, list_pages, close_page, set_page_retention, reset_workspace.

An allowlist forwards 19 official page tools for navigation, snapshots, screenshots, interaction, dialogs, JavaScript, console, network and file selection. Each requires an owned pageId. Browser-wide or unreviewed tools are not exposed. See the upstream contract.

Validation and limitations

The current public source has 68 automated checks, including portable archive installation. The original runtime baseline had 67 checks plus real Windows Chrome screenshot/cancellation evidence. Latest-version multi-client browser tests use explicitly synthetic fixture identities; they are not presented as multiple real Codex sessions. See acceptance for the exact evidence and untested boundaries.

The official backend is pinned to chrome-devtools-mcp@1.11.0. Build-time patches are checked against exact source anchors and fail on an unreviewed version. Native Linux/macOS Chrome, generic MCP clients and recovery of arbitrary page state after a complete browser restart are not claimed.

Development

npm run build
npm test
node scripts/prepare-dev.mjs

The last command generates an isolated development configuration under ignored .artifacts/. See CONTRIBUTING.md before running browser integration tests: worktrees do not isolate Chrome, ports or real user sessions.

License

Apache-2.0. See LICENSE and NOTICE. The official backend and other dependencies retain their own license notices. Upstream modifications are documented in docs/UPSTREAM.md.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A multi-agent orchestrator that enables multiple AI agents to share a single Chrome browser instance with tab isolation and shared state. It preserves local browser data like cookies and logins while allowing concurrent agent sessions through the official Playwright MCP.
    10
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables multiple MCP clients to share a single Chrome instance while maintaining isolated tab sessions for each client. It acts as a multiplexer between clients and the chrome-devtools-mcp server, preventing tab conflicts across different sessions like Claude Code windows.
    29
    8 npm
    5
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Browser automation for OpenCode using Chrome DevTools and a shared Chromium profile, with per-session tab isolation so concurrent agents don't interfere. Enables browser agents to use existing signed-in sessions with shared cookies and extensions.
    607 npm
    1
    MIT