home / mcp / anchor browser mcp server
Cloud Browser MCP server
Configuration
View docs{
"mcpServers": {
"browsermcp-com-mcp": {
"url": "http://localhost:8931/mcp",
"headers": {
"ANCHOR_API_KEY": "sk-your-api-key-here"
}
}
}
}You set up a Browser MCP Server to run Anchor Browser’s remote cloud browsers and control them from your MCP clients. It lets you automate web pages with a cloud-based, proxy-enabled, stealth-capable environment, so you don’t need local browsers or complex proxy configurations.
Connect your MCP client to the Browser MCP Server to run browser automation tasks. You can use the HTTP endpoint for remote access or run the server locally with a stdio configuration. Once connected, you can navigate pages, click elements, type into inputs, handle dialogs, upload files, capture page data, and inspect network activity, all through structured tool calls.
Prerequisites: ensure you have Node.js 18 or newer installed on your system.
Step 1: Build the server locally
# Clone the repository
git clone https://github.com/anchorbrowser/anchor-mcp.git
cd anchor-mcp
# Install dependencies and build
npm install
npm run buildStep 2: Obtain your Anchor API Key
Sign up at anchorbrowser.io and copy your API key from the dashboard. The key starts with sk-. Keep this value secure and ready to configure your MCP clients.
Step 3: Configure MCP Clients to use the Browser MCP Server
{
"mcpServers": {
"anchor-browser": {
"command": "node",
"args": [
"/path/to/anchor-mcp/cli.js"
],
"env": {
"ANCHOR_API_KEY": "sk-your-api-key-here"
}
}
}
}Client-specific examples are shown for Cursor, VS Code, and Claude Desktop. Use the same base command and provide your API key in the environment section.
Step 4: Start the HTTP server (Docker/headless environment) if you prefer a remote endpoint
ANCHOR_API_KEY="sk-your-key" node cli.js --port 8931 --host 0.0.0.0Step 5: Register the HTTP endpoint in your MCP client configuration
{
"mcpServers": {
"anchor-browser": {
"url": "http://localhost:8931/mcp"
}
}
}This server focuses on essential configuration because Anchor Browser handles the remote browser management automatically. You can rely on Anchor’s built-in proxy rotation, geo-targeting, and anti-detection features.
Environment variables shown in examples are required or recommended for running the server. Include ANCHOR_API_KEY in your environment for secure access.
The Browser MCP server exposes a minimal set of options. Use the help command to review available options.
node cli.js --helpKey options include: - --host <host> — Host to bind the server to (default: localhost; use 0.0.0.0 for all interfaces) - --port <port> — Port to listen on for HTTP transport (Docker/server mode)
1) Browser Session Creation: Your MCP client instructs Anchor Browser to create a remote session. 2) Remote Connection: The session is connected over WebSocket using the Chrome DevTools Protocol. 3) Tool Execution: All automation runs in Anchor’s cloud. 4) Proxy & Stealth: Built-in residential proxies and anti-detection features are applied automatically. 5) Session Management: Each session is isolated and viewable via Anchor’s dashboard.
Invalid API Key: Ensure ANCHOR_API_KEY is correctly set in your MCP configuration.
Build errors: Ensure Node.js 18+ is installed and run npm install before building.
Connection issues: Check MCP logs for API responses and WebSocket status.
Session limits: Each API key has a limited number of sessions. Check your Anchor dashboard for usage.
To modify or extend the Browser MCP server, edit the TypeScript sources, then rebuild and test with the CLI help command.
# Make changes to src/
npm run build
node cli.js --helpNavigate to URLs in the remote browser session.
Click elements on the page.
Type text into input fields.
Retrieve the page accessibility tree for analysis.
Capture a screenshot of the current page view.
Execute JavaScript in the page context.
Wait for specified conditions or events.
Open a new browser tab.
List all open tabs.
Switch to a different tab.
Close a tab.
Upload files to the page.
Handle alerts and confirms.
Inspect network activity.
Save the current page as PDF with caps=pdf.