neu-browser-mcp
Officialneu-browser-mcp
An MCP server that gives an agent a remote browser: create one, get a CDP URL to drive it, hand the user a live view, pick up the files it downloaded, and shut it down.
Why
Lifecycle only. It does not click, type or navigate. The agent drives the browser over CDP with agent-browser, Playwright, or any CDP client.
Same tools on any backend. Prompts and skills stay the same when the browser moves between
nap,kernel,browser-useandhyperbrowser. Each backend is a small adapter behind one interface.Credentials stay on the server. The backend token never enters the agent's context.
Human handoff and downloads. Backends with a live view give you a URL to watch or take over the browser. Files the browser downloads can be listed, linked, or read.
Related MCP server: mcp-browser-kit
Tools
Tool | What it does |
| Starts a browser and returns |
| Lists active browsers with the same connection info, so an agent can reconnect to one it lost track of. |
| Stops a browser. |
| Lists files in the browser's sandbox, the backend's download directory by default. |
| Returns a download URL for one file, or |
| Returns the contents of one file: text as text, anything else as a base64 resource. The server reads with the backend's credentials. Reads are capped at 256 KB. |
Backends
A capability a backend lacks shows up as null or as a missing tool. See Adding a backend.
Backend | Timeout (default / max) | Live view | CDP over HTTP | Metadata | List files | Download link | Read file |
1 hour / 24 hours | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | |
1 hour idle / 72 hours idle | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | |
1 hour / 4 hours | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | |
1 hour / 12 hours | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
More backends are planned.
Run it as a server
Requires Node.js 22 or newer. The server speaks MCP over stdio.
{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["-y", "neu-browser-mcp"],
"env": {
"NEU_BROWSER_BACKEND": "nap",
"NAP_BROWSER_URL": "https://browser.example.com",
"NAP_BROWSER_TOKEN": "<token>"
}
}
}
}NEU_BROWSER_BACKEND picks the backend and defaults to nap. Each backend then reads its own variables.
nap
Variable | Meaning |
| Base URL of the browser service API. Required. |
| Bearer token for the browser service. Required. |
| Base URL used in file download links. Set it when |
kernel
Variable | Meaning |
| Kernel API key. Required. |
browser-use
Variable | Meaning |
| Browser Use Cloud API key. Required. |
hyperbrowser
Variable | Meaning |
| Hyperbrowser API key. Required. |
Use it as a library
To add the tools to an MCP server you already run, register them on it:
import { McpServer } from '@modelcontextprotocol/server'
import { createNapProvider, registerBrowserTools } from 'neu-browser-mcp'
const server = new McpServer({ name: 'my-server', version: '1.0.0' })
registerBrowserTools(server, {
provider: createNapProvider({
baseUrl: 'http://browser.internal:3005',
publicBaseUrl: 'https://browser.example.com',
token: async () => lookUpTokenFor(tenant),
}),
scope: { tenant_id: tenant.id },
})The server can come from either generation of the MCP TypeScript SDK: @modelcontextprotocol/server (v2) or @modelcontextprotocol/sdk (v1).
scope is a set of tags that confines the tools to one tenant. Every browser they create carries the tags, list_browsers returns only browsers that carry them, and a tool given a browser ID refuses it unless that browser carries them. This is what keeps tenants apart when they share the backend's credentials. token can be a string or an async function; a function is called once, on first use.
To pick the backend from the environment, the way the standalone server does, use providerFromEnv(process.env).
Adding a backend
A backend implements BrowserProvider from src/types.ts:
interface BrowserProvider {
readonly name: string
readonly capabilities: ProviderCapabilities
createSession(opts?: CreateSessionOptions): Promise<BrowserSession>
listSessions(opts?: ListSessionsOptions): Promise<BrowserSession[]>
releaseSession(id: string): Promise<void>
readonly files?: BrowserFiles // list, and optionally downloadUrl and read
}
interface ProviderCapabilities {
timeout: { kind: 'absolute' | 'idle'; defaultSeconds: number; maxSeconds: number }
liveView: boolean
httpCdp: boolean
metadata: boolean
}The required part is the session lifecycle plus a CDP WebSocket URL. Everything else is declared, and the tools adapt:
Declaration | Effect when absent |
| Always present. Sets the default and maximum the agent is told about, and whether the timeout counts from creation ( |
|
|
|
|
|
|
| No file tools are registered. |
|
|
|
|
src/providers/nap.ts is the reference implementation.
Development
npm install
npx tsc --noEmit
npx biome check .
npm testSee CONTRIBUTING.md.
License
Available Tools
5 toolscreate_browserCreate BrowserA
Create a headless Chrome browser instance. Returns browser_id plus connection info:
connect_command: a ready-to-run agent-browser command — just run it as-is to start driving the browser.
connect_url: a wss:// URL for "agent-browser connect". Do NOT pass cdp_url here.
cdp_url: an https:// URL for Playwright only, via browser.connectOverCDP(cdp_url).
live_view_url: share with the user so they can watch. The browser auto-expires after the timeout (default 1 hour, max 24 hours).
Inputs: timeout_seconds.
delete_browserDelete BrowserB
Stop and destroy a browser instance.
Inputs: browser_id (required).
get_browser_file_urlGet Browser File Download URLA
Get a download URL for a file inside the browser sandbox.
Returns the URL alongside the current file state — use ready: true to confirm the file exists. The URL embeds an auth token and can be handed to the user (e.g. as a clickable link in chat) or fetched directly.
Files are only available while the browser is alive.
Inputs: path (required), browser_id (required).
list_browser_filesList Browser FilesA
List files inside the browser sandbox.
Defaults to /tmp/downloads — point downloads there first, via CDP Browser.setDownloadBehavior with downloadPath: "/tmp/downloads".
Use after a download completes to discover what was saved. The browser sandbox is ephemeral, so files only exist while the browser is alive.
There can be a brief delay between CDP downloadProgress reporting "completed" and the file being readable; if a file looks truncated, retry after a moment.
Inputs: browser_id (required), path, pattern.
list_browsersList BrowsersA
List all active browser instances. Each item includes the same connection info as create_browser (cdp_url, live_view_url, plus connect_url/connect_command for running browsers), so this doubles as a reconnect path — pick a running browser and run its connect_command.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct role: lifecycle (create/list/delete), file listing, and file URL retrieval. The only mild overlap is that list_browsers re-exposes connection info also returned by create_browser, but that is a documented reconnect convenience rather than a genuine ambiguity.
All five tools follow a consistent snake_case verb_noun pattern (create_browser, list_browsers, delete_browser, list_browser_files, get_browser_file_url). The singular/plural browser vs. browsers variation is trivial and matches the resource semantics.
Five tools is well-scoped for a browser-sandbox lifecycle server: create, list, delete, and two file-access tools. Nothing feels padded or missing to the point of being thin.
Full lifecycle (create/list/delete) plus sandbox file discovery and download URL generation are covered, which is appropriate given that actual browsing is delegated to the external agent-browser/CDP connection. Minor gaps exist, such as no way to extend a browser's timeout or delete sandbox files.
Maintenance
Related MCP Connectors
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Search, read, and act on the web. The Stophy MCP server for agents.
Turn any public website into an MCP server for agents to search, read and navigate.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA Playwright-based MCP server that exposes a live browser as a traceable, inspectable, debuggable and controllable execution environment for AI agents.5,213 npm57-
- AlicenseNot gradedqualityBmaintenanceAn MCP Server that enables AI assistants to interact with your local browsers.55MIT
- AlicenseBqualityBmaintenanceA headless, agent-controllable real browser as an MCP server that enables AI agents to navigate, click, fill, eval JavaScript, and take screenshots on localhost and allowed hosts, with no GUI required.277MIT
- FlicenseNot gradedqualityCmaintenanceMCP server that wraps agent-browser to let LLMs control a real browser, providing tools for navigation, interaction, reading page content, accessibility snapshots, screenshots, and session management.1-