Browser MCP for VS Code
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Browser MCP for VS Code
Lets Claude Code, or any MCP client, use the browser built into VS Code: open pages, read them, take screenshots, click, type and run JavaScript. You watch it happen in your editor, in a browser that has your cookies and reaches your localhost.
Every VS Code window runs the extension, and they share one MCP server at
http://127.0.0.1:3799/mcp, so a single config entry reaches every window.
How it works
Claude Code ──HTTP MCP──▶ hub window (holds port 3799) ──▶ its browser
│
└─WebSocket /peer─▶ other windows ──▶ their browsersElection. Each window tries to bind the port. The one that succeeds is the hub: it serves MCP at
/mcp. The others join it at/peerand run the calls it forwards. When the hub window closes, the rest run the election again; one becomes the new hub and the others rejoin it. MCP sessions on the old hub end, and clients start new ones.Which window a call goes to, in order:
the
windowargument, by name or id (browser_windowslists them);the window whose workspace folder holds the client's roots (Claude Code's working directory), the deepest folder first;
the window you focused most recently.
Every result starts with the window used and why.
The browser is VS Code's integrated browser, launched through an
editor-browserdebug session (VS Code 1.112+, built-in JavaScript debugger) whoserequestCDPProxygives a Chrome DevTools Protocol socket. One browser tab per window;browser_openopens it when it is closed.
Related MCP server: chrome-mcp
Tools
Tool | |
| The windows, and which one is the default for you |
| Open a URL and wait for it to load |
| PNG of the visible page, or |
| The page's text, accessibility tree, or HTML |
| By CSS selector or by visible text |
| Into an input; optionally |
| A JavaScript expression's value, as JSON |
| Recent console messages and uncaught exceptions |
Setup
Install the .vsix (see Build), then reload VS Code. On start the
extension adds this to Claude Code's user config, ~/.claude.json, if it
isn't there already:
"mcpServers": { "vscode-browser": { "type": "http", "url": "http://127.0.0.1:3799/mcp" } }Turn that off with browserMcp.configureClaude, or run Browser MCP:
Register with Claude Code to do it by hand. Start a new Claude Code
session afterwards. Claude Code connects when a session starts, so VS Code
must already be running.
Settings: browserMcp.port (default 3799; every window must use the same
one) and browserMcp.configureClaude (default on).
Security
Everything listens on
127.0.0.1only.Requests whose
Hostisn't127.0.0.1:<port>orlocalhost:<port>are refused (DNS rebinding), and so are requests with anOriginheader (web pages). MCP clients and windows send neither.Windows join the hub only with the secret in
~/.vscode-browser-mcp/secret, which the first window creates.The MCP endpoint has no token: any program running as you can use it, as with any local MCP server.
browser_evalruns any JavaScript in the open page, which is logged in as you wherever your browser is.
Build
Needs Node 22.18+ (for running TypeScript tests directly).
npm install
npm test # hub, peers, routing, security, config, with fake windows
npm run package # type-check, bundle, and write vscode-browser-mcp-<version>.vsix
code --install-extension vscode-browser-mcp-0.1.0.vsixsrc/ splits into the parts with no VS Code dependency, tested in plain
Node (protocol, routing, hub, node, tools, page, cdp,
claude-config), and the two that need VS Code (browser, extension).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Unofficial Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables MCP clients to control a real local browser window for web automation tasks such as clicking, typing, scrolling, and taking screenshots.184 npm-
- AlicenseBqualityCmaintenanceEnables MCP clients to drive a real Chromium browser for automation, including navigation, JavaScript execution, CDP commands, network capture, and multi-tab control.7GPL 3.0
- AlicenseAqualityBmaintenanceLets MCP agents drive VS Code's integrated browser tab that the user shares with them: opening pages, taking accessibility snapshots and screenshots, clicking, typing, scrolling, dragging and reading console and network activity with real trusted input. It also maps a picked element back to the source file, line and column that rendered it, so an agent receives the same selection the developer clicked.251MIT
- FlicenseNot gradedqualityAmaintenanceLets any MCP client drive isolated local Chromium or Firefox profiles — navigating, clicking, typing, extracting content, taking screenshots, evaluating JS, and managing tabs and cookies — each with its own spoofed fingerprint, proxy, and locale. Per-profile cookies and login state persist across launches, so agents can complete real authenticated workflows.-