browser-ref-mcp
A reliable browser-control MCP server for AI agents that enables clicking by reference rather than brittle CSS selectors. It features self-healing sessions, semantic snapshots with [eN] refs, and handles shadow DOM and cross-origin iframes. It drives existing Chrome or Edge browsers via playwright-core without requiring a browser download.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Click elements by reference instead of CSS selectors
- Handle self-healing sessions when browser crashes
- Navigate to URLs and interact with web pages
- Flatten shadow DOM and cross-origin iframes into one tree
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
browser-ref-mcp 0.2.0
{
"version": "0.2.0",
"transport": "stdio",
"identifier": "browser-ref-mcp",
"registryType": "npm",
"environmentVariables": [
{
"name": "BROWSER_MCP_CDP_URL",
"format": "string",
"description": "Connect to a browser already running with a debug port, e.g. http://127.0.0.1:9222. Leave unset to launch your own Chrome/Edge."
},
{
"name": "BROWSER_MCP_HEADLESS",
"format": "string",
"description": "Run without a visible browser window (default: headed, so the user can watch and take over)."
},
{
"name": "BROWSER_MCP_PROFILE",
"format": "string",
"description": "Browser profile directory, keeps logins across sessions (default: ~/.browser-mcp/profile)."
},
{
"name": "BROWSER_MCP_CHANNELS",
"format": "string",
"description": "Comma-separated browser channel fallback chain (default: chrome,msedge)."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"browser-ref-mcp": {
"command": "npx",
"args": [
"-y",
"browser-ref-mcp@0.2.0"
],
"env": {
"BROWSER_MCP_CDP_URL": "<YOUR_BROWSER_MCP_CDP_URL>",
"BROWSER_MCP_HEADLESS": "<YOUR_BROWSER_MCP_HEADLESS>",
"BROWSER_MCP_PROFILE": "<YOUR_BROWSER_MCP_PROFILE>",
"BROWSER_MCP_CHANNELS": "<YOUR_BROWSER_MCP_CHANNELS>"
}
}
}
}Cline
{
"mcpServers": {
"browser-ref-mcp": {
"command": "npx",
"args": [
"-y",
"browser-ref-mcp@0.2.0"
],
"env": {
"BROWSER_MCP_CDP_URL": "<YOUR_BROWSER_MCP_CDP_URL>",
"BROWSER_MCP_HEADLESS": "<YOUR_BROWSER_MCP_HEADLESS>",
"BROWSER_MCP_PROFILE": "<YOUR_BROWSER_MCP_PROFILE>",
"BROWSER_MCP_CHANNELS": "<YOUR_BROWSER_MCP_CHANNELS>"
}
}
}
}VS Code
{
"servers": {
"browser-ref-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"browser-ref-mcp@0.2.0"
],
"env": {
"BROWSER_MCP_CDP_URL": "<YOUR_BROWSER_MCP_CDP_URL>",
"BROWSER_MCP_HEADLESS": "<YOUR_BROWSER_MCP_HEADLESS>",
"BROWSER_MCP_PROFILE": "<YOUR_BROWSER_MCP_PROFILE>",
"BROWSER_MCP_CHANNELS": "<YOUR_BROWSER_MCP_CHANNELS>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"browser-ref-mcp": {
"command": "npx",
"args": [
"-y",
"browser-ref-mcp@0.2.0"
],
"env": {
"BROWSER_MCP_CDP_URL": "<YOUR_BROWSER_MCP_CDP_URL>",
"BROWSER_MCP_HEADLESS": "<YOUR_BROWSER_MCP_HEADLESS>",
"BROWSER_MCP_PROFILE": "<YOUR_BROWSER_MCP_PROFILE>",
"BROWSER_MCP_CHANNELS": "<YOUR_BROWSER_MCP_CHANNELS>"
}
}
}
}Let your agent find its tools
Find servers like browser-ref-mcp from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.