local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Allows retrieving information about and controlling currently open Chrome tabs, including listing all open tabs with their titles and URLs, and closing specific tabs by window and tab indices.
Designed specifically for macOS due to its dependency on AppleScript for interacting with Chrome tabs.
MCP 浏览器标签页
用于检索和管理 Chrome 浏览器标签页信息的模型上下文协议服务器。这使得 Claude Desktop(或任何 MCP 客户端)能够获取当前打开的 Chrome 标签页信息并进行控制。
快速入门(针对用户)
要将此工具与 Claude Desktop 一起使用,只需将以下内容添加到您的 Claude Desktop 配置( ~/Library/Application Support/Claude/claude_desktop_config.json
)中:
这将在需要时自动下载并运行该工具的最新版本。
所需设置
- 启用 Chrome 的辅助功能:
- 打开系统设置
- 前往“隐私和安全”>“辅助功能”
- 点击“+”按钮
- 从“应用程序”文件夹添加 Google Chrome
- 打开 Chrome 的开关
AppleScript 需要此辅助功能设置才能与 Chrome 标签进行交互。
对于开发人员
以下部分适用于那些想要开发或修改该工具的人。
先决条件
- Node.js 18+
- macOS(用于 AppleScript 操作)
- 谷歌浏览器
- Claude Desktop(从https://claude.ai/desktop安装)
- tsx(通过
npm install -g tsx
)
安装
可用工具
get_tabs
:从 Google Chrome 浏览器中检索所有打开的标签页,返回其标题和网址。标签页按窗口分组,并以“窗口 1-1”(窗口 1,标签页 1)的格式显示。close_tab
:使用窗口和标签索引关闭 Google Chrome 中的特定标签。- 参数:
- windowIndex:窗口编号(从1开始)
- tabIndex:窗口内的标签编号(从1开始)
- 注意:关闭多个标签页时,请从索引号最高的标签页开始操作,以避免索引偏移。关闭标签页后,请使用 get_tabs 确认更改。
- 参数:
笔记
- 由于依赖于 AppleScript,此工具仅适用于 macOS。
- 需要安装并运行 Google Chrome。
- 必须授予 Chrome 可访问权限。
执照
MIT 许可证 - 详情请参阅许可证文件
You must be authenticated.
通过 MCP 协议实现与 Google Chrome 标签页的交互,允许客户端使用 AppleScript 检索信息并控制 macOS 上的标签页。