octo-mcp

octo-mcp

Controls Octo Browser antidetect profiles and automates browser tasks through natural language, enabling profile lifecycle management, web scraping, and full browser automation via CDP.

Category
访问服务器

README

<div align="center">

Octo Browser MCP Server

Control antidetect browser profiles with AI through the Model Context Protocol

Python 3.10+ MCP License: MIT Octo Browser Playwright

Installation · Quick Start · Tools Reference · Examples · Architecture

</div>


Why This Exists

Managing hundreds of antidetect browser profiles manually is tedious. This MCP server bridges Octo Browser and AI assistants (Claude Code, Cursor, etc.), enabling natural language control over browser profiles and full browser automation through CDP.

Instead of clicking through UIs or writing scripts, just tell your AI:

"Start profile 5249_US, go to google.com, and take a screenshot"

The AI handles the rest -- finding the profile, launching it, connecting via CDP, navigating, and capturing the result.

Key Features

  • Profile Lifecycle -- Start, stop, find, and manage Octo Browser profiles via Local and Cloud APIs
  • Browser Automation -- Full Playwright-based control: navigate, click, type, scroll, screenshot
  • Dual API Support -- Local API (port 58888) for profile control + Cloud API for search and management
  • One-Time Profiles -- Temporary profiles that self-destruct after use (ideal for scraping)
  • Multi-Tab Control -- Open, switch, and close browser tabs programmatically
  • Remote/Docker Ready -- Automatic WebSocket URL rewriting for non-localhost setups
  • Rate Limit Handling -- Built-in retry with exponential backoff for API throttling

Architecture

┌─────────────────────────────────────────────────────┐
│                   AI Assistant                       │
│              (Claude Code / Cursor)                  │
└──────────────────────┬──────────────────────────────┘
                       │ MCP Protocol (stdio)
┌──────────────────────▼──────────────────────────────┐
│              octo-mcp Server                         │
│  ┌─────────────┐ ┌──────────────┐ ┌──────────────┐  │
│  │   server.py  │ │ octo_client  │ │browser_manager│ │
│  │  34 MCP Tools│ │  Local+Cloud │ │  Playwright   │ │
│  └──────┬───────┘ └──────┬───────┘ └──────┬───────┘  │
└─────────┼────────────────┼────────────────┼──────────┘
          │                │                │
    ┌─────▼────┐   ┌──────▼──────┐  ┌──────▼──────┐
    │ MCP SDK  │   │  Octo APIs   │  │  CDP / WS   │
    │  stdio   │   │ :58888 Cloud │  │  Playwright │
    └──────────┘   └──────┬───────┘  └──────┬──────┘
                          │                 │
                   ┌──────▼─────────────────▼──────┐
                   │        Octo Browser           │
                   │   (antidetect Chromium)        │
                   └───────────────────────────────┘

Installation

From Source

git clone https://github.com/mazamakasa/octo-mcp.git
cd octo-mcp
pip install -e .
playwright install chromium

From PyPI (coming soon)

pip install octo-mcp
playwright install chromium

Prerequisites

  • Python 3.10+
  • Octo Browser installed and running (download)
  • Playwright Chromium (installed via playwright install chromium)

Quick Start

1. Add to Claude Code

# Minimal setup (Local API only -- start/stop profiles by UUID)
claude mcp add octo-mcp -- octo-mcp

# Full setup (+ Cloud API for searching profiles by name)
claude mcp add octo-mcp \
  -e OCTO_USERNAME="your@email.com" \
  -e OCTO_PASSWORD="your_password" \
  -e OCTO_API_TOKEN="your_api_token" \
  -- octo-mcp

2. Or add to .claude/settings.json manually

{
  "mcpServers": {
    "octo-mcp": {
      "command": "octo-mcp",
      "env": {
        "OCTO_USERNAME": "your@email.com",
        "OCTO_PASSWORD": "your_password",
        "OCTO_API_TOKEN": "your_api_token"
      }
    }
  }
}

3. Restart Claude Code and verify

Ask Claude: "Check if Octo Browser is running" -- it will use octo_health_check.

Getting Your API Token

  1. Open Octo Browser app
  2. Go to Settings → API
  3. Copy your API token

The API token is only needed for Cloud API operations (searching profiles by name, managing tags/proxies/extensions). Basic profile start/stop works without it.

Environment Variables

Variable Description Default
OCTO_HOST Octo Browser host (for remote/Docker setups) localhost
OCTO_PORT Local API port 58888
OCTO_USERNAME Account email for auto-login --
OCTO_PASSWORD Account password for auto-login --
OCTO_API_TOKEN Cloud API token (for search, tags, proxies) --

Tools Reference (34 tools)

Profile Management (Local API)

Tool Description
octo_health_check Check Octo Browser API availability and version
octo_list_profiles List all active (running) profiles with their WebSocket endpoints
octo_start_profile Start a profile by UUID; returns ws_endpoint for CDP connection
octo_stop_profile Gracefully or forcefully stop a running profile
octo_start_one_time_profile Create a temporary profile (auto-deleted on stop); supports OS selection

Profile Search & Management (Cloud API)

Tool Description
octo_find_profile_by_name Find a profile by exact or partial name match
octo_start_profile_by_name Find profile by name and start it (combines find + start)
octo_search_profiles Search profiles by name, tags, status; supports sorting and pagination
octo_get_profile Get full profile data: fingerprint, proxy, extensions, tags

Team Resources (Cloud API)

Tool Description
octo_get_extensions List all team browser extensions (name, version, UUID)
octo_delete_extensions Delete team extensions by UUID
octo_get_tags List all profile tags (name, color, UUID)
octo_get_proxies List all saved proxies (type, host, port, UUID)

Browser Connection

Tool Description
browser_connect Connect to a running profile via CDP WebSocket endpoint
browser_disconnect Disconnect from browser (does not stop the Octo profile)

Navigation

Tool Description
browser_navigate Navigate to URL with configurable wait strategy (load, domcontentloaded, networkidle)
browser_get_url Get the current page URL
browser_go_back Navigate back in history
browser_go_forward Navigate forward in history
browser_reload Reload the current page

Page Interaction

Tool Description
browser_click Click by CSS selector or (x, y) coordinates; supports right-click, double-click
browser_type Type text into an element (via fill) or simulate keystrokes with delay
browser_press_key Press a keyboard key (Enter, Tab, Escape, ArrowDown, etc.)
browser_scroll Scroll page or specific element in any direction
browser_hover Hover over an element (useful for dropdowns and tooltips)
browser_select Select an option in a <select> dropdown

Information Extraction

Tool Description
browser_screenshot Capture screenshot of full page or specific element (returns PNG image)
browser_get_text Extract text content from an element
browser_get_html Get innerHTML or outerHTML of element, or full page HTML
browser_get_attribute Get any attribute value from an element
browser_query_selector_all Find all matching elements with their tag, text, class, bounds
browser_wait_for_selector Wait for element to appear/disappear with configurable timeout

JavaScript Execution

Tool Description
browser_evaluate Execute arbitrary JavaScript and return the result

Tab Management

Tool Description
browser_list_tabs List all open tabs with title, URL, and active status
browser_switch_tab Switch to a tab by index
browser_new_tab Open a new tab, optionally navigating to a URL
browser_close_tab Close the current tab

Usage Examples

Start a profile by name and automate

You: Start profile "work_US" and check my IP on whatismyipaddress.com

Claude: I'll start the profile, connect to it, and check your IP.

→ octo_start_profile_by_name(name="work_US")
  Profile 'work_US' (uuid: abc-123) started. ws_endpoint: ws://localhost:52341/...

→ browser_connect(ws_endpoint="ws://localhost:52341/...")
  Connected to browser.

→ browser_navigate(url="https://whatismyipaddress.com")
  Navigated to https://whatismyipaddress.com

→ browser_screenshot()
  [Screenshot showing IP address]

Your IP is 192.168.x.x (US location, matching profile proxy).

Scrape with a temporary profile

You: Create a temp profile and scrape the title from news.ycombinator.com

Claude:
→ octo_start_one_time_profile(os="win")
  Temporary profile created. UUID: tmp-456. ws_endpoint: ws://...

→ browser_connect(ws_endpoint="ws://...")
→ browser_navigate(url="https://news.ycombinator.com")
→ browser_evaluate(script="document.title")
  Result: "Hacker News"

→ octo_stop_profile(uuid="tmp-456")
  Profile stopped and deleted.

The page title is "Hacker News".

Manage profiles in bulk

You: Find all profiles tagged "ads" and list them

Claude:
→ octo_search_profiles(tags=["ads"], limit=50)
  Found 12 profiles:
  - ads_US_01 (UUID: ...)
  - ads_UK_02 (UUID: ...)
  ...

Check fingerprint configuration

You: Show me the fingerprint details for profile "5249_US"

Claude:
→ octo_find_profile_by_name(name="5249_US")
→ octo_get_profile(uuid="found-uuid")

  Profile: 5249_US
  Fingerprint:
    OS: win
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)...
    Screen: 1920x1080
  Proxy: socks5://proxy.example.com:1080
  Extensions (2):
    - uBlock Origin v1.55
    - EditThisCookie v1.6

Remote / Docker Setup

When Octo Browser runs on a different machine, set OCTO_HOST:

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

The server automatically rewrites WebSocket URLs from 127.0.0.1/localhost to your configured host, so CDP connections work seamlessly across networks.

Requirements for remote setup:

  • Port 58888 (Local API) must be accessible
  • CDP debug ports (random, per-profile) must be accessible
  • Consider using SSH tunnel for security

Troubleshooting

Problem Solution
"Octo Browser API unavailable" Make sure Octo Browser is running. The Local API starts with the app.
"OCTO_API_TOKEN is not set" Add your API token or use octo_start_profile with UUID directly.
"Profile not found" Profile names are case-sensitive. Use octo_search_profiles to browse.
WebSocket connection fails Check that OCTO_HOST is correct and CDP ports are accessible.
"Browser not connected" Call browser_connect with the ws_endpoint from profile start.

Development

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

# Lint & format
ruff check src/
ruff format src/

# Run tests
pytest

Tech Stack

  • MCP SDK -- Model Context Protocol server framework
  • Playwright -- Browser automation via CDP (Chrome DevTools Protocol)
  • httpx -- Async HTTP client for Octo Browser APIs
  • Hatchling -- Modern Python build system

License

MIT License -- see LICENSE for details.

Author

Maksym Babenko -- GitHub · Telegram

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选