Enables automated browser interactions with Cloudflare-protected websites, including automatic waiting for Cloudflare challenges to complete and advanced anti-detection features.
Provides browser automation capabilities using Firefox as one of the supported browser engines for creating remote headless browsing sessions.
Provides browser automation capabilities using WebKit (Safari) as one of the supported browser engines for creating remote headless browsing sessions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCProxycheck Amazon prices for iPhone 15 from a US location"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCProxy
Remote headless browser sessions via MCP (Model Context Protocol) for SaladCloud.
This project enables AI agents to control browsers running on geographically distributed SaladCloud containers. Use cases include regional price checking, geo-targeted content verification, and web automation from specific locations.
Architecture
Features
Multi-Browser Support: Choose between Chromium, Firefox, or WebKit (Safari) for each session
Mobile Device Emulation: Emulate 100+ mobile devices (iPhone, Pixel, iPad, Galaxy, etc.) with accurate viewport, user agent, and touch support
Location-Aware Sessions: Each session reports its geographic location (IP, city, state/region, country, timezone, ISP). Agents can reference sessions by location (e.g., "use the Utah session")
Stealth Mode: Advanced anti-detection with WebGL spoofing, navigator overrides, and realistic browser fingerprints
Humanized Interactions: Optional human-like behavior for clicks, typing, and scrolling to avoid bot detection
Cloudflare Auto-Wait: Automatically wait for Cloudflare challenges to complete
Cookie Persistence: Save and restore cookies for session management and authentication
Realistic User Agents: Auto-generates realistic user agents using up-to-date browser fingerprint data
Session Affinity: WebSocket connections pin sessions to specific container replicas
Heartbeat Keepalive: 30-second pings keep connections alive (Salad gateway has 100s idle timeout)
Multi-Region Support: Connect to different Salad deployments for geo-distributed browsing
Version Compatibility: Capability reporting with automatic version mismatch detection
33 MCP Tools: Full browser automation including coordinate-based clicking for vision agents
Prerequisites
Docker (recommended) or Node.js 20+
SaladCloud account (for production deployment)
AI-Assisted Setup
Copy and paste this prompt to your AI agent to help you get mcproxy configured:
Quick Start
1. Install Dependencies
2. Build
3. Local Testing
Start the browser server locally with Docker:
The repo includes a .mcp.json that's pre-configured to work with the Docker Compose setup. To use with Claude Code or other MCP clients that support workspace configs, just run from this directory.
To test manually:
4. Test with MCP Inspector
Then create a session at ws://localhost:3000.
Using Pre-Built Docker Images
Pre-built Docker images are available on GitHub Container Registry for both components.
Docker Images
Component | Image | Platforms |
Browser Server |
| linux/amd64 |
MCP Server |
| linux/amd64, linux/arm64 |
Running Browser Server with Docker
Running MCP Server with Docker
The MCP server uses stdio for communication, so it runs interactively with -i flag:
MCP Client Configuration with Docker
Configure your MCP client to use the Docker image instead of running from source:
Claude Desktop (claude_desktop_config.json):
Claude Code (.mcp.json):
Full Local Docker Setup
To test everything locally with Docker (no build required):
Configuration
Browser Server (Environment Variables)
Variable | Default | Description |
|
| WebSocket server port |
| (required) | Shared secret for authentication |
|
| Max browser contexts per container |
|
| Context timeout (30 minutes) |
|
| Health/readiness check HTTP port |
Health Check Endpoints
The browser server exposes health check endpoints on HEALTH_PORT (default 8080):
Endpoint | Description |
| Returns health status with context count. Response: |
| Readiness probe. Returns |
SaladCloud Configuration:
Startup Probe:
GET /readyon port8080- confirms server is initializedLiveness Probe:
GET /healthon port8080- confirms server is healthy
MCP Server (Environment Variables)
Variable | Default | Description |
| (required) | Shared secret for authentication |
|
| Heartbeat interval (30s) |
|
| Command timeout (30s) |
MCP Tools
Session Management
Tool | Description |
| Create a new browser session with optional browser type and device emulation |
| List all active sessions with browser type and location |
| Close a session and free resources |
| List all available device names for mobile emulation |
| Get server capabilities and check for version mismatches |
browser_create_session
endpoint(optional): WebSocket endpoint URL (usesMCPROXY_DEFAULT_ENDPOINTif not provided)browser_type(optional):chromium(default),firefox, orwebkit(Safari)device(optional): Device to emulate (e.g.,"iPhone 15","Pixel 7","iPad Pro 11")viewport(optional):{ width, height }in pixels (ignored if device is set)userAgent(optional): Custom user agent string (overrides device and random)randomUserAgent(optional): Use a random realistic user agentisMobile(optional): Emulate mobile browserhasTouch(optional): Enable touch events
Navigation
Tool | Description |
| Navigate to a URL with optional Cloudflare auto-wait |
| Go back in history |
| Go forward in history |
| Reload the current page |
browser_navigate
session_id(required): Session IDurl(required): URL to navigate towait_until(optional):load,domcontentloaded, ornetworkidlewait_for_cloudflare(optional): Auto-wait for Cloudflare challenges to completecloudflare_timeout(optional): Max wait time in ms (default: 15000)
Interaction (Selector-Based)
Tool | Description |
| Click an element by CSS selector |
| Type text into an input by selector |
| Select a dropdown option |
| Hover over an element |
| Scroll the page or element |
Interaction (Coordinate-Based)
These tools use relative coordinates (0-1 range) so vision agents can click based on screenshots without worrying about resolution:
x=0is left edge,x=1is right edgey=0is top edge,y=1is bottom edge
Tool | Description |
| Click at relative coordinates (0-1 range) |
| Double-click at coordinates |
| Move mouse to coordinates |
| Drag from one position to another |
Example workflow for vision agents:
Keyboard (Human-Like Text Entry)
These tools type at the currently focused element (no selector needed), which is more human-like:
Tool | Description |
| Type text at current focus |
| Press a key (Enter, Tab, Escape, arrows, or combos like Control+a) |
| Hold down a key (for modifiers) |
| Release a held key |
Humanize Option:
Most interaction tools support humanize: true for natural, human-like behavior:
Click/Click_at: Natural curved mouse movement to the target
Type/Keyboard_type: Random delays between keystrokes (50-150ms)
Scroll: Smooth scrolling in small increments with natural timing
Move_mouse/Drag: Bezier-curved paths with acceleration/deceleration
Content Extraction
Tool | Description |
| Take a screenshot (returns base64 PNG, can save to file) |
| Get HTML content |
| Get visible text |
| Execute JavaScript |
Waiting
Tool | Description |
| Wait for an element to appear |
| Wait for navigation to complete |
Cookie Management
Tool | Description |
| Get cookies from the session (optionally filtered by URLs) |
| Set cookies in the session (for restoring auth state) |
| Clear all cookies from the session |
Cookie Persistence Example:
CAPTCHA Handling
Tool | Description |
| Check for CAPTCHAs on the page, returns screenshots for agent analysis |
| Submit a CAPTCHA solution after analyzing the image |
CAPTCHA Flow:
browser_navigateautomatically detects CAPTCHAs and returns screenshotsAgent analyzes the CAPTCHA image using vision capabilities
Agent calls
browser_solve_captchawith the solutionIf needed,
browser_check_captchacan re-check the page
Supported CAPTCHA types: reCAPTCHA, hCaptcha, Cloudflare Turnstile, FunCaptcha, and generic image/text CAPTCHAs.
MCP Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Claude Code (VS Code Extension)
Add to your workspace .mcp.json or global settings:
Cursor
Add to Cursor's MCP settings (~/.cursor/mcp.json):
Windsurf
Add to Windsurf's MCP configuration:
Other MCP Clients
Any MCP-compatible client can use mcproxy. The server communicates via stdio using the standard MCP protocol. Required environment variables:
MCPROXY_AUTH_TOKEN: Authentication token (must match browser server'sAUTH_TOKEN)MCPROXY_DEFAULT_ENDPOINT(optional): Default WebSocket endpoint so you don't need to specify it in everybrowser_create_sessioncall
Deploying to SaladCloud
1. Build and Push Docker Image
2. Create Container Group on SaladCloud
Go to SaladCloud Portal
Create a new Container Group
Configure:
Image:
your-registry/mcproxy-browser:latestPort:
3000Environment Variables:
AUTH_TOKEN: Your secret tokenMAX_CONTEXTS:10(adjust based on container resources)
Resources: Recommend at least 2GB RAM for browser automation
Networking: Enable Container Gateway
Startup Probe: HTTP
GET /readyon port8080Liveness Probe: HTTP
GET /healthon port8080
Deploy to your desired regions
3. Note Your Endpoints
Each container group will have an endpoint like:
Use these endpoints when creating browser sessions.
Example Usage
Once configured, you can ask Claude to:
Basic Session Creation
Claude will see browser type and location info in the response:
Mobile Device Emulation
Humanized Browsing
Cloudflare-Protected Sites
Multi-Browser Testing
Geo-Distributed Price Comparison
Referencing Sessions by Location
Cookie-Based Session Persistence
Security Considerations
AUTH_TOKEN: Use a strong, unique token. Rotate periodically.
Network Security: The SaladCloud Container Gateway provides the first layer of access control.
Session Isolation: Each browser context is isolated. Sessions cannot access each other's data.
Sensitive Data: Avoid automating workflows that handle sensitive credentials through browser sessions.
Development
Project Structure
Building
Running in Development
Troubleshooting
Connection Timeouts
If sessions disconnect unexpectedly:
Check that heartbeat interval (30s default) is less than Salad's idle timeout (100s)
Verify network connectivity to the SaladCloud endpoint
Check container logs for errors
Bot Detection
If sites detect automation:
The stealth plugin handles most cases automatically
Use
humanize: trueon click, type, and scroll actions for human-like behaviorTry
randomUserAgent: truewhen creating sessions to rotate fingerprintsUse mobile device emulation (
device: "iPhone 15") - mobile browsers are often trusted moreFor Cloudflare-protected sites, use
wait_for_cloudflare: trueon navigate
Cloudflare Challenges
If Cloudflare challenges aren't completing:
Increase
cloudflare_timeout(default is 15 seconds)Some challenges require interaction - check for interactive CAPTCHAs
Try a different browser type (Firefox or WebKit)
Use
browser_check_captchato see what type of challenge is present
Version Mismatches
If you see unexpected behavior or missing features:
Use
browser_get_capabilitiesto check server version and supported featuresThe tool will warn if browser server and MCP server versions are mismatched
Update the component that's behind (recommendation provided in response)
Navigation Errors with networkidle
If navigation fails with net::ERR_ABORTED when using wait_until: networkidle:
Sites with dynamic content or continuous network activity may never reach "network idle"
Use
loadordomcontentloadedinstead (default isdomcontentloaded)networkidleis best for static pages or when you need all resources fully loadedFor most use cases, the default
domcontentloadedis fastest and most reliable
Screenshots and File Handling
Screenshots from browser_screenshot are returned as base64 and displayed inline in MCP responses:
The inline image display works automatically - no need to use
present_filesor similar toolsThe optional
file_pathparameter saves to disk as a convenience but the base64 response is the primary outputIf using
file_path, the file is saved on the machine running the MCP server (your local machine), not the remote browser server
Memory Issues
If the browser server runs out of memory:
Increase container memory allocation on SaladCloud (recommend 4GB+ for heavy automation)
Reduce
MAX_CONTEXTSto limit concurrent browser contextsClose sessions when done with
browser_close_sessionUse
browser_clear_cookiesbetween different site visits in the same session
License
MIT