SuperAPI AI 工具集

google-webmcp

通用与其它

查看项目

更新于 10-15 22:14

技能介绍

用途:通过 @webmcp-bridge/local-mcp 的内置 --site google 桥接预设操作 Google Search 与 Gemini,适合需要运行 Google 搜索、与 Gemini 对话或生成图片的场景。非 Google 站点或通用桥接场景应改用 $webmcp-bridge。

前提:PATH 中有 uxc 和 npx;可访问 https://www.google.com 与 https://gemini.google.com。全新机器或隔离 HOME 下需先运行 npx playwright install 安装 Playwright 浏览器。Gemini 对认证敏感,未登录时预期出现 bootstrap_then_attach 行为。

核心用法:先确认固定链接存在,运行 command -v google-webmcp-cli;缺失或指向错误 profile 时执行 skills/google-webmcp/scripts/ensure-links.sh。调用工具前先用 google-webmcp-cli -h、search.web -h、gemini.chat -h、gemini.image.download -h 查看桥接与工具 schema。检查认证状态用 bridge.session.status 和 auth.get;会话未就绪时可用 bridge.session.bootstrap、bridge.session.mode.set '{"mode":"headed"}'、bridge.open。搜索用 google-webmcp-cli search.web '{"query":"...","limit":10}',配合 page.get。Gemini 文本与图片分别通过 gemini.chat 的 mode text 或 image 调用,图片下载用 gemini.image.download。仅解析 JSON 输出:成功时 .ok == true 并读取 .data,失败时检查 .error.code 与 .error.message。

默认目标:预设使用 --site google,默认 profile 路径为 ~/.uxc/webmcp-profile/google,可用 ensure-links.sh 刷新链接。

限制:Google profile 应与其他站点隔离;Gemini 在受管 profile 完成认证前不可用;优先用 bridge.session.mode.set 切换模式而非重启命令;长生成可能耗时数分钟,应增大 timeoutMs 而不是并行重试;gemini.image.download 仅针对当前或目标会话中可见的生成图片,无法恢复已不可见图片;page.navigate 只能停留在 Google 拥有的主机;手动关闭可见 Google 窗口会结束 headed owner 会话,需重新运行 bridge.open。