- mcp/server.py 入站鉴权中间件:/mcp 要求 Authorization: Bearer <MCP_AUTH_TOKEN> (hmac.compare_digest 恒定时间比较),无/错令牌 401 + WWW-Authenticate; 令牌未配置 fail-closed 拒绝一切调用 - 放行 /health(监控)与 /out/*(产物下载直链,浏览器无法带请求头) - docker-compose.yml 注入 MCP_AUTH_TOKEN(令牌在 .env,git 忽略不入库) - mcp/README.md 连接示例全部带鉴权头,修正 Hermes 键名为官方 mcp_servers - README.md MCP 章节补授权说明、内联 compose 同步;CHANGELOG 记录 - 验证:401 矩阵/fail-closed/完整握手/9工具/service_status 真调用 全通过
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
services:
|
|
unicut:
|
|
build: .
|
|
container_name: unicut
|
|
restart: always
|
|
ports:
|
|
- "3005:443"
|
|
- "3006:80"
|
|
environment:
|
|
# 公网部署:不注入任何模型密钥,AI 功能一律用户自带 Key
|
|
# 授权中心(auth.88531.cn)项目密钥:只注入 nginx 反代头,不进前端
|
|
- HUB_KEY=${HUB_KEY:-}
|
|
# 项目编号(非机密):启动时由 entrypoint 替换进前端包,用于公告/装机统计归属
|
|
- HUB_PROJECT_ID=${HUB_PROJECT_ID:-}
|
|
volumes:
|
|
- certs:/etc/nginx/certs
|
|
|
|
# 本机语音合成(edge-tts),给免登录版提供配音能力;源码在 ../unicut-tts
|
|
unicut-tts:
|
|
build: ../unicut-tts
|
|
container_name: unicut-tts
|
|
restart: always
|
|
volumes:
|
|
- ../unicut-tts/audio:/data/audio
|
|
|
|
# MCP 服务(Model Context Protocol):AI 客户端经 https://<站点>/mcp 调用米剪能力
|
|
# (抓取正文配图 / 大模型口播文案 / edge-tts 配音 / 生成米剪工程 ZIP)。
|
|
# 密钥与站点地址从项目 .env 注入(MCP_LLM_KEY 等,勿提交仓库)。
|
|
unicut-mcp:
|
|
build: ./mcp
|
|
container_name: unicut-mcp
|
|
restart: always
|
|
environment:
|
|
- MCP_LLM_BASE=${MCP_LLM_BASE:-http://192.168.68.19:3099/v1}
|
|
- MCP_LLM_KEY=${MCP_LLM_KEY:-}
|
|
- MCP_LLM_MODEL=${MCP_LLM_MODEL:-mimo-v2.6-flash}
|
|
- MCP_PUBLIC_URL=${MCP_PUBLIC_URL:-https://127.0.0.1:3005}
|
|
- MCP_AUTH_TOKEN=${MCP_AUTH_TOKEN:-}
|
|
- MCP_PROJECTS_DIR=${MCP_PROJECTS_DIR:-}
|
|
volumes:
|
|
# 生成的工程 ZIP / 配音 mp3 落盘(nginx /mcp-out/ 提供下载)
|
|
- ./mcp-out:/data/out
|
|
|
|
volumes:
|
|
certs:
|