Clients

MCP server

@browserview/mcp is a Model Context Protocol server that gives any MCP-capable agent — Claude, Cursor, and others — tools to create and manage BrowserView sessions.

Setup

The server runs over stdio via npx and needs only your API key:

Claude Code
claude mcp add browserview \  -e BROWSERVIEW_API_KEY=bv_live_... \  -- npx -y @browserview/mcp
Claude Desktop / Cursor (mcp config)
{  "mcpServers": {    "browserview": {      "command": "npx",      "args": ["-y", "@browserview/mcp"],      "env": { "BROWSERVIEW_API_KEY": "bv_live_..." }    }  }}

Set BROWSERVIEW_BASE_URL to point at a self-hosted orchestrator instead of sessions.browserview.io (the legacy BROWSERVIEW_API_URL name still works).

Tools

ToolWhat it does
create_sessionStart a browser session. Returns the viewer URL a human can open to watch, plus the CDP URL and token for driving it.
list_sessionsList the account's active sessions.
get_sessionFetch one session with freshly minted URLs and tokens.
destroy_sessionDestroy a session and everything in it.
mint_session_tokenMint an extra scoped token (view, control, or cdp) — for example a view-only link to share with a teammate.
get_session_replayFetch the replay of a session created with record: true — video plus action, console, network, and error event streams. Works after the session is destroyed.

The pattern

The MCP tools manage session lifecycle; the agent's own browsing stack does the driving. A typical flow: the agent calls create_session, hands the viewer_url to its human, connects Playwright to the cdp_url, works, and calls destroy_session when finished. If the agent crashes instead, idle reaping cleans the session up automatically.

Pass record: true to create_session and the whole run is captured server-side — afterwards get_session_replay returns the video and event streams, even once the session is gone. See Session replay for the manifest format.