Skip to content
VS Code

browser ref mcp for VS Code

io.github.zy2755/browser-ref-mcp

Reliable browser-control MCP server for AI agents: click by ref, self-healing sessions.

client:VS Code transport:stdio runtime:npm

Install browser ref mcp in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "browser-mcp-cdp-url",
      "description": "BROWSER_MCP_CDP_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "browser-mcp-headless",
      "description": "BROWSER_MCP_HEADLESS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "browser-mcp-profile",
      "description": "BROWSER_MCP_PROFILE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "browser-mcp-channels",
      "description": "BROWSER_MCP_CHANNELS",
      "password": true
    }
  ],
  "servers": {
    "browser-ref-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "browser-ref-mcp"
      ],
      "env": {
        "BROWSER_MCP_CDP_URL": "${input:browser-mcp-cdp-url}",
        "BROWSER_MCP_HEADLESS": "${input:browser-mcp-headless}",
        "BROWSER_MCP_PROFILE": "${input:browser-mcp-profile}",
        "BROWSER_MCP_CHANNELS": "${input:browser-mcp-channels}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

browser ref mcp in other clients