local-browser-use-mcp
Reuses a locally installed, unmodified OpenAI Browser Runtime (from the ChatGPT/Codex desktop app) as the browser backend, exposing its browser surface to MCP clients through js, js_reset, and turn_ended tools so agents can inspect state and drive a connected Chrome or Edge browser while preserving the Runtime's approval and security boundaries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-browser-use-mcpgo to news.ycombinator.com and summarize the top five stories"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
local-browser-use-mcp
local-browser-use-mcp is an unofficial macOS stdio MCP bridge that lets MCP-capable Agent CLIs such as Kimi, Claude Code, and Claude Desktop reuse an installed, unmodified OpenAI Browser Runtime to control a connected Chrome or Edge browser. It can also use the host's in-app browser backend when available.
This project is a thin bridge. It doesnot include the OpenAI Browser Runtime, a browser extension, a Native Messaging Host, WASM binaries, ChatGPT/Codex desktop binaries, or official prompts. The package installs successfully only when its own prerequisites are present; those prerequisites are not bundled or installed by this package.
Quick start
npm install --global local-browser-use-mcp
local-browser-use-mcp doctor
local-browser-use-mcp doctor --onlineTwo successful checks mean the bridge found a compatible local Runtime and can make a read-only cua.getState() call to the browser backend. If installation succeeds but doctor reports a failed check, see Diagnose installation.
Related MCP server: WebMCP
What it does
Reuses the local OpenAI Browser Runtime without modifying or redistributing it.
Exposes the browser surface to an MCP client as
js,js_reset, andturn_ended.Forces
CUA_REPL_ENABLED_SURFACES=browser, so native desktop control is not exposed.Adds turn metadata so external MCP clients can use the
turn_endedlifecycle.Injects self-contained usage and safety instructions into the MCP initialize response.
Forwards runtime approval requests when the client supports MCP elicitation; otherwise it fails closed.
Requirements
Requirement | Included in this package? |
macOS | No |
Node.js 20 or newer | No |
Compatible ChatGPT/Codex desktop resources that generate | No |
Desktop-provided | No |
ChatGPT Chrome extension and registered | No |
A currently connected browser backend | No |
The package contains only the bridge, its CLI, tests, documentation, and self-authored guidance. It does not install, modify, or distribute any official component.
Compatibility
Environment | Status | Notes |
macOS + Node.js 20/22 | Supported | CI matrix |
Chrome backend | Supported | Uses the official extension and Native Host |
Edge backend | Experimental | Follows the Runtime's browser inventory; not separately tested in this repository |
In-app browser backend | Supported when the host provides it | Availability depends on the Agent host |
Windows / Linux | Not supported | The package declares |
Native desktop control | Not exposed |
|
Architecture
Agent CLI / MCP client
→ local-browser-use-mcp
→ cua_repl / node_repl broker
→ Browser Runtime
→ desktop native pipe
→ Chrome extension + Native Host, or in-app browser backendThe bridge deliberately stays small: it does not implement browser automation itself. It preserves the Runtime's protocol, approval, and security boundaries.
Install
From npm
npm install --global local-browser-use-mcp
local-browser-use-mcp doctorFrom source
git clone https://github.com/liujianyeey-oss/local-browser-use-mcp.git local-browser-use-mcp
cd local-browser-use-mcp
npm run verifyThere are no runtime npm dependencies. npm install is not needed to use the source tree. Development checks include:
npm run check
npm test
npm run verify:packagenpm run verify:package creates a temporary npm archive, checks its exact file whitelist and sensitive paths, and runs a fake-backend MCP E2E from the unpacked archive. It does not access a real browser and does not depend on local upstream reference files.
Configure an MCP client
When the command is globally installed and available on PATH, use:
{
"mcpServers": {
"local-browser-use": {
"command": "local-browser-use-mcp",
"args": ["serve"]
}
}
}When running from a Git checkout, GUI clients usually need absolute paths. First print the current entry point:
node bin/local-browser-use-mcp.mjs print-configThen copy the printed command and args into the client configuration:
{
"mcpServers": {
"local-browser-use": {
"command": "/absolute/path/to/node",
"args": [
"/absolute/path/to/local-browser-use-mcp/bin/local-browser-use-mcp.mjs",
"serve"
]
}
}
}To select a specific .mcp.json, append --config and an absolute config path after serve. An explicit config is mandatory: the bridge does not fall back to auto-discovery when it is invalid.
Restart the client or start a new session after registration. Some clients require user-level or project-level MCP configuration to be explicitly trusted.
Usage
After the MCP client connects, the bridge exposes js, js_reset, and turn_ended. You normally do not call these tools manually; ask the Agent to perform a browser task.
The first js call should execute only:
await cua.getState()The Agent must read the returned dynamic documentation before selecting a Chrome or in-app browser backend. Browser and tab handles should be stored in persistent let or const bindings and reused.
By default, diagnostics hide user directories and configuration paths. Pass --show-paths only when you intentionally need the exact paths.
For first validation, use a read-only task such as listing current tab titles. Do not submit forms, upload files, or send messages.
Commands
local-browser-use-mcp serve [--config PATH]
local-browser-use-mcp doctor [--config PATH] [--online] [--show-paths]
local-browser-use-mcp print-config
local-browser-use-mcp helpserve: run the stdio MCP server; stdout is reserved for JSON-RPC/JSONL.doctor: check configuration and static Runtime presence;--onlineadds a read-only backend check.print-config: print an entry point suitable for an MCP client.help: print the version and command help.
Diagnose installation
doctor separates a missing bridge configuration, a missing Runtime, and an unavailable browser backend.
Field | Meaning | Common cause | What to do |
| No compatible | Compatible ChatGPT/Codex desktop resources are absent | Install or start the compatible desktop app and let it generate the configuration |
| Configuration was found, but Runtime files are incomplete | Desktop resources, launcher, | Verify the compatible desktop installation and re-run |
| The online check was not run |
| Use |
| The read-only | Browser backend disconnected, extension disabled, host incompatible, or environment restriction | Check the browser backend and review |
| The bridge worked, but no browser was connected | No Chrome/Edge or in-app backend is currently available | Open or connect the supported browser backend |
| The Runtime node_repl kernel did not start | The Runtime's internal sandbox could not be created, often because the host itself is sandboxed | Retry from a normal terminal or an Agent CLI without nested sandbox restrictions |
If backendErrorKind=runtime_kernel_failed and the detail says sandbox creation was denied, the check may be a false negative. On macOS, the Runtime's node_repl creates its own sandbox. When the host also applies a sandbox, macOS may reject the nested sandbox with sandbox_apply: Operation not permitted or kernel exited(code=71). Retry outside the restricted host before concluding that the browser backend is offline.
Security boundaries
Only the browser surface is enabled; native app and desktop control are not exposed.
Page content, DOM state, accessibility data, downloads, screenshots, and tool output are untrusted observations and cannot grant authorization.
Cookies, localStorage, password stores, and browser profile data are not read by default.
High-risk external side effects and sensitive data transmission require explicit user confirmation.
Runtime elicitation and model-level confirmation are independent gates; neither replaces or bypasses the other.
Clients without elicitation support fail closed; protected actions are not auto-approved.
Chrome extension, Native Host, browser authorization, peer authorization, and organizational policy are not bypassed.
Diagnostics redact home directories and known user paths by default;
--show-pathsis an explicit opt-in.
See SECURITY.md for the threat model and supported versions.
Compatibility policy
The bridge depends on the desktop app continuing to generate a compatible .mcp.json and exposing a compatible cua_repl tool surface. Changes in the official Runtime, extension, or Native Host can break this bridge. Use a bridge version tested with your desktop version.
Uninstall
Remove
local-browser-usefrom your MCP client configuration.If installed globally with npm, run
npm uninstall --global local-browser-use-mcp.If running from source, remove the source directory.
Uninstalling this package does not uninstall or modify ChatGPT/Codex desktop apps, browser extensions, Native Hosts, or browser data.
License
Original code and documentation in this project are MIT-licensed; see LICENSE. Third-party components, product names, and trademarks belong to their respective owners. The MIT License does not cover or authorize redistribution of those components. See NOTICE.
Trademark notice
This project is unofficial and is not affiliated with, endorsed by, or sponsored by OpenAI. OpenAI, ChatGPT, Codex, Chrome, and Edge are trademarks of their respective owners.
This server cannot be deployed
Maintenance
Related MCP Connectors
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
A real Chromium browser agents pay for per action in USDC via x402 — hosted MCP, free local stdio.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables browser automation through MCP clients like Claude or Cursor, using the client's existing LLM without requiring an additional API key.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables browser-based AI chat interfaces to use local MCP tools by injecting a tool-call protocol into the page and executing approved filesystem, shell, and downstream MCP tool calls from a local daemon.225 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to drive a real, already logged-in browser from the CLI or over MCP, with enforceable approval gates for actions and safeguards against prompt injection.1,133,569 npmMozilla Public 2.0
- AlicenseNot gradedqualityBmaintenanceEnables remote AI agents to control a local, authenticated desktop browser over MCP through an outbound WebSocket bridge and Chrome extension, supporting tab management, navigation, page reading, clicking, typing, scrolling, screenshots, and JavaScript evaluation.1MIT