Anchor MCP Server (Open Source)

Model Context Protocol A Model Context Protocol (MCP) server that provides browser automation capabilities using Anchor Browser’s remote browser service with Playwright. This server enables LLMs to interact with web pages through Anchor’s cloud-based browsers with built-in proxies, stealth features, and advanced capabilities. This is based on the open source repository at browsermcp-com/mcp, which extends Microsoft’s Playwright MCP with Anchor Browser’s cloud infrastructure.
Looking for our hosted MCP service? Check out MCP - Hosted Version for zero-setup integration.

When to Use Open Source MCP

Choose the open source version when you need:
  • Custom tool modifications - Modify browser automation tools for specific use cases
  • Advanced configuration - Fine-tune browser settings and behaviors
  • Local development - Test MCP integrations during development
  • Compliance requirements - Run MCP server within your infrastructure
  • Integration with existing systems - Connect MCP to your internal tools and workflows

Key Features

  • Remote Browser Execution: Uses Anchor Browser’s cloud infrastructure instead of local browsers
  • Built-in Proxies: Automatic residential proxy rotation and geo-targeting
  • Stealth & Anti-Detection: Advanced browser fingerprinting and anti-bot detection
  • Fast and lightweight: Uses Playwright’s accessibility tree, not pixel-based input
  • LLM-friendly: No vision models needed, operates purely on structured data
  • Deterministic tool application: Avoids ambiguity common with screenshot-based approaches
  • Customizable: Modify and extend tools for your specific needs

Requirements

  • Node.js 18 or newer
  • Anchor Browser API Key (Get one here)
  • VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client

Getting Started

1. Clone and Build

Since this is a custom Anchor MCP server, you need to build it locally:
# Clone the repository
git clone https://github.com/browsermcp-com/mcp.git
cd mcp

# Install dependencies and build
npm install
npm run build

2. Get Your Anchor API Key

  1. Sign up at anchorbrowser.io
  2. Get your API key from the dashboard
  3. Copy your API key (starts with sk-)

3. Configure MCP Client

Cursor

Add to your ~/.cursor/mcp.json:
{
  "mcpServers": {
    "anchor-browser": {
      "command": "node",
      "args": [
        "/path/to/mcp/cli.js"
      ],
      "env": {
        "ANCHOR_API_KEY": "sk-your-api-key-here"
      }
    }
  }
}

VS Code

Add to your MCP configuration:
{
  "mcpServers": {
    "anchor-browser": {
      "command": "node",
      "args": [
        "/path/to/mcp/cli.js"
      ],
      "env": {
        "ANCHOR_API_KEY": "sk-your-api-key-here"
      }
    }
  }
}

Claude Desktop

Add to your claude_desktop_config.json:
{
  "mcpServers": {
    "anchor-browser": {
      "command": "node",
      "args": [
        "/path/to/mcp/cli.js"
      ],
      "env": {
        "ANCHOR_API_KEY": "sk-your-api-key-here"
      }
    }
  }
}

4. Restart Your MCP Client

After updating the configuration, restart your MCP client (Cursor, VS Code, etc.) to load the new server.

Configuration Options

The Anchor MCP server supports essential configuration options:
node cli.js --help

Available Options:

  • --host <host> - Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces)
  • --port <port> - Port to listen on for HTTP transport (Docker/server mode)

Example with Options:

{
  "mcpServers": {
    "anchor-browser": {
      "command": "node",
      "args": [
        "/path/to/mcp/cli.js"
      ],
      "env": {
        "ANCHOR_API_KEY": "sk-your-api-key-here"
      }
    }
  }
}

How It Works

  1. Browser Session Creation: When you use browser tools, the MCP server calls Anchor’s API to create a remote browser session
  2. Remote Connection: Connects to the remote browser via WebSocket using Chrome DevTools Protocol (CDP)
  3. Tool Execution: All browser automation happens in Anchor’s cloud infrastructure
  4. Proxy & Stealth: Automatic residential proxy rotation and advanced anti-detection features
  5. Session Management: Each session is isolated and can be viewed live via Anchor’s dashboard

Production & CI/CD Usage

Self-Hosted in Production

The open source MCP server can be deployed in production environments:
  • Docker Containers - Run in containerized environments
  • CI/CD Pipelines - Integrate with Jenkins, GitHub Actions, GitLab CI
  • Serverless Functions - Deploy as microservices or serverless functions
  • Kubernetes - Scale horizontally in Kubernetes clusters

CI/CD Integration Example

# GitHub Actions with self-hosted MCP
name: E2E Testing
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    services:
      anchor-mcp:
        image: your-registry/anchor-mcp:latest
        env:
          ANCHOR_API_KEY: ${{ secrets.ANCHOR_API_KEY }}
        ports:
          - 8931:8931
    steps:
      - uses: actions/checkout@v3
      - name: Run AI tests against MCP server
        run: |
          python ai_test_runner.py --mcp-url http://localhost:8931/mcp

Benefits Over Local Browsers

🌐 Global Proxy Network

  • Automatic residential proxy rotation
  • Geo-targeting for different regions
  • No proxy configuration needed

🛡️ Advanced Stealth

  • Browser fingerprinting protection
  • Anti-bot detection bypass
  • Real browser environments

☁️ Cloud Infrastructure

  • No local browser dependencies
  • Consistent browser versions
  • Scalable execution

📊 Monitoring & Debugging

  • Live view of browser sessions
  • Session recordings and traces
  • Network request logging