Codex

Register Scalebrowser with the OpenAI Codex CLI through its TOML configuration.

Codex keeps its MCP servers in TOML rather than JSON, one table per server. Which transport it uses follows from which keys are present: a url means HTTP, a command means stdio.

Before you start

Everything below assumes a daemon that is already running and a token to reach it with.

Windows desktop app

The app starts the daemon for you. The token is the contents of %LOCALAPPDATA%\Scalebrowser\token, and the address it is listening on is the native_addr field of %LOCALAPPDATA%\Scalebrowser\runtime.json. That is usually 127.0.0.1:8787, but the app moves up a port when something else already holds it.

Self-hosted daemon

scalebrowser-daemon --generate-token prints a token and stores it under <data_dir>/token. The address is whatever bind_addr says, which is 127.0.0.1:8787 unless you changed it. See Install & run.

Add the server

~/.codex/config.toml applies everywhere; .codex/config.toml in a project applies there.

~/.codex/config.tomltoml
[mcp_servers.scalebrowser]
url = "http://127.0.0.1:8787/v1/mcp"
bearer_token_env_var = "SCALEBROWSER_TOKEN"
startup_timeout_sec = 20
tool_timeout_sec = 120

bearer_token_env_var names an environment variable rather than carrying the token, and Codex sends its value as Authorization: Bearer …. Export it before you start Codex.

A tool call can take longer than a default timeout allows. wait_for waits for a page to settle and press_and_hold holds a key for about ten seconds, so a per-tool ceiling below roughly 120 seconds will cut off calls that were going to succeed.

What the agent can do now

Ask it to open a page and it will lease a profile, bind a tab and start reading. The tool set, the page map and the failure shapes are on MCP server; what the agent is allowed to do is decided by the daemon, not by the client, so see tool profiles.