
How to add MCP Browser Agent to Windsurf
Autonomous browser automation for Claude Desktop via Playwright, plus an HTTP API client. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 39★ · stdio · no auth
Windsurf config for MCP Browser Agent
git clone https://github.com/imprvhub/mcp-browser-agent && cd mcp-browser-agent && npm install && npm run build{
"mcpServers": {
"mcp-browser-agent": {
"command": "node",
"args": [
"ABSOLUTE_PATH_TO_DIRECTORY/mcp-browser-agent/dist/index.js",
"--browser",
"chrome"
]
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the MCP Browser Agent config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5MCP Browser Agent's tools become available to Cascade.
Before you start
- Node.js 16 or higher
- Claude Desktop
- Playwright dependencies (installed with npm install; browser drivers downloaded automatically on first use)
What MCP Browser Agent can do in Windsurf
browser_navigateNavigate to a URL. Params: url (required), timeout, waitUntil.
browser_screenshotCapture a screenshot. Params: name (required), selector, fullPage, mask, savePath.
browser_clickClick an element. Params: selector (required).
browser_fillFill a form input. Params: selector (required), value (required).
browser_selectSelect a dropdown option. Params: selector (required), value (required).
browser_hoverHover over an element. Params: selector (required).
browser_evaluateExecute JavaScript in the browser context. Params: script (required).
api_getPerform an HTTP GET request. Params: url (required), headers.
Security
Provides Claude with autonomous browser control; review the repo's SECURITY.md for prohibited uses and best practices. Built on Playwright, which has known issues; Chrome/Chromium processes may not terminate cleanly and sometimes need manual cleanup.
MCP Browser Agent + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the MCP Browser Agent config there under the "mcpServers" key and restart the client.
Is MCP Browser Agent safe to use with Windsurf?
Provides Claude with autonomous browser control; review the repo's SECURITY.md for prohibited uses and best practices. Built on Playwright, which has known issues; Chrome/Chromium processes may not terminate cleanly and sometimes need manual cleanup.
Which browsers are supported?
Chrome (default), Firefox (Nightly), Microsoft Edge, and WebKit (the engine behind Safari). Select one via the .mcp_browser_agent_config.json file, the --browser CLI argument, the MCP_BROWSER_TYPE environment variable, or the args in claude_desktop_config.json.
Is it published to npm?
No. You install it by cloning the repository, running npm install, and npm run build, then point Claude Desktop at dist/index.js.
Why do I see a 'Server disconnected' error in Claude Desktop?
Usually the absolute path in claude_desktop_config.json is wrong or the server isn't running. Verify the path (use double backslashes on Windows) and try running node dist/index.js manually from the project directory.