Files
social-mcp/docs/xiaoheihe-mcp-plan.md
T

64 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 小黑盒 MCP 实施计划(Monorepo 执行版)
## 1. 目标
在不改变对外协议的前提下,把项目迁移为可视化 monorepo:
- `apps/xhh-mcp` 承载小黑盒服务
- `apps/xhs-mcp` 承载小红书服务
- `packages/core` 承载共享基础设施
## 2. 小黑盒工具范围
已落地工具:
1. `xhh_check_login`
2. `xhh_get_login_qrcode`
3. `xhh_delete_cookies`
4. `xhh_list_feeds`
5. `xhh_search`
6. `xhh_get_feed_detail`
7. `xhh_get_sub_comments`
8. `xhh_get_user_profile`
9. `xhh_list_my_posts`
10. `xhh_post_comment`
11. `xhh_reply_comment`
12. `xhh_set_like_state`
13. `xhh_set_favorite_state`
统一 MCP 响应:`{ success, data, meta }`
## 3. 代码位置
- 小黑盒实现:`apps/xhh-mcp/src/platforms/xiaoheihe/*`
- 共享依赖:`packages/core/src/*`
- 小红书实现:`apps/xhs-mcp/src/platforms/xiaohongshu/*`
## 4. 构建与运行
- workspace`pnpm-workspace.yaml`
- 构建:`pnpm build`
- 启动 xhh`pnpm start:xhh`
- 启动 xhs`pnpm start:xhs`
## 5. 测试
- `apps/xhh-mcp/test/*`
- `apps/xhs-mcp/test/*`
- `packages/core/test/*`
验收命令:
1. `pnpm lint`
2. `pnpm test`
3. `pnpm build`
## 6. 部署
单 Dockerfile 双目标:
- `APP_NAME=xhs-mcp`
- `APP_NAME=xhh-mcp`
compose 与 Jenkins 已改为双服务部署(9527/9528)。