Skip to main content
Glama

chrome-driverless(内嵌无头浏览器服务)

基于 Playwright 驱动一个有头(headed + xvfb)的持久化 Chrome,对外提供一套 MCP 风格 HTTP 接口/mcp),用于:导航、截图、点击、输入、多 Tab、多 Profile、代理切换、登录态导出(cookies / auth.json)。

它被用作本项目(ytb-dl-web)的内置浏览器 Tab:在浏览器里登录网易云 / QQ音乐 / Bilibili,登录态自动落盘,下载时被 yt-dlp 复用。


快速开始

pip install -r requirements.txt
python main.py            # 默认 0.0.0.0:9223

浏览器为持久化 context,登录态保存在 data/profiles/<name>/auth.json(也可由环境变量 BROWSER_DATA_DIR 覆盖)。

Related MCP server: Chrome DevTools MCP

环境变量

变量

说明

默认

BROWSER_DATA_DIR

持久化数据目录(profiles / auth.json / 浏览器 profile)

./data

PROFILE_NAME

启动时激活的 profile

debug

HTTP_PROXY / HTTPS_PROXY

浏览器代理(可空;留空则不启用代理)

NO_PROXY

直连白名单(逗号分隔)

localhost,127.0.0.1

REMOTE_DEBUG_PORT

Chrome CDP 调试端口(供 job 脚本 connectOverCDP)

9222

EXTERNAL_URL

外部访问地址(仅日志 / /debug/url 展示)

代理默认留空,需要代理时通过环境变量注入,避免把固定地址写进代码(已清理历史敏感默认值)。

HTTP 接口

  • GET / —— Web 控制台(内置 tab 页面,支持 中 / 英 切换,暗色界面)

  • GET /health

  • POST /mcp —— MCP 方法调用,body {"method":"pw/...","params":{...}}

常用 MCP 方法

方法

说明

pw/init_browser

初始化 / 复用持久化浏览器

pw/navigate, pw/back, pw/reload

导航 / 回退 / 刷新(返回截图)

pw/screenshot

当前页截图(base64)

pw/click, pw/type, pw/key, pw/clear

点击 / 输入 / 按键 / 清空输入

pw/elements

列出可交互元素(id / selector / 坐标)

pw/tabs, pw/tab_select, pw/tab_close, pw/tab_close_all

浏览器多 Tab 管理

pw/profile_list, pw/profile_set

多 Profile 隔离登录态

pw/save_auth

将当前登录态导出为 auth.json

pw/set_proxy

开关浏览器代理

pw/ai_task

交给大模型按步完成页面任务

pw/evaluate

在当前页执行 JS

嵌入到 ytb-dl-web 主界面

  1. 通过 docker-compose / all-in-one 镜像运行本服务,暴露端口 9223

  2. 在 ytb-dl-web 设置 CHROME_DRIVERLESS_URL=http://<host>:9223

  3. 打开 ytb-dl-web 主界面,点导航栏 🛩️ 内置浏览器,即在页面内以 Tab 形式打开本控制台。

  4. 在此浏览器中登录各平台一次,登录态自动保存;下载时被 yt-dlp 复用。

本服务自身无外部 LDAP 登录(已移除历史硬编码外部认证域名 / 内网地址 / 私有仓库镜像引用),作为内网/嵌入式工具直接使用。若需访问控制,请在前置反向代理上加。


声明

仅用于个人学习 / 自用自动化。请遵守各网站的服务条款。

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    A web browser automation server that allows AI assistants to control Chrome with persistent state management, enabling complex browsing tasks through asynchronous browser operations.
    2
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI coding assistants to control and inspect a live Chrome browser through DevTools for automated testing, performance analysis, debugging, and web scraping. Provides reliable browser automation using Puppeteer with comprehensive DevTools access.
    3,288,165
    3
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI coding assistants to control and inspect a live Chrome browser for automation, debugging, performance analysis, network monitoring, and DOM interaction through Chrome DevTools Protocol.
    3,288,165
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI coding assistants to control a persistent Chrome browser through DevTools Protocol. Supports web navigation, screenshots, element interaction, mobile testing, console logs, and network debugging in a stable Docker environment.
    10
    7
    MIT

View all related MCP servers

Related MCP Connectors

  • AI-powered browser automation — navigate, click, fill forms, and extract data from any website.

  • Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.

  • Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…

View all MCP Connectors

Latest Blog Posts

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/friddle/chrome-driverless'

If you have feedback or need assistance with the MCP directory API, please join our Discord server