Codex browser MCP

Give Codex a browser that stays open.

Local MCP endpoint

http://127.0.0.1:47812/mcp

Start Hronaut once and leave it running. Codex can restart or switch repositories without owning the browser. The endpoint listens on loopback; it is not a hosted browser.

Why Hronaut

The browser belongs to you, not the task.

Codex supports Streamable HTTP MCP servers. Hronaut fits when the browser should be a separate app with durable local state, human controls and isolated workspaces. See how task, MCP transport, and browser lifetimes differ →

  • Restart Codex, keep the session. Hronaut owns Chromium and its profile. Closing a Codex task does not intentionally close the browser or discard its local state.
  • See, pause and take over. Watch each action, pause MCP before a sensitive step, sign in yourself, then let Codex continue in the same session.
  • Keep project accounts separate. Each named workspace has its own cookies and site storage. Use a clean workspace per task; reopening one needs its private resume key.
  • Browser data stays on this device. Hronaut is a local Electron/Chromium app with a loopback endpoint. It is not a hosted browser, proxy, CAPTCHA service or multi-browser CI runner.

Need something else? For repeatable, throwaway tests, use a browser owned by your test runner. To inspect the tabs already open in your everyday Chrome, use a tool built to attach to that profile. Compare browser tools →

Step 1 · Connect

Connect Codex.

Start Hronaut, then install the plugin. Use codex mcp add only where plugins are not available.

Codex CLI and ChatGPT desktop · recommended

Install the Hronaut plugin

codex plugin marketplace add hronaut/hronaut-codex-plugin
codex plugin add hronaut@hronaut

Or, after adding the marketplace, install Hronaut from /plugins in Codex CLI or from Plugins in the ChatGPT desktop app. Start a new session; /mcp shows Hronaut. Update with codex plugin marketplace upgrade hronaut.

The plugin adds Hronaut's MCP server and the Hronaut skill. Each time Codex connects, it reads the owner token from the mcp-token file in Hronaut's profile, so there is nothing to paste and the token is never written to Codex's configuration or shown to the agent. Plugin source ↗

Codex IDE extension, custom port or profile

Add Hronaut with one command

export HRONAUT_MCP_TOKEN="$(cat '/path/from-hronaut-home')"
codex mcp add hronaut --url http://127.0.0.1:47812/mcp --bearer-token-env-var HRONAUT_MCP_TOKEN

The Codex IDE extension does not load plugins, but it reads ~/.codex/config.toml, which this command writes. Copy the Codex command from Hronaut Home: it reads the owner token into HRONAUT_MCP_TOKEN and passes --bearer-token-env-var HRONAUT_MCP_TOKEN, so Codex stores bearer_token_env_var instead of the token. Use the same command if you changed Hronaut's MCP port or start Hronaut with HRONAUT_USER_DATA_DIR, XDG_CONFIG_HOME or HRONAUT_MCP_TOKEN.

The variable must be available wherever Codex runs, or the connection cannot start. Codex then uses this hronaut server in place of the plugin's, and the plugin still adds the skill. To go back to the plugin's server, run codex mcp remove hronaut. Official Codex MCP documentation ↗

Step 2 · Verify

Check that it works.

Use a clean workspace for this check, before Codex goes near a signed-in page.

  1. 1

    Codex sees Hronaut

    Inside Codex, /mcp should list Hronaut as enabled and connected. If you used codex mcp add, codex mcp list also shows the endpoint displayed on Hronaut Home.

  2. 2

    Hronaut sees Codex

    Open Hronaut Home. Codex should appear under Connections.

  3. 3

    Run a first browser task

    Ask: “Create a Hronaut workspace named first-check, open https://example.com inside it, and tell me the page title and workspace ID. Start with clean scratch storage.”

    Expected result: a visible first-check workspace opens Example Domain, and Codex reports its workspace ID.

Security

Protect your signed-in sessions.

Keep authentication on. A new Hronaut profile requires the owner token for MCP, so other processes running as your user cannot drive the browser. A profile from before Hronaut 3.5 keeps the setting it saved: if Require MCP authentication is off in Settings → MCP security, turn it on before you use valuable sign-ins. The plugin picks the token up on its own; a codex mcp add setup needs the command from Hronaut Home.

Treat web pages as untrusted. Websites can contain prompt injection, and a signed-in workspace carries the authority of every site in it. Keep sensitive work isolated and review surprising requests.

Take over for human-only steps. Use Hronaut's pause and interaction-lock controls before you enter passwords, security keys, payment details or other human-only information.

Keep going

Next steps.

Give every durable browser job its own named workspace. Then learn how to hand off a login safely or run several agents side by side.

Sources

Hronaut is an independent project and is not affiliated with or endorsed by OpenAI.