ProBrowser
ProBrowser
面向 AI 代理的真实浏览器自动化 MCP 服务器 — 反检测
29 个工具 · 通过 CDP 连接你的真实 Opera/Chrome · 拟人化输入 · DOM + 视觉混合
功能特性 • 流水线 • 快速开始 • 使用方法 • 配置 • 架构 • 项目结构 • 反检测
🌐 语言:English | Tiếng Việt
[!WARNING] 仅在 Arch Linux 上开发与测试 内核
Linux 7.1.5-arch1-2· 桌面环境:KDE Plasma 其他发行版/桌面环境未经测试——效果可能因人而异。
这是一个 MCP 服务器,让 AI 代理(Kilo、Claude Code、…)能够通过模型上下文协议(Model Context Protocol)控制用户的真实浏览器。不使用无头模式,不创建一次性配置文件——代理通过 CDP 连接到正在运行的 Opera/Chrome,会话、Cookie 和登录状态全部保留,然后以拟人化时序和 DOM 优先/视觉回退策略驱动浏览器。
✨ 功能特性
功能特性 | 描述 |
🔌 真实浏览器控制 |
|
🧰 29 个 MCP 工具 | 导航、标签页、点击/输入/悬停/键盘、滚动、拖放、DOM/文本提取、JS eval、3 种截图变体、CAPTCHA 工具包、系统检测。 |
🕒 拟人化输入 | 高斯分布的按键间隔(45–75 WPM)、自然的 mousedown↔mouseup 间隙、三次方缓出滚动——以时序中间件形式分层实现,零 JS 注入。 |
🔍 DOM + 视觉混合 | 首先进行结构化 DOM 提取( |
🎯 位置校验 | 在任何坐标点击之前:带红色 X/Y 轴的标注截图,轴精确相交于原点 O=(x,y),并附元素探针和警告( |
🧩 CAPTCHA 工具包 | 导航后自动检测 reCAPTCHA/hCaptcha/Turnstile/Cloudflare;通过代理视觉进行图像网格求解( |
🗂️ 标签页管理 | 列出 / 切换 / 打开 / 关闭标签页——在同一个真实浏览器上完成多标签页工作流。 |
🚨 可操作错误 | 每次失败都会返回结构化信息 |
📚 自带文档 |
|
✅ 经过测试 | 87 个单元测试(模拟页面,无需浏览器)+ 真实浏览器集成测试套件( |
Related MCP server: selenium-mcp
🏭 流水线
┌──────────┐ ┌────────────┐ ┌─────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ CONNECT │ → │ ORIENT │ → │ SEE │ → │ PLAN │ → │ ACT │ → │ VERIFY │
│ check_ │ │ navigate + │ │ screenshot │ │ selector │ │ click / │ │ re-read │
│ browser │ │ wait idle │ │ get_dom │ │ or coords│ │ type │ │ state │
└──────────┘ └────────────┘ └─────────────┘ └──────────┘ └──────────┘ └──────────┘
│ │
▼ not running ▼ DOM miss
┌──────────────┐ ┌──────────────────────────┐
│ open_browser │ │ validate_position(x, y) │
│ (real profile│ │ → annotated O=(x,y) shot │
│ + CDP flag) │ │ → click_position(x, y) │
└──────────────┘ └──────────────────────────┘工具执行流程(示例:browse_click):
agent call → pre-click Gaussian delay (~80ms)
→ PhantomWright Actionability Engine (visible? enabled? stable? unobscured?)
→ CDP Input.dispatchMouseEvent (trusted gesture, NOT element.click())
→ post-click pause (~150ms)
→ result JSON (+ optional verification screenshot)每次 browse_navigate / browse_wait 之后都会自动运行 CAPTCHA/广告遮罩扫描。
🚀 快速开始
前提条件
Arch Linux(开发/测试平台)— 内核
7.1.5-arch1-2,KDE PlasmaPython 3.11+ — 用
python --version检查基于 Chromium 的浏览器 — Opera(推荐)、Chrome、Chromium 或 Brave
MCP 客户端 — Kilo CLI、Claude Code,或任何支持 MCP stdio 的客户端
安装
# 1. Clone
git clone https://github.com/YOUR_USER/probrowser.git
cd probrowser
# 2. Setup (venv + deps + verify)
./setup.sh
# ...or manually:
python -m venv .venv
.venv/bin/pip install -r requirements.txt注册到你的 MCP 客户端
kilo.json(项目根目录):
{
"mcp": {
"probrowser": {
"type": "local",
"command": ["/absolute/path/to/probrowser/.venv/bin/python", "-m", "src"],
"enabled": true,
"timeout": 120000
}
}
}Claude Code 用户:通过 .mcp.json 配置同一个服务器。重启客户端,以便加载 29 个 browse_* 工具。
首次运行
# Option A — start Opera yourself with CDP enabled:
opera --remote-debugging-port=9222
# Option B — let the agent do it (real profile, cookies intact):
browse_check_browser() # → not connected?
browse_open_browser(browser="opera")然后直接对你的代理说:“打开 YouTube 播放 One of These Nights”——它会自行连接、导航、点击并验证播放状态。
💻 使用方法
工具分组
分组 | 工具 |
导航与标签页 |
|
交互 |
|
提取 |
|
截图 |
|
CAPTCHA |
|
系统 |
|
元工具 |
|
完整参数参考:docs/tools-reference.md,或在运行时调用 browse_help(topic="tools-reference")。
示例流程
→ browse_check_browser()
← { connected: false } # nothing on :9222 yet
→ browse_open_browser(browser="opera")
← { launched: true, profile: "~/.config/opera", cdp_url: "...:9222" }
→ browse_navigate(url="https://youtube.com/...")
← { success: true, title: "..." } # auto CAPTCHA scan ran here
→ browse_get_dom(search="One of These Nights")
← { count: 10, elements: [{type: "link", selector: "a[aria-label=...]"}] }
→ browse_click(selector="a[aria-label=...]")
← { success: true }
→ browse_eval(expression="() => {const v=document.querySelector('video'); return {paused: v.paused, time: v.currentTime}}")
← { paused: false, time: 3.1 } # verified: audio is playing 🎵独立服务器
PROBROWSER_CDP_URL=http://localhost:9222 .venv/bin/python -m src⚙️ 配置
所有运行时配置均由环境变量驱动:
变量 | 默认值 | 描述 |
|
| 启动时连接的 CDP 端点 |
|
| 每次工具调用的硬性上限(共享事件循环保护) |
|
| CAPTCHA 子系统的总开关 |
|
| 导航后自动扫描 CAPTCHA/广告 |
| — | 2Captcha API 密钥(文本挑战自动求解;网格求解基于代理视觉) |
|
| API 辅助求解的最大等待时间 |
MCP 客户端侧的设置(timeout、enabled)位于 kilo.json 中——刻意不纳入 git(参见 .gitignore)。
🏛️ 架构
┌──────────────────────────────────────────────────────────┐
│ AI Agent (Kilo / Claude Code) │
│ plan → browse_* tool call → evaluate → repeat │
└───────────────────────┬──────────────────────────────────┘
│ MCP Protocol (stdio, JSON-RPC)
▼
┌──────────────────────────────────────────────────────────┐
│ ProBrowser MCP Server (Python) │
│ tool registry (29) → action coordinator → humanize.py │
│ (Gaussian delays · WPM typing · scroll easing) │
│ analyzer/: dom_parser · hybrid_strategy · captcha │
└───────────────────────┬──────────────────────────────────┘
│ CDP — Input.dispatch* events only
▼
┌──────────────────────────────────────────────────────────┐
│ User's Real Browser (Opera/Chrome, port 9222) │
│ sessions · cookies · logins preserved │
└──────────────────────────────────────────────────────────┘关键设计决策
决策 | 理由 |
全部使用 Python | PhantomWright 与 |
PhantomWright 优先于操作系统级输入 | 无需 ydotool/xdotool/KWin 的 hack;CDP 级别事件在 Wayland 下可用,且绝不会阻塞用户输入 |
CDP 输入优先于 JS 注入 |
|
| 用户的会话就是产品本身——无需重新登录,不会丢失 Cookie |
代理负责视觉 | 服务器提取几何信息/截图;坐标由代理自己的视觉模型决定 |
📁 项目结构
probrowser/
├── main entry
│ ├── src/__main__.py # python -m src → stdio MCP loop
│ └── src/server.py # registry (29 tools) + dispatch + timeouts + captcha hooks
├── core
│ ├── src/browser/connection.py # connect_over_cdp, session persistence, page recovery
│ ├── src/browser/tab_manager.py # tab discovery / switching
│ ├── src/humanize.py # Gaussian timing middleware
│ ├── src/errors.py # classify_exception → structured error codes
│ ├── src/config.py # env-driven configuration
│ └── src/logging.py # per-action latency/success logging
├── tools (src/tools/, 29 modules)
│ ├── navigate · wait · list_tabs · switch_tab · open_tab · close_tab
│ ├── click · validate_position · click_position · type · hover · keyboard
│ ├── scroll · drag_drop
│ ├── get_dom · find · get_text · eval_js
│ ├── screenshot · screenshot_viewport · screenshot_save
│ ├── check_captcha · captcha_grid · solve_captcha
│ └── detect_browsers · check_browser · open_browser · help · list_tools
├── analyzer (src/analyzer/)
│ ├── dom_parser.py # DOM → simplified JSON (interactive + visible only)
│ ├── hybrid_strategy.py # DOM-first, vision fallback
│ └── captcha.py # CAPTCHA/ad-overlay detection
├── captcha (src/captcha/)
│ ├── grid.py # grid geometry + cropped screenshot extraction
│ └── solver.py # tile clicking + verify flow
├── docs/ # 11 topics served via browse_help()
├── tests/ # 87 unit tests + integration suite
├── AGENTS.md / CLAUDE.md # operating guide injected into agents
└── dev-phase-mcp-server.md # dev-phase principles🛡️ 反检测
浏览器规避技术栈
层 | 实现 | 详情 |
引擎 | PhantomWright(打过补丁的 Playwright 驱动) | 在驱动层隐藏 |
补丁 | 在任何页面 JS 运行前应用隐身补丁 |
|
输入 | CDP | 不是 |
会话 | 真实用户配置文件 + 真实 IP + 扩展 | 指纹的任何方面都不会改变 |
时序 | 每次操作都经过拟人化中间件 | 高斯延迟、自然的 WPM、缓动滚动 |
仍然有效的部分
你的登录状态、Cookie、扩展状态、IP 信誉、canvas/WebGL/音频指纹——一切都保持原生,因为这个浏览器是你自己的。
局限性
激进的防机器人服务(Cloudflare Turnstile、hCaptcha 行为分析)仍可能因 IP 信誉而被风控命中。回退路径:截图 + validate_position → click_position,再加上 CAPTCHA 工具包。
🧪 测试
# Unit suite — fake pages, no browser required (87 tests)
.venv/bin/python -m pytest tests/ -q
# Integration suite — needs Opera running with CDP
.venv/bin/python -m pytest tests/test_integration.py -m integrationTính năng
功能 | 描述 |
🌐 控制真实浏览器 | 通过 CDP 附加到正在运行的 Opera/Chrome — 保留 session、cookie、登录状态 |
🧰 29 个 MCP 工具 | 导航、标签页、点击/输入/悬停/键盘、滚动、拖放、DOM/文本提取、JS、截图、CAPTCHA |
🕒 模拟真人 | 按键间高斯延迟(45–75 WPM)、自然点击节奏、ease-out 滚动 |
🔍 混合 DOM + 视觉 | 优先使用结构化 DOM;缺失时才切换到截图 + 坐标 |
🎯 坐标验证 | 在点击坐标前,对图像标注 X/Y 轴并确保其准确相交于 O=(x,y) |
🧩 CAPTCHA 处理器 | 导航后自动检测;通过 agent 视觉解决网格;通过 2Captcha 自动解决 |
🚨 可操作错误 | 每个错误返回 |
✅ 经过测试 | 87 个单元测试 + 真实浏览器上的集成测试套件 |
快速安装
git clone https://github.com/YOUR_USER/probrowser.git && cd probrowser
./setup.sh # venv + dependencies + verify
opera --remote-debugging-port=9222 # hoặc để agent tự mở在 kilo.json 中声明 server(参见 快速开始),重启客户端,完成。
在 Arch Linux 上用 🎵 制作 · MIT License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceEnables AI agents to directly control your real Chrome browser with full context including login sessions, cookies, and open tabs. It provides tools for page scanning, JavaScript execution, CDP control, screenshots, and physical mouse/keyboard input for authentic browser automation.20239MIT
- AlicenseBqualityAmaintenanceEnables browser automation through the Model Context Protocol, allowing AI agents to control Chrome, Firefox, or Edge for tasks like navigation, clicking, typing, and screenshots.3948MIT

Browseagent MCPofficial
AlicenseAqualityDmaintenanceEnables AI agents to control web browsers through the Model Context Protocol, supporting navigation, clicking, typing, and screenshots.12101MIT- AlicenseNot gradedqualityCmaintenanceEnables AI agents to create and control real, isolated browser profiles with engine-level fingerprinting and per-profile proxies, providing antidetect browsing capabilities through a Model Context Protocol interface.MIT
Related MCP Connectors
Reliable web access for AI agents: smart HTTP, rotating proxies, and full-browser rendering.
Live browser debugging for AI assistants — DOM, console, network via MCP.
A paid remote MCP for AI agent browser approval MCP, built to return verdicts, receipts, usage logs,
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/momadhuynh04/probrowser'
If you have feedback or need assistance with the MCP directory API, please join our Discord server