octo-mcp

mazamaka/octo-mcp

3.2

If you are the rightful owner of octo-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Octo Browser MCP Server is a Model Context Protocol server designed to enable AI assistants to control Octo Browser profiles using natural language.

Tools
5
Resources
0
Prompts
0

Octo Browser MCP Server

License: MIT Python 3.10+

MCP (Model Context Protocol) server for Octo Browser - an antidetect browser for multi-accounting. This server enables AI assistants like Claude to control Octo Browser profiles through natural language.

Features

  • Profile Management: Start, stop, and list Octo Browser profiles
  • Search by Name: Find profiles by name using Cloud API (requires API token)
  • One-Time Profiles: Create temporary profiles that are deleted after use
  • Browser Automation: Full Playwright-based browser control via CDP
  • Screenshot Capture: Take screenshots of pages or elements
  • Multi-Tab Support: Manage multiple browser tabs
  • Docker Compatible: Works with Octo Browser running in Docker or remote hosts

Installation

From PyPI

pip install octo-mcp

From Source

git clone https://github.com/anthropics/octo-mcp.git
cd octo-mcp
pip install -e .

Install Playwright

playwright install chromium

Configuration

Environment Variables

VariableDescriptionRequiredDefault
OCTO_HOSTOcto Browser hostNolocalhost
OCTO_PORTLocal API portNo58888
OCTO_USERNAMEOcto account email (for auto-login)No-
OCTO_PASSWORDOcto account passwordNo-
OCTO_API_TOKENCloud API token (for profile search by name)No-

Getting Your API Token

  1. Open Octo Browser
  2. Go to SettingsAPI
  3. Copy your API token

The API token is only needed for searching profiles by name. Basic profile operations work without it.

Usage with Claude Code

Add the MCP Server

# Basic setup (Local API only)
claude mcp add octo-mcp -- python -m octo_mcp.server

# With authentication (recommended)
claude mcp add octo-mcp \
  -e OCTO_USERNAME="your@email.com" \
  -e OCTO_PASSWORD="your_password" \
  -- python -m octo_mcp.server

# Full setup with Cloud API (enables search by profile name)
claude mcp add octo-mcp \
  -e OCTO_USERNAME="your@email.com" \
  -e OCTO_PASSWORD="your_password" \
  -e OCTO_API_TOKEN="your_api_token" \
  -- python -m octo_mcp.server

Restart Claude Code

After adding the MCP server, restart Claude Code to load the new tools.

Available Tools

Profile Management

ToolDescription
octo_health_checkCheck if Octo Browser is running
octo_list_profilesList active (running) profiles
octo_start_profileStart a profile by UUID
octo_stop_profileStop a running profile
octo_start_one_time_profileCreate and start a temporary profile

Profile Search (requires API token)

ToolDescription
octo_find_profile_by_nameFind profile by exact name
octo_start_profile_by_nameFind and start profile by name
octo_search_profilesSearch profiles by name or tags

Browser Connection

ToolDescription
browser_connectConnect to a running profile via CDP
browser_disconnectDisconnect from browser

Navigation

ToolDescription
browser_navigateGo to URL
browser_get_urlGet current URL
browser_go_backNavigate back
browser_go_forwardNavigate forward
browser_reloadReload page

Interaction

ToolDescription
browser_clickClick element or coordinates
browser_typeType text into element
browser_press_keyPress keyboard key (Enter, Tab, etc.)
browser_scrollScroll page or element
browser_hoverHover over element
browser_selectSelect option in dropdown

Information Extraction

ToolDescription
browser_screenshotTake screenshot (returns image)
browser_get_textGet element text content
browser_get_htmlGet page or element HTML
browser_get_attributeGet element attribute
browser_query_selector_allFind all matching elements
browser_wait_for_selectorWait for element to appear

JavaScript

ToolDescription
browser_evaluateExecute JavaScript and return result

Tab Management

ToolDescription
browser_list_tabsList open tabs
browser_switch_tabSwitch to tab by index
browser_new_tabOpen new tab
browser_close_tabClose current tab

Example Conversation

User: Start my profile "work_account" and go to google.com

Claude: I'll start the profile and navigate to Google.

[Uses octo_start_profile_by_name with name="work_account"]
Profile 'work_account' started.
ws_endpoint: ws://localhost:52341/devtools/browser/abc123

[Uses browser_connect with the ws_endpoint]
Connected to browser.

[Uses browser_navigate with url="https://google.com"]
Navigated to https://google.com

[Uses browser_screenshot]
[Shows screenshot of Google homepage]

The profile is now running and showing Google's homepage.

Docker / Remote Setup

If Octo Browser runs on a different host (e.g., in Docker), set the OCTO_HOST variable:

claude mcp add octo-mcp \
  -e OCTO_HOST="192.168.1.100" \
  -e OCTO_USERNAME="your@email.com" \
  -e OCTO_PASSWORD="your_password" \
  -- python -m octo_mcp.server

The server automatically rewrites WebSocket URLs from 127.0.0.1 to the configured host.

Troubleshooting

"Octo Browser API unavailable"

Make sure Octo Browser is running. The Local API starts automatically when you open the application.

"OCTO_API_TOKEN is not set"

This error appears when using octo_find_profile_by_name or octo_search_profiles without an API token. Either:

  1. Add your API token to the MCP configuration
  2. Use octo_start_profile with UUID instead (get UUID from Octo Browser UI)

"Profile not found"

The profile name must match exactly (case-sensitive). Use octo_search_profiles to find available profiles.

WebSocket connection fails

If running Octo Browser on a different host:

  1. Make sure port 58888 is accessible
  2. The CDP port (random for each profile) must be accessible
  3. Set OCTO_HOST to the correct IP address

Development

Setup

git clone https://github.com/anthropics/octo-mcp.git
cd octo-mcp
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Run Tests

pytest

Code Style

ruff check .
ruff format .

License

MIT License - see file.

Links