Files
hose-use/README.md
T
gitea b7bdb39f56 feat(platform): 实现工作流工具(workflow_list/stats/charge/detail)
- platform_workflow_list: 列出指定自建应用下的工作流(EASO)
- platform_workflow_stats: 获取工作流统计信息(EASO)
- platform_workflow_charge: 查询企业工作流用量配额(EASO)
- platform_workflow_detail: 获取工作流详情(Piper)
- 简化 EASO 客户端签名,移除冗余的 corpId 返回
- 更新 tsconfig.json 添加 types: ["node"]
- 更新 README.md 工具清单
2026-05-18 18:00:53 +08:00

98 lines
2.1 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.
# ekb-mcp
易快报(ekuaibao)MCP Server,面向 AI Agent 设计。
## 安装
```bash
bun install
```
## 配置
在 `enterprises/` 目录下创建企业配置:
```json
{
"id": "corp-id",
"name": "企业名称",
"credentials": {
"accessToken": "your-access-token",
"corpId": "your-corp-id",
"staffId": "your-staff-id"
},
"auth": {
"refreshTtl": 300
}
}
```
## 运行
```bash
bun run dev # 开发模式(热重载)
bun run start # 生产模式
```
## 架构
```
src/
├── core/ # 基础设施
│ ├── config/ # 企业配置管理
│ ├── auth/ # 认证(Token 缓存/刷新)
│ │ ├── sealai.ts # SealAI SSO → JWT
│ │ ├── easo.ts # EASO 四步认证
│ │ └── piper.ts # Piper 三步认证
│ └── http/ # HTTP 客户端工厂
├── domains/ # 业务域
│ ├── sealai/ # SealAI 域
│ │ ├── types.ts
│ │ ├── api.ts
│ │ └── tools.ts
│ └── platform/ # 自建应用/工作流域
│ ├── types.ts
│ ├── api.ts
│ └── tools.ts
└── server.ts # MCP Server 入口
```
## 已迁移功能
### SealAI
- [x] 认证(SSO → JWT,内存+持久化缓存)
- [x] 用户身份查询
- [x] 计费/订阅查询
- [x] 审核规则 CRUD
- [x] 规则版本发布
- [x] 知识文档 CRUD
### Platform
- [x] 自建应用列表 (`platform_list`)
- [x] EASO 四步认证
- [x] Piper 三步认证
- [x] 工作流列表 (`platform_workflow_list`)
- [x] 工作流统计 (`platform_workflow_stats`)
- [x] 工作流配额 (`platform_workflow_charge`)
- [x] 工作流详情 (`platform_workflow_detail`)
### Core
- [x] 多企业切换
- [x] Token 自动刷新(内存 + 持久化)
- [x] 动态域名配置
## 废弃功能
- [ ] HAB 智能审核(Agent/Rule)— 业务废弃
- [ ] AI 审批配置 — 业务废弃
## 技术栈
- **Runtime**: Bun
- **HTTP Client**: ky
- **Schema**: Zod
- **MCP SDK**: @modelcontextprotocol/sdk
## 面向 AI 智能体
项目规则见 [AGENTS.md](./AGENTS.md)