@haoxu/mcp
v1.20.0
Published
号续 Agent Bridge MCP Server — 供支持 MCP 的各类 Agent 使用(查询 + 账号元数据写操作)
Maintainers
Readme
@haoxu/mcp
号续 Agent Bridge 的 MCP Server(查询 + 账号元数据写操作 + 代理写操作 + 统计刷新/账号检测/未读 + 稿件路径/链接导入 + 单篇设封面/原文链接/摘要 + 稿件排版主题 + 存稿/发表写操作 + 公众号面板远端写 + Cookie 导入添加账号)。
前置: 号续运行中且已启用 Agent Bridge(主账号与子账号均可启用;开关与 API Key 本机共用);与 @haoxu/cli 共用
~/.haoxu/config.json或HAOXU_API_KEY。查远端草稿/发表还需目标账号在线且已登录公众平台。稿件路径导入须本机绝对路径、号续与 Agent 同机;不支持飞书。
当前版本:1.20.0(与 CLI 1.20.0 配套)
安装
与 CLI、Skill 一起装时,推荐顺序:
npx skills add montisan/skills --skill haoxu-agent -y -g
npm install -g @haoxu/[email protected]
npm install -g @haoxu/[email protected]仅装 MCP:
npm install -g @haoxu/[email protected]小白教程与「让 Agent 代装」提示词:号续仓库 Desktop/docs/agent/haoxu-agent-guide.md §1–§2(适用 Cursor、Claude Code、WorkBuddy、QoderWork、QClaw、OpenClaw、Trae 等)。
MCP 配置(各产品通用片段)
在你所用 Agent 的 MCP 设置中增加(入口/文件名因产品而异):
{
"mcpServers": {
"haoxu": {
"command": "npx",
"args": ["-y", "@haoxu/[email protected]"],
"env": {
"HAOXU_API_KEY": "你的API_KEY"
}
}
}
}工具一览(1.15.0)
| 工具 | 说明 |
|------|------|
| haoxu_status | Bridge 与登录状态 |
| haoxu_list_accounts / haoxu_get_account | 账号(含 quickFilter、groupId、tagId 等);不含 cookie |
| haoxu_get_account_cookie | 单账号 Cookie(敏感;须 cookieExport 权限,员工看主账号权限;无权限 403);1.11.0 起 format: "json" 返回比特浏览器可导入的 { cookies: [{ name, value, domain, path }] } |
| haoxu_import_account_from_cookie | Cookie 导入添加账号(1.5.0):cookie + 可选 groupId / owner / proxy;超限 403、正在添加 409、CK 失效 401 |
| haoxu_list_manuscripts / haoxu_get_manuscript | 稿件(含 assigned、saved、cover) |
| haoxu_list_draft_tasks / haoxu_get_draft_task | 存稿任务(含 completed、publish;status=completed 含 partial) |
| haoxu_list_publish_tasks / haoxu_get_publish_task | 发表任务(含 status=scheduled) |
| haoxu_list_groups / haoxu_get_group | 分组 |
| haoxu_list_tags / haoxu_get_tag | 标签 |
| haoxu_list_ip_proxies / haoxu_get_ip_proxy | 代理 IP |
| haoxu_list_categories / haoxu_get_category | 稿件分类 |
| haoxu_list_employees / haoxu_get_employee | 员工(仅主账号;员工 403) |
| haoxu_list_mp_drafts | 公众号远端草稿箱(accountId + q / contentType / 分页) |
| haoxu_list_mp_published | 公众号远端发表记录(accountId + q / datePreset / from+to / 分页) |
| haoxu_delete_mp_draft | 删除远端草稿(须 confirm: true) |
| haoxu_sync_mp_draft | 草稿另存到其他账号(全同步,可能较久) |
| haoxu_update_mp_published_private | 已发表设/取消仅自己可见 |
| haoxu_list_mp_images | 素材库图片列表 |
| haoxu_upload_mp_image | 上传素材(filePath 须本机绝对路径、同机可读) |
| haoxu_delete_mp_images | 删除素材图(须 confirm: true 与 groupIds) |
| haoxu_patch_account | 修改号主/备注 |
| haoxu_move_account_group | 移组(仅主账号) |
| haoxu_set_account_tags | 设标签(全量替换;须会员额度) |
| haoxu_create_group / haoxu_update_group / haoxu_delete_group | 分组 CRUD(仅主账号;delete 须 confirm: true) |
| haoxu_create_tag / haoxu_update_tag / haoxu_delete_tag | 标签 CRUD(须会员额度;delete 须 confirm: true) |
| haoxu_create_ip_proxy / haoxu_update_ip_proxy / haoxu_delete_ip_proxy | 代理 CRUD(delete 须 confirm: true) |
| haoxu_batch_create_ip_proxies / haoxu_move_ip_proxies | 批量创建 / 移组 |
| haoxu_test_ip_proxy | 入库节点 test |
| haoxu_import_ip_proxies | Excel 导入(异步,返回 jobId) |
| haoxu_bind_accounts_proxy | 账号绑定代理 |
| haoxu_detect_account_proxy / haoxu_detect_account_proxy_batch | 单账号 / 批量代理检测 |
| haoxu_refresh_account | 单账号全量刷新(统计 + 未读,一次调用;1.14.0) |
| haoxu_refresh_account_metrics / haoxu_refresh_account_metrics_batch | 单账号 / 批量统计刷新(查统计仍用 list/get) |
| haoxu_detect_account / haoxu_detect_account_batch | 单账号 / 批量账号检测(非代理) |
| haoxu_refresh_account_unread / haoxu_refresh_account_unread_batch | 单账号 / 批量未读刷新 |
| haoxu_test_proxy_connectivity / haoxu_proxy_lookup_exit_ip | 无库 test / 查出口 IP |
| haoxu_get_job | 查询异步 Job |
| haoxu_import_manuscripts_from_paths | 本机绝对路径导入稿件(同步 { imported, errors };可选 stripDuplicateTitleEnabled / stripImageMetadataEnabled / themeId) |
| haoxu_import_manuscripts_from_links | 公众号链接导入稿件(同步 { imported, errors };可选 themeId) |
| haoxu_list_manuscript_body_images | 列出单篇正文中可作封面的图片({ images: [{ index, kind, src }] },index 从 1 起) |
| haoxu_set_manuscript_cover | 单篇设封面(source: local/url/body/clear;local 时 filePath 须本机绝对路径、同机可读;body 时 bodyImageIndex 为正文第 n 张图) |
| haoxu_set_manuscript_source_url | 单篇设原文链接(source: url/clear;url 时须 url) |
| haoxu_set_manuscript_summary | 单篇设摘要(source: text/clear;text 时须 text;list 支持 summary 筛选;链接导入自动带入摘要;无批量 API) |
| haoxu_delete_manuscripts | 删除本地稿件(manuscriptIds + confirm: true;未完成存稿明细标为「稿件已删除」) |
| haoxu_insert_manuscript_images | 单篇插入配图(position + images[];local 时 filePath 须本机绝对路径) |
| haoxu_get_manuscript_typography | 读单篇正文当前排版(字号/行间距/字间距/对齐/缩进/段间距) |
| haoxu_set_manuscripts_typography | 批量设置正文样式(manuscriptIds 1–200 + typography;未传的字段保留各稿件现值;取值须为下拉档位;返回 { updated, errors }) |
| haoxu_list_manuscript_themes | 列出排版主题白名单(无参数;{ items: [{ id, title, themeColor }], total },共 30 个) |
| haoxu_set_manuscript_theme | 单篇设/清排版主题(manuscriptId;source: theme|clear;theme 时须 themeId;未知 id 400,不会静默清空;返回 { themeId }) |
| haoxu_set_manuscripts_theme | 批量设/清排版主题(manuscriptIds 1–200;themeId: 字符串或 null 清除;返回 { updated, errors } 逐篇累计) |
| haoxu_create_batch_draft_task | 创建存稿任务(可选 contentMode: article|note,默认 article;贴图用 note;可选 layoutMode 一键排版、defaultCoverImageIndex 缺省封面取正文第 N 张图(1.20.0,默认 1);可选 start) |
| haoxu_create_split_batch_draft_tasks | 按固定篇数 / 随机范围 / chunkSizes 拆成多条存稿任务后创建;三选一;同 create 支持 layoutMode / defaultCoverImageIndex;可选 start |
| haoxu_start_batch_draft_task | 启动存稿任务 |
| haoxu_cancel_batch_draft_task | 取消存稿任务 |
| haoxu_delete_batch_draft_task | 删除存稿任务(须 confirm: true) |
| haoxu_create_publish_tasks_from_batch_draft | 从存稿创建发表(可选 schedule、massSendNotify、start) |
| haoxu_create_publish_tasks_from_drafts | 从远端草稿箱指定草稿创建发表(可选 schedule、massSendNotify;默认只建,start=true 才开跑) |
| haoxu_create_publish_tasks_from_first_drafts | 从各账号首条远端草稿创建发表(创建后自动开跑;可选 massSendNotify) |
| haoxu_start_publish_task | 启动单条发表任务 |
| haoxu_start_publish_tasks_batch | 批量启动发表任务 |
| haoxu_start_all_pending_publish_tasks | 启动全部可见待执行发表任务 |
参数名与 Bridge HTTP query/body 对齐;多选 ID 传逗号分隔字符串(如 groupId: "a,b")。
haoxu_import_ip_proxies、haoxu_detect_account_proxy_batch 及 Phase C 批量工具返回 jobId,用 haoxu_get_job 轮询。Job 存于号续进程内存,完成后约 1h TTL;号续重启后丢失。稿件导入与存稿/发表写为同步 fire-and-forget;启动后用 haoxu_get_draft_task / haoxu_get_publish_task 轮询进度。
带日期筛选发表记录时,响应可能含 scanExhausted: true(有界跨页扫描达 10 页上限,结果可能不完整)。
发布(维护者)
npm whoami
npm org ls haoxu
cd packages/haoxu-mcp
npm publish --access public完整教程:号续仓库 Desktop/docs/agent/haoxu-agent-guide.md。
