agy-browse
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
agy-browse
agy-browse 是为 Google Antigravity 打造的本地真实浏览器协同与自动化 MCP 插件套件(架构受 anomalyco/browse 启发)。
通过轻量本地 Relay 服务、Chrome/Edge MV3 扩展以及 Stdio MCP Server,Agent 可以在保留你原有浏览器登录态、Cookie 与扩展生态的前提下安全接管指定标签页,执行无障碍快照、表单交互、网络与控制台排查,并在遇到登录、2FA、人机验证或关键确认时无缝交由人工接管(Handoff)。
系统架构
Antigravity Agent
│ (Stdio MCP JSON-RPC 2.0)
▼
@agy-browse/cli (`bin.mjs mcp`)
│ (Loopback HTTP + Bearer Token, 自动拉起 Relay)
▼
@agy-browse/relay (127.0.0.1:19978 / 19980..19987)
├── 路由与工具分发: @agy-browse/relay + @agy-browse/page
│ (WebSocket /extension · ECDH P-256 + HKDF-SHA256 + HMAC-SHA256)
▼
@agy-browse/extension (Chrome / Edge MV3 Extension)
│ (`chrome.debugger` CDP 1.3 + `chrome.tabs` / `chrome.tabGroups`)
▼
真实 Chromium / Edge 标签页Monorepo 包职责
包名 | 目录 | 职责说明 |
|
| 冻结常量( |
|
| 隐身隔离世界执行、可访问性快照与 |
|
| 本地 HTTP/WS 中继服务、配对码与浏览器凭证管理、Host/Origin/Bearer/CDP 安全护栏、标签页生命周期与借出/归还/Handoff 调度 |
|
| CLI 命令入口( |
|
| Chrome/Edge MV3 扩展(基于 vercel-labs/ui |
Related MCP server: uisight
快速安装到 Antigravity
1. 构建项目
在仓库根目录执行(需 Node.js >= 20 与 pnpm):
pnpm install
pnpm build2. 安装 Antigravity 原生插件
运行 CLI 安装器将 agy-browse 插件(含 plugin.json、mcp_config.json、rules/AGENTS.md、skills/agy-browse/SKILL.md)安装到 Antigravity 插件目录(仓库提供 mcp_config.example.json 作为脱敏模板,运行 install 时会自动按你的本机绝对路径生成实际 mcp_config.json):
node packages/cli/dist/bin.mjs install --all支持的选择性安装参数:
--workspace:仅安装到当前工作区.agents/plugins/agy-browse/--global:仅安装到用户全局~/.gemini/config/plugins/agy-browse/--t3:仅安装到本机检测到的C:\Users\<user>\.t3\userdata\providers\antigravity\*\config\plugins\agy-browse\--all:同时安装到上述全部 Antigravity 插件目录(不加参数时默认等效--all)
安全边界:
agy-browse install仅操作工作区.agents/plugins/与本机 Antigravity 配置目录,绝不触碰~/.claude.json、~/.claude/settings.json或全局CLAUDE.md。
卸载插件(可选附带 --stop-relay 停止后台 Relay):
node packages/cli/dist/bin.mjs uninstall --all --stop-relay加载浏览器扩展与配对
1. 加载未打包扩展
打开 Chrome 或 Edge,访问
chrome://extensions/(Edge 为edge://extensions/)。开启右上角 开发者模式(Developer mode)。
点击 加载已解压的扩展程序(Load unpacked),选择目录:
<repo>/packages/extension/dist由于扩展
manifest.json固定了"key"公钥,加载后扩展 ID 恒定为:fhcpdokjkfalpaafjnfbncjcjholhanb
2. 配对连接
在终端执行:
node packages/cli/dist/bin.mjs pairCLI 会自动确保本地 Relay 启动并生成一次性 8 位配对码(格式 XXXX-XXXX,有效期 10 分钟),同时输出一键配对地址:
chrome-extension://fhcpdokjkfalpaafjnfbncjcjholhanb/settings.html#code=XXXX-XXXX&port=19978打开上述扩展设置页(或从扩展图标右键 选项 进入),填入配对码并点击 配对并连接 即可。可使用 --wait 参数等待新浏览器完成连接:
node packages/cli/dist/bin.mjs pair --wait查看/撤销已配对浏览器:
node packages/cli/dist/bin.mjs pair --list
node packages/cli/dist/bin.mjs pair --revoke <browserId>全部 24 个 MCP 工具一览
控制与管理(Relay 层)
工具名称 | 属性 | 核心参数 | 功能说明 |
| 只读 |
| 查询 Relay 健康状态、已连接浏览器、活动/借出标签页及扩展设置 |
| 读写 |
| 列出、打开、关闭/收回、聚焦、更新选项、分组/取消分组或清理标签页 |
| 读写 |
| 发起人工接管、等待用户点击继续或由 Agent 主动结束等待 |
| 读写 |
| 读取或修改扩展与 Relay 运行偏好(放置位置、分组模式、空闲回收、静音等) |
导航、快照与页面交互(Page 层)
工具名称 | 属性 | 核心参数 | 功能说明 |
| 读写 |
| 跳转到指定 URL 或执行前进、后退、刷新并等待加载状态 |
| 只读 |
| 在隔离世界中生成紧凑可访问性树并分配稳定引用(如 |
| 读写 |
| 点击引用元素、CSS 选择器元素或指定视口坐标(含遮挡检查) |
| 读写 |
| 清空并填充输入框/文本域(密码与 OTP 字段返回值自动脱敏) |
| 读写 |
| 逐字符模拟键盘输入并触发完整按键事件 |
| 读写 |
| 发送单键或组合快捷键(如 |
| 读写 |
| 选择 |
| 读写 |
| 将鼠标悬停到指定元素上方 |
| 读写 |
| 执行元素或坐标之间的拖拽操作 |
| 读写 |
| 按方向、像素偏移滚动页面/容器,或将元素滚动到可视区域 |
| 只读 |
| 等待元素状态、页面文本、URL 匹配、加载事件或固定时长 |
| 读写 |
| 查看、确认或取消 JS |
| 读写 |
| 将 |
| 读写 |
| 在页面上下文执行 JS 表达式并返回可 JSON 序列化的结果 |
调试取证、环境模拟与批量执行
工具名称 | 属性 | 核心参数 | 功能说明 |
| 只读 |
| 捕获视口、整页或单个元素的截图 |
| 只读 |
| 导出页面 PDF(返回 Base64 或写入允许的输出路径) |
| 只读 |
| 查看或清空网络请求与响应详情(敏感凭据自动脱敏) |
| 只读 |
| 查看或清空浏览器控制台日志与未捕获异常 |
| 读写 |
| 模拟视口尺寸、深浅色主题、时区、语言、地理位置、UA 或离线状态 |
| 读写 |
| 按顺序批量执行多个 |
典型工作流
1. 人工接管(browse_handoff)
当遇到需要登录、短信/OTP 双因素认证、CAPTCHA/Turnstile 人机验证或高风险付款确认时,Agent 不会尝试绕过验证,而是发起接管:
Agent 调用
browse_handoff(action: "start",message: "请完成登录后点击继续")。扩展自动展开对应标签组,在页面右下角注入隔离 Shadow DOM 浮动卡片(徽章变为
WAIT琥珀色),并可选发送桌面通知。你在页面完成登录或验证后,亲自点击浮动卡片上的「继续」按钮(扩展仅接受
event.isTrusted === true的真实用户点击)。Agent 自动解除阻塞并重新抓取页面快照继续执行。
2. 工具栏借出与随时收回(ON / RUN / WAIT)
除了由 Agent 打开新标签页外,你也可以直接点击浏览器工具栏上的 Antigravity Browse 扩展图标,将当前所在网页借出给 Agent:
无徽章:普通用户标签页,Agent 完全不可见、不可触碰。
ON(翠绿#10b981):已借出给 Agent,当前处于空闲待命状态。RUN(天蓝#3b82f6):Agent 正在该标签页上执行操作。WAIT(琥珀#f59e0b):处于browse_handoff等待用户接管状态。随时一键收回:任务进行中或结束后,再次点击工具栏扩展图标即可立即
detach收回控制权;即使 Agent 对借出标签页调用close,Relay 也只会安全收回而不会关闭你的标签页。
安全模型与环境变量
多层安全防线
非对称密钥绑定 + ECDH 前向安全双向认证:
配对码采用 8 位抗混淆字符集(10 分钟过期),连续错误 5 次立即作废所有待配对码。
握手基于 Web Crypto ECDH P-256 + HKDF-SHA256 + HMAC-SHA256,派生并持久化每浏览器独立密钥。
本地回环隔离与 CSRF 防护:
Relay 仅监听
127.0.0.1(默认19978,占用时回退19980..19987)。所有受保护 HTTP 端点校验
Authorization: Bearer <token>(0o600权限持久化)、Host回环白名单及跨站Origin/Sec-Fetch-Site拦截。WebSocket
/extension严格校验chrome-extension://fhcpdokjkfalpaafjnfbncjcjholhanb及显式允许的扩展源。
浏览器与页面护栏:
CDP 危险指令黑名单拦截(禁止
Browser.close、Browser.crash、全局清除 Cookie/缓存、修改权限等)。危险协议拦截(禁止
chrome://、edge://、chrome-extension://、devtools://、javascript:、view-source:、text/htmldata URL,默认禁止file://)。readOnly只读模式、allowedOrigins来源限制与FILE_ROOTS文件路径防穿越检查。凭据脱敏:
browse_fill对密码/OTP 字段遮蔽日志输出;browse_network对认证请求头、Cookie、URL 查询参数与 JSON 密钥字段及 JWT 自动脱敏。
环境变量配置(AGY_BROWSE_*)
环境变量 | 说明 | 默认值 |
| 固定 Relay 监听端口(设置后不做端口回退) |
|
| Relay 绑定与探测主机地址 |
|
| Relay Token、状态、配对与日志存储目录 | Windows: |
| 暴露的工具子集: |
|
| 额外允许连接 | 仅 |
| 允许 | 当前工作目录与系统临时目录 |
| 是否允许导航至 |
|
| 是否允许打开或切至前台焦点标签页( |
|
| 是否默认启用拟真贝塞尔指针轨迹与输入延迟( |
|
| Agent 打开的空闲标签页自动清理超时时间(毫秒) |
|
| Relay 等待扩展执行单条指令的超时时间(毫秒) |
|
开发、测试与 CLI 常用命令
Workspace 开发命令
# 全量构建所有子包(protocol -> page -> relay -> cli -> extension)
pnpm build
# 全量 TypeScript 类型检查
pnpm typecheck
# 运行全量单元测试
pnpm test
# 清理构建产物
pnpm cleanCLI 常用命令
# 前台启动 Relay 服务(可指定端口与主机)
node packages/cli/dist/bin.mjs serve --port 19978 --host 127.0.0.1
# 启动 Stdio MCP Server(供 Antigravity 等 MCP 客户端调用)
node packages/cli/dist/bin.mjs mcp
# 查看当前 Relay 与浏览器/标签页状态(支持 --json)
node packages/cli/dist/bin.mjs status --json
# 列出标签页 / 聚焦等待中的 handoff 标签页 / 列出支持工具
node packages/cli/dist/bin.mjs tabs --json
node packages/cli/dist/bin.mjs show [tab]
node packages/cli/dist/bin.mjs tools
# 直接通过 CLI 调用任意 browse_* 工具
node packages/cli/dist/bin.mjs browse_navigate --tab app --url https://example.com
node packages/cli/dist/bin.mjs browse_snapshot --tab app --interactiveOnly true
node packages/cli/dist/bin.mjs browse_tabs --json '{"action":"open","id":"app","url":"https://example.com"}'
# 停止或重启后台 Relay
node packages/cli/dist/bin.mjs stop
node packages/cli/dist/bin.mjs restartTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
LiveChat (Text) MCP server for ChatGPT, Claude and any AI agent: list chats, reply in chat, tag chat, transfer chat, archive chat and save canned response in your own LiveChat (Text) account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to LiveChat (Text) yourself; Cotlet does not store your password and you need no LiveChat (Text) API key. About the official LiveChat (Text) API: LiveChat (Text) has a full REST API, the Agent Chat API and the Configuration API, but only a narrow official MCP server (checked 17 Oct 2026). The server at mcp.text.com documents 8 tools that all read: search, fetch, chat transcripts, archived chats, tickets and tags. Setup and FAQ: https://cotlet.dev/integrations/livechat-api-mcp-server
Zendesk MCP server for ChatGPT, Claude and any AI agent: list tickets, reply to ticket, update ticket, apply macro, add internal note and search tickets in your own Zendesk account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Zendesk yourself; Cotlet does not store your password and you need no Zendesk API key. About the official Zendesk API: Zendesk has a full REST API, the Support API (also called the Ticketing API), but no documented Zendesk-hosted MCP server for working tickets (checked 16 Oct 2026). Zendesk's MCP documentation covers the MCP client, where Zendesk calls other servers. Setup and FAQ: https://cotlet.dev/integrations/zendesk-api-mcp-server
Freshchat MCP server for ChatGPT, Claude and any AI agent: list conversations, read conversation, send reply, assign conversation, resolve conversation with label, list canned responses and get CSAT report in your own Freshchat account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Freshchat yourself; Cotlet does not store your password and you need no Freshchat API key. About the official Freshchat API: Freshchat has a REST API (v2) but no official MCP server (checked 22 Oct 2026). Freshworks' MCP integration covers Freshdesk and Freshservice, and its docs do not list Freshchat. Setup and FAQ: https://cotlet.dev/integrations/freshchat-api-mcp-server
Zammad MCP server for ChatGPT, Claude and any AI agent: search tickets, update ticket, reply to customer, add internal note, run macro and merge tickets in your own Zammad account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Zammad yourself; Cotlet does not store your password and you need no Zammad API key. About the official Zammad API: Zammad has a full REST API but no official MCP server (checked 22 Oct 2026). The API docs say it allows all operations the UI has, and it needs an access token or OAuth set up on your own instance, which an admin can switch off. Setup and FAQ: https://cotlet.dev/integrations/zammad-api-mcp-server
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceGives an agent a real, watchable Chrome window to open and read pages, click and type, take screenshots, and inspect console messages, network requests, and script output. It also records performance traces and runs Lighthouse audits, with each chat getting its own browser that closes when the chat ends.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables an agent and a human to share the same live mobile and desktop browser sessions while measured UI findings — contrast ratios, touch-target sizes, overflow, clipping, and theme drift — come back as precise selector-attached text rather than screenshot guesses. It also lets the agent navigate, tap, type, scroll, switch device profiles and light/dark themes, and read the notes a person pinned to a specific frame.155 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to attach to a real Chrome or Edge session over CDP and drive it through accessibility-tree snapshots, stable element refs, ref-based actions, and advisory screenshot/coordinate tools for canvas or sparse pages. It supports compact snapshot, act, snapshot workflows for forms, dashboards, and logged-in or geo-correct browsing.MIT
- AlicenseNot gradedqualityAmaintenanceLets AI agents drive the user's real Chromium browser, including opening and controlling tabs, taking screenshots, capturing network traffic, recording screen activity, and handing control back for logins or payments while using the user's existing sessions, logins, and extensions.1,134MIT