mcp-browser-agent
A Model Context Protocol (MCP) integration that provides Claude Desktop with autonomous browser automation capabilities. This agent enables Claude to interact with web content, manipulate DOM elements, execute JavaScript, and perform API requests.
claude mcp add --transport stdio imprvhub-mcp-browser-agent node ABSOLUTE_PATH_TO_DIRECTORY/mcp-browser-agent/dist/index.js --browser chrome
How to use
The MCP Browser Agent provides autonomous browser automation capabilities to Claude Desktop via a persistent browser instance. It enables advanced browser tasks such as navigating to URLs with configurable load strategies, capturing full-page or element-specific screenshots, and performing precise DOM interactions (click, fill, select, hover). It also exposes a powerful built-in API client that can execute HTTP requests (GET, POST, PUT, PATCH, DELETE) with configurable headers and bodies, and returns JSON-formatted responses with error handling. Additionally, the agent publishes browser console logs and screenshots as MCP resources, supports persistent sessions with a headful browser, and can chain multiple browser operations to accomplish complex tasks with intelligent error recovery through AI-assisted instruction parsing. You can drive these capabilities through Claude Desktop by starting the MCP server via the configured command and interacting with the available MCP endpoints and resources.
With an MCP-enabled workflow, you can issue multi-step browser automation sequences (e.g., navigate, fill a form, submit, then perform an API call and process results) and have Claude manage the logic, retries, and data extraction. The agent is designed to support growth, including multiple browser types and configurable load strategies, so you can tailor automation reliability to your targets and environments.
How to install
Prerequisites
- Node.js 16 or higher
- npm (comes with Node.js)
- Claude Desktop (for integration and control)
- Playwright dependencies (when using browser automation)
Install and set up
- Clone the repository or download the package contents:
git clone https://github.com/imprvhub/mcp-browser-agent
cd mcp-browser-agent
- Install dependencies:
npm install
- Build the project (produces dist/index.js):
npm run build
- Run the MCP server manually (example):
node dist/index.js
- Optional: Configure Claude Desktop to auto-start the MCP server by adding an MCP entry in the Claude configuration (example below uses a placeholder ABSOLUTE_PATH):
{
"mcpServers": {
"browserAgent": {
"command": "node",
"args": ["ABSOLUTE_PATH_TO_DIRECTORY/mcp-browser-agent/dist/index.js", "--browser", "chrome"]
}
}
}
Additional notes
Tips and common considerations:
- When integrating with Claude Desktop, ensure ABSOLUTE_PATH_TO_DIRECTORY accurately points to the location where you installed the MCP Browser Agent.
- The default browser type is Chrome; you can switch to other supported browsers via the --browser flag or corresponding configuration.
- If Playwright dependencies are needed (for headless/headful browser operation), run the recommended Playwright setup commands (e.g., npm init playwright@latest) as described in the README to install required browser drivers.
- For sustained automation, you can enable a persistent, headful browser session to preserve state across tasks.
- If you encounter issues fetching or rendering pages, verify network access, firewall rules, and correct PATH configurations in your mcpServers setup.
- Ensure your Claude Desktop config.json uses absolute paths and valid JSON formatting to avoid startup errors.
Related MCP Servers
awesome-claude-skills
A curated list of awesome Claude Skills, resources, and tools for customizing Claude AI workflows
mcp -browserbase
Allow LLMs to control a browser with Browserbase and Stagehand
golf
Production-Ready MCP Server Framework • Build, deploy & scale secure AI agent infrastructure • Includes Auth, Observability, Debugger, Telemetry & Runtime • Run real-world MCPs powering AI Agents
bytechef
Open-source, AI-native, low-code platform for API orchestration, workflow automation, and AI agent integration across internal systems and SaaS products.
claude-emporium
🏛 [UNDER CONSTRUCTION] A (roman) claude plugin marketplace
apple-mail
MCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language