browser-test-mcp
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., "@browser-test-mcpOpen https://example.com and verify the heading says 'Example Domain'"
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.
browser-test-mcp
Playwright × browser-use 共生浏览器自动化测试 MCP Server
把两个顶级开源项目融合为一个 MCP server:AI 智能决策与精确测试执行共生,两层工具操作同一个浏览器实例,随时无缝切换。
┌──────────────────────────────────────────────────────────┐
│ browser-test MCP(单进程,59 个工具) │
│ │
│ AI 层:browser-use(官方代码原封不动,16 个工具) │
│ browser_navigate / browser_click / browser_type / │
│ browser_get_state / retry_with_browser_use_agent ... │
│ ──────────────────────────────────────────────────────── │
│ 精确层:playwright-python(官方 API 薄封装,43 个工具) │
│ pw_navigate / pw_fill / pw_click / pw_assert_* │
│ pw_wait_* / pw_screenshot / pw_network / pw_trace ... │
│ ──────────────────────────────────────────────────────── │
│ 共享会话:playwright 启动 chromium(CDP 调试端口) │
│ browser-use 通过 cdp_url 连接同一浏览器实例 │
└──────────────────────────────────────────────────────────┘核心特性
共生:AI 层(browser-use)自主探索复杂页面,精确层(Playwright)做确定性操作与断言——两层共用同一浏览器、同一页面,随时切换
测试完整:导航、填表、点击、断言(文本/可见/URL/数量)、等待、网络捕获、截图、登录态复用、trace 调试
内置 stealth 反检测:自研零依赖模块,10 个维度伪装(webdriver/plugins/userAgentData/chrome 对象/canvas/WebGL/Client Hints…),bot.sannysoft.com 专业检测站零失败项
无头默认:后台跑测试不弹窗(
BROWSER_TEST_HEADLESS=0可开有头)不改上游一行代码:融合全部通过组合 + 运行时配置注入实现
Related MCP server: MCP Playwright Server
快速开始
pip install -r requirements.txt
playwright install chromium # 首次下载浏览器(可选:channel=chrome 用系统 Chrome)
python server.py # 直接跑(stdio 模式)注册到任意 MCP 客户端
// Claude Desktop / Cursor / Reasonix 等
{
"mcpServers": {
"browser-test": {
"command": "python",
"args": ["/path/to/browser-test-mcp/server.py"],
"env": {
"OPENAI_API_KEY": "sk-...", // AI 层 Agent 需要(可选)
"OPENAI_BASE_URL": "https://api.deepseek.com", // OpenAI 兼容 provider(可选)
"BROWSER_USE_LLM_MODEL": "deepseek-v4-flash", // AI 层模型(可选)
"BROWSER_TEST_HEADLESS": "1" // 1=无头(默认)0=有头
}
}
}
}冒烟测试
PYTHONIOENCODING=utf-8 python test_smoke.py # 59 工具 + 共享会话验证
python test_fusion.py # 两层交叉操作验证工具清单
AI 层(browser-use,16 个):browser_navigate、browser_click、browser_type、browser_get_state、browser_extract_content、browser_get_html、browser_screenshot、browser_scroll、browser_go_back、browser_list_tabs、browser_switch_tab、browser_close_tab、browser_list_sessions、browser_close_session、browser_close_all、retry_with_browser_use_agent
精确层(Playwright,43 个):
类别 | 工具 |
浏览器 |
|
导航 |
|
页面 |
|
元素 |
|
读取 |
|
等待 |
|
断言 |
|
网络 |
|
登录态 |
|
调试 |
|
环境变量
变量 | 默认 | 说明 |
|
| 无头模式; |
|
| CDP 调试端口(browser-use 连接用) |
| Chrome/150 | UA 覆盖(可改) |
| 空 | 用系统浏览器: |
| 无 | AI 层 LLM |
| 空 | OpenAI 兼容 provider 地址 |
| 空 | AI 层模型名 |
|
|
|
|
|
|
|
|
|
标准测试工作流
1. pw_navigate(url) 打开被测页面
2. pw_wait_for_selector / pw_assert_url 确认页面就绪
3. pw_fill(selector, value) 填表单
4. pw_click(selector) 触发交互
5. pw_wait_for_response / pw_wait_for_url 等待结果(接口/跳转)
6. pw_assert_text / pw_assert_* 断言,记录 PASS/FAIL
7. pw_screenshot 留证
8. pw_close_browser 清理页面复杂时用 retry_with_browser_use_agent 交给 AI 智能体自主完成,再用精确层断言。
反爬对抗
内置 stealth.py 反检测模块(零第三方依赖),自动注入 10 个维度伪装:
navigator.webdriver、plugins(真实 PluginArray)、userAgentData、languages/platform/硬件参数、window.chrome(含 iframe)、canvas 噪声、WebGL 参数、permissions、Client Hints 头(UA + Sec-CH-UA 一致性)、locale/timezone。
✅ bot.sannysoft.com 专业 WebDriver 检测站:零失败项
⚠️ 能力边界:百度等顶级风控为服务端模型判定,对自动化环境会降级隐藏交互元素(实测多层对抗后仍被识别)。对策:自家/中小站点直接可用;强风控大站用有头模式 + 持久化 profile 养号,或连真实用户浏览器会话
📌 合规:仅用于自己/授权项目的自动化测试
文件结构
browser-test-mcp/
├── server.py # MCP stdio 入口
├── fusion_server.py # 融合层:官方 AI 层工具 + 精确层工具合并
├── pw_bridge.py # Playwright 精确层(43 工具 + 浏览器生命周期)
├── stealth.py # 自研反检测模块
├── requirements.txt
├── skill/SKILL.md # Reasonix skill 手册
├── test_smoke.py # stdio 冒烟测试(59 工具 + 共享会话断言,CI 使用)
└── test_fusion.py # 两层交叉操作测试上游
microsoft/playwright(Apache-2.0)
microsoft/playwright-python(Apache-2.0)
本项目为两者功能的融合封装(组合 + 运行时注入,不改上游源码),License: MIT
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
- AlicenseBquality-maintenanceA MCP server that provides browser automation tools, allowing users to navigate websites, take screenshots, click elements, fill forms, and execute JavaScript through Playwright.Last updated82
- Alicense-qualityDmaintenanceAn MCP server that enables AI-powered browser automation, web scraping, and testing using Playwright across Chromium, Firefox, and WebKit. It allows users to perform actions like navigation, clicking, typing, and taking screenshots through natural language interfaces.Last updated14MIT
- AlicenseBqualityDmaintenanceA universal browser automation MCP server using Playwright, enabling programmatic control of Chrome with 63 tools for navigation, interaction, media control, and CDP-based diagnostics.Last updated63251MIT
- Alicense-qualityDmaintenanceA comprehensive browser automation MCP server using Playwright, offering 50+ tools for page control, element interaction, content extraction, and more across multiple browser engines.Last updated341MIT
Related MCP Connectors
A paid remote MCP for AI agent browser approval MCP, built to return verdicts, receipts, usage logs,
Live browser debugging for AI assistants — DOM, console, network via MCP.
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
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/l0s3r-Q/browser-test-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server