diff --git a/external_plugins/baizhi-cloud-browser/.mcp.json b/external_plugins/baizhi-cloud-browser/.mcp.json new file mode 100644 index 0000000..930ebeb --- /dev/null +++ b/external_plugins/baizhi-cloud-browser/.mcp.json @@ -0,0 +1,11 @@ +{ + "mcpServers": { + "baizhi-cloud-browser": { + "type": "http", + "url": "https://capybrowser.app.baizhi.cloud/mcp", + "headers": { + "Authorization": "Bearer ${user_config.capyApiKey}" + } + } + } +} diff --git a/external_plugins/baizhi-cloud-browser/.zcode-plugin/plugin.json b/external_plugins/baizhi-cloud-browser/.zcode-plugin/plugin.json new file mode 100644 index 0000000..2d9f362 --- /dev/null +++ b/external_plugins/baizhi-cloud-browser/.zcode-plugin/plugin.json @@ -0,0 +1,30 @@ +{ + "name": "baizhi-cloud-browser", + "version": "0.1.1", + "description": "Connect ZCode to Baizhi Cloud Browser MCP for account checks and browser resource management.", + "description_i18n": { + "en": "Connect ZCode to Baizhi Cloud Browser MCP for account checks and browser resource management.", + "zh-CN": "将 ZCode 连接到百智云浏览器 MCP,查询账号并管理浏览器资源。" + }, + "author": { + "name": "Baizhi Cloud Browser" + }, + "license": "Apache-2.0", + "homepage": "https://capybrowser.app.baizhi.cloud/", + "keywords": [ + "baizhi", + "cloud-browser", + "mcp", + "browser" + ], + "mcpServers": ".mcp.json", + "userConfig": { + "capyApiKey": { + "title": "Capy API Key", + "description": "Your Baizhi Cloud Browser API key, without the Bearer prefix.", + "type": "string", + "required": true, + "sensitive": true + } + } +} diff --git a/external_plugins/baizhi-cloud-browser/README.md b/external_plugins/baizhi-cloud-browser/README.md new file mode 100644 index 0000000..e1fc4af --- /dev/null +++ b/external_plugins/baizhi-cloud-browser/README.md @@ -0,0 +1,28 @@ +# Baizhi Cloud Browser for ZCode + +[中文](./README_CN.md) + +Connect ZCode to Baizhi Cloud Browser's MCP endpoint to check credentials and manage browser resources. This is a community plugin for a separate service from Baizhi Agent Toolkit. It does not itself operate pages or change ZCode's built-in browser. Page interaction requires a separately compatible CDP client. + +## Setup + +1. Install and enable this plugin in ZCode. Open **Settings → Plugins → Baizhi Cloud Browser → Advanced information → Configuration**, then set `Capy API Key` to your own Baizhi Cloud Browser API Key without a `Bearer` prefix and save. The connector constructs the authorization header. +2. Restart the session if needed. Check that the server and `browser_auth_check` tool appear. Ask the agent to call that MCP tool to check the current account; approve the individual tool request when prompted. `browser_pricing` returns current pricing without starting a browser. +3. Only create a browser session when needed and after reviewing its cost. Use a stable, unique `idempotency_key` and a bounded `max_seconds`; if the result is uncertain, retry the same request with the same key. Once the session is `ready`, `browser_control` provides a short-lived, one-use CDP URL for a separate compatible client such as Playwright. Keep that URL private. The plugin does not attach ZCode’s built-in browser to it. +4. If you created a session, call `browser_stop_session` when the task ends, fails, or is cancelled, then check `browser_get_session` until it reports `released`. If release cannot be confirmed, report that state and retain the session reference for recovery. Check charges and settlement separately. Disconnecting the plugin does not stop a cloud session. + +## Dependencies and side effects + +- Requires a Baizhi Cloud Browser account, API key and network access to `https://capybrowser.app.baizhi.cloud/mcp`; the key is sent to that service as an Authorization header. ZCode handles plugin settings; consult its documentation for credential storage and access controls. +- Tools can create, modify and delete cloud resources. Session creation and runtime may incur charges. This plugin adds no commands, hooks, scripts, or local file writes of its own. +- This plugin does not include or install a CDP page client. Verify compatibility before using one; avoid placing a control URL in logs or public chat. + +Documentation: [Baizhi Cloud Browser](https://capybrowser.app.baizhi.cloud/docs/installation.md). Plugin files are licensed under Apache-2.0; the hosted service has its own terms. + +## Maintenance and support + +[Baizhi Cloud Browser (CapyBrowser)](https://baizhibrowser.cloud/) · [Plugin source](https://github.com/ctcbyzx/zcode-plugins/tree/codex/baizhi-cloud-browser-mcp/external_plugins/baizhi-cloud-browser) · [Service console](https://capybrowser.app.baizhi.cloud/). + +Maintained by [ctcbyzx](https://github.com/ctcbyzx), a contributor to [Chaitin's public integration guides](https://github.com/chaitin/baizhi-cloud-browser). See [other browser integrations](https://github.com/ctcbyzx/baizhi-cloud-browser). + +For setup help, use the [integration issue tracker](https://github.com/ctcbyzx/baizhi-cloud-browser/issues) and include the client version and a redacted error. Use the service console for private account or billing questions. diff --git a/external_plugins/baizhi-cloud-browser/README_CN.md b/external_plugins/baizhi-cloud-browser/README_CN.md new file mode 100644 index 0000000..16e6090 --- /dev/null +++ b/external_plugins/baizhi-cloud-browser/README_CN.md @@ -0,0 +1,28 @@ +# ZCode 百智云浏览器插件 + +[English](./README.md) + +连接百智云浏览器 MCP,查询凭据并管理浏览器资源。本社区插件与百智 Agent Toolkit 是不同服务。插件本身不能操作网页,也不会替换 ZCode 的内置浏览器;操作页面需要另行配置兼容的 CDP 客户端。 + +## 使用 + +1. 在 ZCode 安装并启用插件,打开「设置 → 插件 → Baizhi Cloud Browser → 高级信息 → 配置」,将 `Capy API Key` 填为自己的百智云浏览器 API Key 原文并保存,不要加 `Bearer`;连接器会构造授权请求头。 +2. 如有需要,重启会话;确认服务和 `browser_auth_check` 工具出现,要求 Agent 调用该 MCP 工具检查当前账户,出现提示时确认本次工具调用。`browser_pricing` 可查询当前价格,不启动浏览器。 +3. 确需使用浏览器运行时先核对费用,再使用稳定唯一的 `idempotency_key` 和有上限的 `max_seconds` 创建运行;结果不确定时用原参数和原键重试。运行变为 `ready` 后,`browser_control` 返回短期、一次性的 CDP 地址,可交给独立的兼容客户端(如 Playwright)操作页面;请勿公开该地址。插件不会把 ZCode 内置浏览器连接到该地址。 +4. 如果创建了运行,无论任务完成、失败还是取消,都要用 `browser_stop_session` 结束,再用 `browser_get_session` 查询至 `released`;若无法确认释放,应报告该状态并保留运行标识用于恢复;费用和结算需单独核对。断开插件不等于结束云端运行。 + +## 依赖和影响 + +- 需要百智云浏览器账户、API Key 和访问 `https://capybrowser.app.baizhi.cloud/mcp` 的网络;Key 作为授权请求头发送给该服务。插件配置由 ZCode 管理,凭据存储与访问控制请参阅 ZCode 文档。 +- 工具可创建、修改和删除云资源;创建及运行浏览器可能产生费用。插件自身不添加命令、钩子、脚本或本地文件写入。 +- 插件不包含、不安装 CDP 网页客户端。使用前须核对客户端兼容性;不要把控制地址写入日志或公开聊天。 + +文档:[百智云浏览器](https://capybrowser.app.baizhi.cloud/docs/installation.md)。插件文件采用 Apache-2.0 许可,托管服务适用其自身条款。 + +## 维护与支持 + +[百智云浏览器(CapyBrowser)](https://baizhibrowser.cloud/zh/) · [插件源码](https://github.com/ctcbyzx/zcode-plugins/tree/codex/baizhi-cloud-browser-mcp/external_plugins/baizhi-cloud-browser) · [服务控制台](https://capybrowser.app.baizhi.cloud/)。 + +维护者:[ctcbyzx](https://github.com/ctcbyzx)([Chaitin 公共接入仓](https://github.com/chaitin/baizhi-cloud-browser)贡献者)。更多接入方式见[公开接入材料](https://github.com/ctcbyzx/baizhi-cloud-browser)。 + +配置问题可到[接入维护仓 Issues](https://github.com/ctcbyzx/baizhi-cloud-browser/issues)反馈,附客户端版本和脱敏错误信息。账号或账务问题请通过服务控制台处理。 diff --git a/marketplace.json b/marketplace.json index 2fc615c..6a5bab8 100644 --- a/marketplace.json +++ b/marketplace.json @@ -1443,6 +1443,26 @@ "mcp", "verification" ] + }, + { + "name": "baizhi-cloud-browser", + "source": "./external_plugins/baizhi-cloud-browser", + "description": "Connect ZCode to Baizhi Cloud Browser MCP for account checks and browser resource management.", + "description_i18n": { + "en": "Connect ZCode to Baizhi Cloud Browser MCP for account checks and browser resource management.", + "zh-CN": "将 ZCode 连接到百智云浏览器 MCP,查询账号并管理浏览器资源。" + }, + "version": "0.1.1", + "author": { + "name": "Baizhi Cloud Browser" + }, + "category": "developer-tools", + "keywords": [ + "baizhi", + "cloud-browser", + "mcp", + "browser" + ] } ] } \ No newline at end of file