Browser MCP
Click on "Install 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., "@Browser MCPnavigate to glama.ai and take a screenshot"
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.
Browser MCP
Browser MCP is an Electron-based Model Context Protocol server that gives MCP clients control over a real local browser window. It exposes tools for starting browser sessions, reading page context, clicking, typing, dragging, scrolling, taking screenshots, inspecting console logs, and reviewing network requests.
The package is published on NPM as @cypherpotato/browser-mcp.
Contents
Related MCP server: Tabrix
How it works
Browser MCP has two runtime layers:
A Node entrypoint named
browser-mcp-electron.An Electron browser host that opens and controls real browser windows.
By default, MCP clients should start the package with --mcp. That command starts or reuses a local HTTP sentinel, then proxies MCP messages over stdin/stdout for the client.
flowchart LR
Client["MCP client"] --> Stdio["browser-mcp-electron --mcp"]
Stdio --> Sentinel["Local HTTP sentinel"]
Sentinel --> Electron["Electron browser host"]
Electron --> Page["Live browser session"]The sentinel stores its current local endpoint in the operating system temp directory under browser-mcp-electron-sessions/sentinel.json. The server only listens on 127.0.0.1.
Requirements
Node.js 18 or newer.
npm or another Node package manager.
A desktop session capable of running Electron.
Linux only: the usual Electron runtime libraries for your distribution.
Installation
Install globally if your MCP client will call the binary directly:
npm install -g @cypherpotato/browser-mcpOr run it without a global install:
npx @cypherpotato/browser-mcp --helpTo verify the binary:
browser-mcp-electron --helpMCP client configuration
Use the stdio bridge mode for normal MCP client integration:
{
"mcpServers": {
"browser": {
"command": "browser-mcp-electron",
"args": ["--mcp"]
}
}
}With npx:
{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["-y", "@cypherpotato/browser-mcp", "--mcp"]
}
}
}Optional startup URL and profile directory:
{
"mcpServers": {
"browser": {
"command": "browser-mcp-electron",
"args": [
"--mcp",
"--url",
"https://example.com",
"--data-dir",
"~/.browser-mcp"
]
}
}
}Running the HTTP sentinel
For normal MCP client usage, configure the client to run browser-mcp-electron --mcp. That command starts the HTTP sentinel automatically when needed and reuses a healthy sentinel when one already exists.
Run the HTTP sentinel manually only when you want to manage the browser host separately from an MCP stdio client.
Start it in the foreground:
browser-mcp-electron --mcp-http --url https://example.com --data-dir ~/.browser-mcpStart it in the background and return after it is healthy:
browser-mcp-electron --mcp-http-background --url https://example.com --data-dir ~/.browser-mcpPin the local sentinel port:
browser-mcp-electron --mcp-http-background --sentinel-port 55332When --mcp runs later, it reuses a healthy sentinel when one exists. If no healthy sentinel exists, it starts one automatically.
CLI reference
browser-mcp-electron [--mcp] [--url <url>] [--data-dir <path>]
browser-mcp-electron --mcp-http [--url <url>] [--data-dir <path>]
browser-mcp-electron --mcp-http-background [--url <url>] [--data-dir <path>]
browser-mcp-electron --mcp-stdio [--url <url>] [--data-dir <path>]Option | Description |
| Starts or reuses the local HTTP sentinel and proxies MCP over stdin/stdout. Recommended for MCP clients. |
| Starts or reuses only the local HTTP MCP sentinel and keeps the process alive. |
| Starts or reuses the local HTTP MCP sentinel, then returns after it is healthy. |
| Starts the legacy MCP server directly over stdin/stdout. |
| Initial browser URL. Defaults to |
| Browser profile/session directory. Defaults to |
| Port for the HTTP sentinel. Defaults to |
| Prints the CLI help. |
Tools
browser_toggle_session
Starts or stops a real Electron browser session.
Start a session:
{
"action": "start",
"start_url": "https://example.com"
}Stop a session:
{
"action": "stop",
"session_id": 1
}browser_get_context
Lists active Browser MCP sessions with process ID, session ID, title, sanitized URL, and state.
Session states:
State | Meaning |
| Ready for actions. |
| Loading or running an action. |
| A JavaScript dialog is pending. Resolve it with |
browser_run_actions
Runs an async JavaScript function body in the live page. The function receives a browser helper object.
Inspect the current page:
return browser.snapshot();Navigate:
return browser.navigate("https://example.com");Click and type:
const input = document.querySelector("input[name=email]");
const rect = input.getBoundingClientRect();
await browser.leftClick(rect.left + 8, rect.top + rect.height / 2);
await browser.type("user@example.com");
return input.value;Capture a screenshot:
return await browser.screenshot();Review network activity:
const logs = await browser.networkLogs({ filterMethod: "POST", filterPath: "/api/" });
return await browser.inspectNetworkRequest(logs.requests[0].id);Available helpers:
Helper | Description |
| Schedules navigation after the script returns. |
| Dispatches a left click at viewport coordinates. |
| Dispatches a right click at viewport coordinates. |
| Moves the pointer over a viewport coordinate. |
| Drags between viewport coordinates. |
| Scrolls at a viewport coordinate. |
| Types into the focused input, textarea, or contenteditable element. |
| Waits inside the page action. |
| Returns visible text, element hints, console issue counts, and viewport coordinates. |
| Returns an MCP image. |
| Returns recent console logs, warnings, and errors. |
| Returns compact recent network requests. |
| Returns detailed request/response information for a network request. |
| Accepts a pending alert/confirm/prompt. |
| Dismisses a pending alert/confirm/prompt. |
Environment variables
Variable | Description | Default |
| Browser profile/session directory. |
|
| Initial browser URL. |
|
| HTTP sentinel port. Use |
|
| Debug log path used by the launcher and Electron host. | OS temp file |
| Internal RPC port for detached Electron host mode. | unset |
| Internal RPC token for detached Electron host mode. | unset |
Development
Install dependencies:
npm installRun the app:
npm startRun the recommended MCP mode from the local checkout:
npm run mcpCheck JavaScript syntax:
npm run checkRun tests:
npm testThe test suite starts a local HTTP test page and a Browser MCP HTTP sentinel, then validates the public MCP tools and browser actions.
Troubleshooting
The MCP client cannot find browser-mcp-electron
Use the npx configuration or provide the absolute path to the binary.
Windows:
where.exe browser-mcp-electronLinux/macOS:
command -v browser-mcp-electronThe sentinel starts, but the MCP client opens a new one
Make sure both commands use the same user account and, if you pinned a port, the same --sentinel-port value. The sentinel registry is stored in the OS temp directory and is scoped to the current machine/user environment.
Electron does not start on Linux
Install the Electron runtime libraries required by your distribution and start the sentinel from a graphical user session. For systemd, prefer a user service instead of a system service because Browser MCP needs access to the user's desktop session.
A page action times out
Pass a larger timeout_ms to browser_run_actions:
{
"code": "await browser.sleep(15000); return browser.snapshot();",
"timeout_ms": 20000
}Action timeouts are clamped between 100 ms and 5 minutes.
Multiple sessions are active
Pass the session_id returned by browser_toggle_session to browser_run_actions. When more than one session exists, Browser MCP requires explicit session selection.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CypherPotato/browser-use-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server