Short answer: You can use Browser Use with Codex in three different ways: connect Codex to Browser Use’s hosted HTTP MCP server, run Browser Use’s local stdio MCP server, or install Browser Use’s Codex-oriented CLI/skill and let it connect to Chrome, a cloud browser, or any CDP endpoint. The first two are MCP integrations; the CLI/skill route is a separate workflow that Browser Use explicitly documents for Codex.
Browser Use lists the hosted endpoint as https://api.browser-use.com/mcp. However, its public integration reference shows authentication examples for Claude Desktop, Cursor, and Windsurf—not a Codex-specific configuration block. OpenAI documents Codex’s general MCP configuration, but you should verify the current Codex method for adding custom headers before copying a Browser Use key into a config file.
Choose the Browser Use route that matches your job
| Route | Where the browser runs | What Codex receives | Main dependency |
|---|---|---|---|
| Hosted Browser Use MCP | Browser Use cloud | Whole-task automation through MCP tools | Browser Use API key and a Codex-compatible way to send the x-browser-use-api-key header |
| Local Browser Use MCP | Your local browser environment | Direct browser-control tools over stdio | Python/uvx installation, a local browser, and the required LLM API key for the selected setup |
| Browser Use CLI/skill for Codex | Local Chrome, Browser Use cloud, or any CDP endpoint | A coding-agent workflow rather than the hosted MCP tool set | Browser Use CLI/skill installation and a selected browser connection mode |
Browser Use describes its hosted service as: “The hosted server hands a whole task to an agent on a cloud browser and returns the result.” That is different from exposing low-level actions against a browser you already control.
What MCP changes in Codex
The Model Context Protocol lets a client discover tools exposed by a server and call them with structured arguments. In this setup, Codex is the MCP client and Browser Use is the server. Codex can therefore ask Browser Use to start a session, submit a task, inspect messages, or stop a session instead of you writing Playwright or Selenium code for every action.
#1 Best Overall
OpenAI’s Docs MCP documentation confirms that Codex can connect to MCP servers from its CLI or IDE extension and that the setup is shared. It illustrates adding a remote server with codex mcp add ... --url ..., checking registrations with codex mcp list, or defining a server entry in ~/.codex/config.toml. Those instructions establish Codex’s general mechanism; they do not verify Browser Use’s endpoint, header syntax, or account requirements.
Option 1: Connect Codex to the hosted Browser Use MCP server
1. Confirm the current endpoint and credentials
Browser Use’s integration reference names https://api.browser-use.com/mcp and uses the x-browser-use-api-key HTTP header in examples for several clients. Create or retrieve the key in your Browser Use account, then check the current integration reference at Browser Use’s integrations documentation. Endpoint behavior, pricing, and authentication details can change.
2. Register the remote server in Codex
Use the Codex command pattern documented by OpenAI, replacing the placeholder with the Browser Use endpoint:
codex mcp add browser-use --url https://api.browser-use.com/mcp
codex mcp list
This registers a remote MCP URL, but it does not prove that Codex has attached Browser Use’s required header. Before attempting a task, consult the current Codex help output and configuration reference for custom HTTP headers or bearer-style credentials. Do not put a key in a URL query string unless Browser Use explicitly documents that method.
Recommended Free Tools
3. Verify tool discovery inside Codex
- Restart the Codex CLI or IDE extension if it was already running.
- Ask Codex to list the tools supplied by the
browser-useserver. - Confirm that the server can authenticate before sending a long browser task.
- Start with a harmless read-only task, such as opening a public page and reporting its title.
Browser Use names six hosted tools: run_session, get_session, send_task, stop_session, get_session_messages, and list_sessions. Exact schemas and required arguments belong to the live server, so let Codex inspect the tool definitions rather than hard-coding an outdated payload.
4. Delegate a complete task
A useful prompt gives the agent an objective, boundaries, and a completion condition:
Use the Browser Use MCP server to open https://example.com, report the page title and the first heading, and stop when both values are returned. Do not submit forms or change data.
For a longer job, ask Codex to keep the session identifier, poll messages, and stop the session when the result is saved. Treat cloud sessions as separate from your local Codex process: pass only the data the task needs and avoid placing secrets in the prompt.
Option 2: Run Browser Use’s local stdio MCP server
The local integration is launched as a stdio process rather than an HTTP service. Browser Use documents this command:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
uvx --from 'browser-use[cli]' browser-use --mcp
Configure Codex as a local MCP server using the command or TOML mechanism documented for your installed Codex version. The local process must be discoverable by Codex and able to start successfully in the same user environment. Browser Use’s example environment includes an LLM API key; local does not automatically mean model-free or free of provider requirements.
Local prerequisites
- Python tooling with
uvxavailable on the PATH. - A supported local browser and permission for the process to control it.
- The environment variables required by the Browser Use version and model you select.
- A Codex installation that supports local stdio MCP servers.
Local-session checks
- Run the
uvxcommand directly and confirm it remains running instead of exiting with an import or credential error. - Register that command in Codex’s MCP configuration.
- Ask Codex to enumerate tools before attempting navigation.
- Test on a page that does not require login, payment, or destructive actions.
Unlike the hosted route, local control uses your browser context and local machine resources. Browser Use’s integration documentation lists direct browser-control tools for this mode; the exact names and arguments can change with the package version.
Option 3: Use Browser Use’s Codex CLI/skill workflow
Browser Use’s coding-agent page explicitly lists Codex and describes installing its CLI/skill, then connecting the agent to one of three targets: local Chrome, a Browser Use cloud browser, or any CDP endpoint. This is not the same as adding https://api.browser-use.com/mcp as a remote MCP server.
Choose this route when you want the Browser Use skill’s agent-oriented instructions and browser connection modes. Choose hosted MCP when you want Codex to discover and call the six MCP tools. Choose local MCP when you need a stdio process controlling a browser in your own environment. Follow the current installation commands on Browser Use’s coding-agent page; do not infer a command from an older blog post.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Hosted versus local: practical trade-offs
| Question | Hosted MCP | Local MCP or CLI/skill |
|---|---|---|
| Where does navigation execute? | Browser Use cloud browser | Your Chrome/browser, a configured cloud browser, or a CDP endpoint |
| Control model | Hand a whole task to an agent and receive its result | Direct control of the selected browser through local tooling or the skill |
| Authentication | API key, with the documented custom header requirement | Local environment, package credentials, and any selected model/provider keys |
| Session context | Managed by the hosted service and addressed through session tools | Bound to the browser and process you connect |
| Published cost note | Browser Use lists $0.02 per browser-hour plus model tokens; it also advertises a $15 signup credit for new signups without a card. Verify both before relying on them. | No single price is established by the cited materials; your browser, model, and infrastructure costs depend on the setup. |
Browser Use also reports an 82% solve rate on 106 internal tasks and 17¢ per solved task on its hardest internal set. Those are vendor-reported internal figures, not independent benchmarks, so they should not be treated as a guarantee.
Troubleshooting Codex and Browser Use
Codex says the server is unreachable
Check the URL exactly, test network access from the machine running Codex, and verify whether your Codex build expects streamable HTTP, another MCP transport, or a separate remote-server setting. Browser Use’s documented endpoint is https://api.browser-use.com/mcp.
Authentication fails
Recheck the API key and the header name x-browser-use-api-key. The public examples are for other clients, so confirm how your current Codex version attaches custom headers. Never paste the key into a prompt or commit it to a repository.
The tool list is empty
Restart Codex after changing MCP configuration, run codex mcp list, and inspect the server’s startup or handshake error. For local MCP, run the uvx command outside Codex first to expose missing packages, browser permissions, or environment variables.
A hosted task stalls
Use the session tools to retrieve messages and status, then stop the session if it is no longer useful. Simplify the task into observable steps and provide a clear completion condition rather than asking for an open-ended browsing objective.
Local browser actions fail
Confirm that the browser is running in the mode expected by the selected Browser Use workflow, that the CDP endpoint is reachable when applicable, and that the process has permission to control the window. A local setup can still require an LLM provider key.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Security and operating practices
- Use a separate Browser Use key for automation and rotate it if it appears in logs.
- Start with read-only pages; require explicit confirmation before purchases, account changes, or form submission.
- Limit cookies, headers, and authenticated browser profiles to the minimum needed for the task.
- Tell Codex what data may be returned and where it may be written.
- Pin or periodically review package versions for local MCP, because tool names and startup requirements can change.
- Recheck endpoint, header, pricing, and signup terms immediately before publishing or deploying a setup.
Or skip the browser setup: ScreenshotNeo for page images
If your actual goal is a reliable screenshot rather than interactive browser control, ScreenshotNeo is a simpler API. It accepts cookie and consent banners before capture, removes more than 60 known consent platforms plus newsletter popups and chat widgets, and bills only clean shots. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response reports the page verdict and billing status in headers. It also offers an MCP server with take_screenshot, get_page_info, and capture_pdf for AI clients.
Every plan includes the features; the Free plan provides 1,000 shots per month without a card, and paid plans start at $5 for 3,000 shots. Use the documented API examples at ScreenshotNeo’s documentation:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallcURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Sign up free for 1,000 screenshots a month with no card.
Frequently Asked Questions
Does Browser Use publish a Codex-specific MCP configuration block?
Not in the cited integration reference. It documents the hosted endpoint and header examples for other clients, while OpenAI documents Codex’s general MCP registration process. Verify current Codex header support before deploying.
Can I use Browser Use MCP without an API key?
The hosted examples require a Browser Use API key. The local workflow also documents environment variables, including an LLM API key for the selected setup.
Is the CLI/skill workflow another name for the hosted MCP server?
No. Browser Use presents the Codex CLI/skill route separately, with connections to local Chrome, a Browser Use cloud browser, or any CDP endpoint.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

