Files
th-hotel-simple/docs/project/integrations/superagent-mcp/README.md
2026-07-22 23:43:54 +07:00

58 lines
2.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.

# TH Hotel SuperAgent MCP 资料包
## 1. 目录定位
本目录集中放置当前项目提供给 SuperAgent 对接方、测试和运维参考的 MCP 文档。
运行时代码不在本目录,代码位于:
```text
server/src/main/java/cn/nianxx/thhotel/integrations/mcp/superagent/
```
中文说明:
- 当前 MCP endpoint 内嵌在现有 Spring Boot 后端中。
- 不需要额外部署独立 MCP 服务。
- 文档可以按本目录整体交付给对接方,但 Secret 必须通过安全通道单独交付。
- 本目录是 `../superagent-api-contract.md` 的 MCP 映射资料包;字段语义、错误码和安全边界如有重复,以 HTTP 对外总契约为准。
## 2. 文档索引
| 文档 | 中文说明 |
| --- | --- |
| `integration-guide.md` | MCP 总体接入说明和调用顺序 |
| `tools.md` | 5 个 MCP tools 的工具契约 |
| `submit-payload-mapping.md` | `th_hotel_submit_task_results` 的 M002 V4-only payload adapter、schema validator 和提交前校验 |
| `inbound-diagnostics.md` | MCP 入站诊断链路说明如何受控保存原始工具参数、adapter 后 payload 和安全错误摘要 |
| `security-policy.md` | 鉴权、权限、正文、附件和日志边界 |
| `deployment-guide.md` | 部署参数、环境变量和上线顺序 |
| `test-cases.md` | SuperAgent 联调测试用例 |
| `mcp-client-config.example.json` | SuperAgent HTTP MCP 客户端配置模板,不包含真实 Secret |
## 3. 一期工具
| Tool | 中文用途 | 性质 |
| --- | --- | --- |
| `th_hotel_query_case_context` | 查询订单上下文 | 只读 |
| `th_hotel_query_object_detail` | 查询对象详情 | 只读 |
| `th_hotel_list_message_conversation_tasks` | 查询邮件会话下任务 | 只读 |
| `th_hotel_list_message_conversation_messages` | 查询邮件会话下受控正文 | 只读,读取正文会触发后端审计 |
| `th_hotel_submit_task_results` | 提交 SuperAgent AI 任务结果 | 写入,受开关控制 |
## 4. 对外交付提醒
可以交付:
- 本目录下的 MCP 文档。
- `mcp-client-config.example.json` 配置模板。
- dev/test MCP 地址。
- 通过安全通道交付的 `MCP_AUTH_TOKEN`
不能交付:
- REST HMAC secret。
- 数据库连接信息。
- 生产客户数据、原始邮件正文或附件 URL。
- 能绕过 MCP endpoint 直接调用后端写接口的凭证。