
webmcp-bridge
by holon-run·★ 25·综合分 44
一个通过 Playwright 将本地 MCP 客户端连接到浏览器 WebMCP 工具的桥梁,支持原生和注入式适配器。
概述
webmcp-bridge 提供了一个稳定的本地桥梁,允许 MCP 客户端调用浏览器 WebMCP 工具,当页面支持原生 WebMCP 时通过原生方式,否则通过注入式适配器。它将执行保持在浏览器中,在那里已经存在站点认证和人类-AI 协作等功能,同时向本地客户端暴露标准的 stdio MCP 接口。该架构支持无头自动化和用于协作工作流的可见浏览器窗口。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要 MCP 访问仅限浏览器的服务,或希望人类与 AI 通过同一身份验证的浏览器会话协作时,选择 webmcp-bridge。
什么时候不要选它
如果您需要持久化的凭据管理,或目标网站阻止通过浏览器自动化工具进行的自动访问,请勿使用此工具。
此 server 暴露的工具
从 README 抽取出 12 个工具bridge.openOpens a browser session for WebMCP collaboration
bridge.closeCloses the current browser session
diagram.getRetrieves the current board state as JSON
diagram.loadDemoLoads a demo board configuration
diagram.setTitleSets the title of the current board
diagram.exportExports the current board
nodes.createCreates a new node on the board
nodes.updateUpdates an existing node on the board
nodes.deleteDeletes a node from the board
edges.createCreates a connection between nodes
selection.getGets the currently selected elements
selection.removeRemoves selected elements from the board
可对比工具
安装
# 首先安装 Playwright 浏览器
npx playwright install
# 从 npm 安装
npm install -g @webmcp-bridge/local-mcp
# 直接运行
npx -y @webmcp-bridge/local-mcp --url https://board.holon.run --headless
# 或使用 uxc(推荐用于稳定快捷方式)
uxc link board-webmcp-ui "npx -y @webmcp-bridge/local-mcp --url https://board.holon.run --no-headless"Claude Desktop 配置:
{
"mcpServers": {
"webmcp-bridge": {
"command": "npx",
"args": ["-y", "@webmcp-bridge/local-mcp", "--url", "https://board.holon.run"]
}
}
}FAQ
- 原生 WebMCP 和适配器模式有什么区别?
- 原生 WebMCP 通过浏览器 navigator.modelContext 使用网站现有的实现,而适配器模式则注入一个 shim,为没有内置 WebMCP 功能的网站提供 WebMCP 功能。
- 它是否处理身份验证?
- 该桥接器假设用户已经在浏览器会话中进行了身份验证。它不实现凭据保管库,但可以重用现有的已登录浏览器配置文件。
webmcp-bridge 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。