by roxybrowserlabs
Provides an MCP server that lets AI assistants create, open, configure, and control RoxyBrowser instances, retrieve Chrome DevTools Protocol WebSocket endpoints, and manage proxies, accounts, and workspaces for automated browsing tasks.
RoxyBrowser MCP Server enables programmatic control of RoxyBrowser browsers via Model Context Protocol tools. It exposes operations such as creating browsers, opening them to obtain CDP WebSocket URLs, managing proxies, accounts, and workspaces, and performing health checks, allowing AI assistants or scripts to drive full‑stack browser automation.
npx @roxybrowser/openapi@latest.ROXY_API_KEY and optionally ROXY_API_HOST (default http://127.0.0.1:50000).roxy-browser-mcp) or programmatically (runServer() from the package).roxy_create_browser, roxy_open_browsers, roxy_list_proxies, etc., from your AI or script to manage browsers and retrieve CDP endpoints for Playwright or raw CDP automation.Q: Do I need to install RoxyBrowser separately? A: Yes. The MCP server only talks to a running RoxyBrowser instance with its OpenAPI enabled.
Q: How is authentication handled?
A: Provide the API key via ROXY_API_KEY (or the -k/--api-key CLI flag). The key is read at process start and cannot be changed at runtime.
Q: What if I get a "Failed to connect to RoxyBrowser API" error? A: Verify RoxyBrowser is running, the API is enabled, the correct port is used, and no firewall blocks the connection.
Q: Does closing a browser free my profile quota?
A: No. Use roxy_delete_browsers to permanently remove a profile and reclaim quota.
Q: Can I run the server without installing it globally?
A: Absolutely. Use npx @roxybrowser/openapi@latest to run it directly.
Q: How do I obtain the CDP WebSocket URL for a browser?
A: Call roxy_open_browsers (or roxy_get_connection_info) after creating the browser; the tool returns the WS endpoint.
Q: Is there a way to batch‑create browsers or proxies?
A: Yes. Use roxy_batch_create_browsers and roxy_batch_create_proxies to provision multiple resources in a single call.
Q: What development commands are available?
A: npm run dev for hot‑reload development, npm run build for production, and the CLI commands described above.
A Model Context Protocol (MCP) server for RoxyBrowser that provides AI assistants with the ability to manage browser instances and obtain Chrome DevTools Protocol (CDP) WebSocket endpoints for automation.
Add both RoxyBrowser OpenAPI and RoxyBrowser Playwright MCP to your MCP client configuration:
Claude Desktop / VS Code / Cursor:
{
"mcpServers": {
"roxybrowser-openapi": {
"command": "npx",
"args": ["@roxybrowser/openapi@latest"],
"env": {
"ROXY_API_KEY": "YOUR API KEY",
"ROXY_API_HOST": "http://127.0.0.1:50000"
}
},
"roxybrowser-playwright-mcp": {
"command": "npx",
"args": ["@roxybrowser/playwright-mcp@latest"]
}
}
}
Note: Replace YOUR API KEY and YOUR API HOST with your actual RoxyBrowser credentials.
This package supports three ways to run: CLI, in-process (programmatic), and as a library for custom integration.
Start the MCP server from the command line. Ideal for MCP clients that spawn the server as a subprocess.
# After npm install -g @roxybrowser/openapi
roxy-browser-mcp
# Or with npx (no global install)
npx @roxybrowser/openapi
# After cloning and building
npm run build && node lib/index.js
CLI options (config: CLI args > environment variables > defaults):
-V, --version — Show version-h, --help — Show usage-H, --api-host <url> — RoxyBrowser API base URL (default: http://127.0.0.1:50000)-k, --api-key <key> — API key (required unless set via env)-t, --timeout <ms> — Request timeout in milliseconds (default: 30000)Environment variables (used when an option is not passed): ROXY_API_HOST, ROXY_API_KEY, ROXY_TIMEOUT.
Examples:
roxy-browser-mcp --api-key "your-key"
roxy-browser-mcp -k "your-key" -H http://127.0.0.1:50000
ROXY_API_KEY=your-key roxy-browser-mcp
Run the MCP server inside your own Node process (same process, stdio transport). Useful when you want to start the server from code instead of a separate CLI process.
import { runServer } from '@roxybrowser/openapi'
// Starts MCP server on stdio; runs until process exits
await runServer()
Or use the server class for more control:
import { RoxyBrowserMCPServer } from '@roxybrowser/openapi'
const server = new RoxyBrowserMCPServer()
await server.run()
Set env vars (ROXY_API_KEY, ROXY_API_HOST) before calling runServer(); config is read at process start and cannot be changed at runtime.
Use the exported tools and API helpers in your own app: call RoxyBrowser APIs without running the MCP server.
import {
listBrowsers,
openBrowser,
createBrowser,
listWorkspaces,
healthCheck,
} from '@roxybrowser/openapi'
// Set ROXY_API_KEY and ROXY_API_HOST (env) before any request; config is fixed at process start
// Use tool handlers directly (same as MCP tool calls)
const listResult = await listBrowsers.handle({ workspaceId: 1 })
const openResult = await openBrowser.handle({
workspaceId: 1,
dirIds: ['browser-dir-id'],
})
const createResult = await createBrowser.handle({
workspaceId: 1,
windowName: 'My Browser',
})
Each tool exports:
.name — Tool name (e.g. roxy_list_browsers).schema — MCP tool schema (name, description, inputSchema).handle(args) — Async handler; pass the same arguments as the MCP toolYou can also use the low-level request() helper and types:
import { request, resolveConfig } from '@roxybrowser/openapi'
import type { RoxyClientConfig, BrowserListItem, Workspace } from '@roxybrowser/openapi'
const res = await request('/browser/list_v3?workspaceId=1', { method: 'GET' })
This allows you to build custom UIs, scripts, or other MCP servers that reuse RoxyBrowser logic.
roxy_list_workspaces - List all available workspaces and their projectsroxy_list_browsers - List browsers in a workspace/project with filteringroxy_create_browser - Create a browser with full configurationroxy_batch_create_browsers - Create multiple browsers in batchroxy_open_browsers - Open browsers and get CDP WebSocket endpoints for automationroxy_update_browser - Update existing browser configurationroxy_close_browsers - Close running browsers (does NOT free quota)roxy_delete_browsers - Delete browser profiles permanently (frees quota)roxy_get_browser_detail - Get detailed browser information and configurationroxy_get_connection_info - Get CDP endpoints and PIDs for opened browsersroxy_clear_local_cache - Clear local browser cacheroxy_clear_server_cache - Clear server-side browser cacheroxy_random_fingerprint - Randomize browser fingerprintroxy_list_labels - Get browser labels/tags for organizationroxy_list_proxies - List proxy configurations in a workspaceroxy_store_proxies - Get list of proxies you've purchased (store)roxy_create_proxy - Create a proxy configurationroxy_batch_create_proxies - Create multiple proxies in batchroxy_detect_proxy - Detect/test proxy availabilityroxy_modify_proxy - Modify existing proxy configurationroxy_delete_proxies - Delete proxy configurationsroxy_list_accounts - List platform accounts and credentials in a workspaceroxy_create_account - Create a platform accountroxy_batch_create_accounts - Create multiple accounts in batchroxy_modify_account - Modify existing accountroxy_delete_accounts - Delete accountsroxy_health_check - Server health check and workspace/browser connectivity diagnostics1. AI: "Create a browser in workspace 1 with name 'Test Browser'"
→ Uses roxy_create_browser
→ Returns browser ID ready for use
2. AI: "Open the browser I just created"
→ Uses roxy_open_browsers with the returned ID
→ Returns CDP WebSocket URL like: ws://127.0.0.1:52314/devtools/browser/xxx
3. AI: "Navigate to gmail.com, login, and send emails"
→ Uses RoxyBrowser Playwright MCP tools (browser_navigate, browser_type, browser_click, etc.)
→ RoxyBrowser Playwright MCP connects to the opened browser via CDP endpoint
4. AI: "Close the browser when done"
→ Uses roxy_close_browsers
1. AI: "Detect my proxy before creating browsers"
→ Uses roxy_detect_proxy
→ Confirms proxy is available
2. AI: "Create a browser with SOCKS5 proxy and 1920x1080 in workspace 2"
→ Uses roxy_create_browser with proxy configuration
→ Returns configured browser ID
3. AI: "Open the browser and start automation"
→ Uses roxy_open_browsers → gets CDP endpoint
→ RoxyBrowser Playwright MCP connects and begins automation
RoxyBrowser MCP is designed to work seamlessly with RoxyBrowser Playwright MCP, our customized Playwright MCP server built specifically for RoxyBrowser compatibility.
RoxyBrowser Playwright MCP is based on Microsoft's Playwright MCP with enhancements for RoxyBrowser's fingerprint browser features.
Both servers work together seamlessly when configured in your MCP client (see configuration above).
# Development mode with auto-rebuild
npm run dev
# Build for production
npm run build
Config is resolved in this order: CLI arguments > environment variables > defaults.
| Source | Options / Variables | Description |
|---|---|---|
| CLI | -H, --api-host, -k, --api-key, -t, --timeout |
Pass when starting the server |
| Env | ROXY_API_HOST, ROXY_API_KEY, ROXY_TIMEOUT |
Used when CLI option not passed |
| Defaults | apiHost: http://127.0.0.1:50000, timeout: 30000 |
Built-in defaults |
Config is read from env only; use resolveConfig() to read current effective config (env + defaults).
Error: "Failed to connect to RoxyBrowser API"
Check:
Error: "Configuration Error: API key is required"
Set the environment variable:
export ROXY_API_KEY="your_actual_api_key_from_roxybrowser"
Error: "Insufficient profiles quota" (Code 101 or 409)
Solutions:
roxy_delete_browsers (closing alone does NOT free quota)Some browsers fail to open:
roxy_list_browsers first)roxy_health_check for connectivity and health diagnosticsMIT License - see LICENSE file for details.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
{
"mcpServers": {
"roxybrowser-openapi": {
"command": "npx",
"args": [
"@roxybrowser/openapi@latest"
],
"env": {
"ROXY_API_KEY": "<YOUR_API_KEY>",
"ROXY_API_HOST": "http://127.0.0.1:50000"
}
},
"roxybrowser-playwright-mcp": {
"command": "npx",
"args": [
"@roxybrowser/playwright-mcp@latest"
],
"env": {}
}
}
}claude mcp add roxybrowser-openapi npx @roxybrowser/openapi@latest