SuperAPI AI Directory

cloudapi2-mcp-deploy

Deployment & operations

View repository

Updated 11-12 16:17

About this skill

DJI Cloud API 2 MCP Server Deployment Skill

Applicable scenarios

Trigger this Skill when a developer describes the following scenarios:

  • Deploy DJI Cloud API 2 MCP Server to a remote server (Docker Compose + SSE mode)
  • Configure Claude Code / Cursor locally to connect to MCP Server (stdio or SSE)
  • Pre-deployment environment preparation, key generation, configuration filling
  • MCP Server build (Maven + Docker image)
  • Startup, verification, and troubleshooting during deployment
  • deploy.sh One-click deployment script usage

Semi-automatic interaction protocol (hard rules)

Deployment is aguided semi-automaticprocess: AI is responsible for thinking and generation, the user is responsible for executing system-level operations and reporting output.

Operation Who does it
Environment detection, key generation, configuration assembly, command generation, result parsing, log troubleshooting AI
docker build / docker compose / ssh / mvn package / modify .claude.json User executes, AI gives precise commands and waits for report
Dangerous operations (overwriting existing configuration, force-restarting containers) Must confirm first

Process constraints:

  1. Give only one command (or a group of strongly related commands) per step, and wait for the user to report output before proceeding to the next step; never throw out all commands at once
  2. After the user reports output, AI firstdetermines success or failure(success marker/error marker), then decides to continue or troubleshoot
  3. FH_SSE_AUTH_TOKEN being left empty or using a placeholder value will be StartupAuthValidator rejected at startup, a strong random value must be generated
  4. When encountering an error not covered by the deployment guide, load references/部署排障.md to locate it by symptom

Two-path decision tree

用户说"帮我部署 MCP"
→ 加载 prompts/env-probe.sh 内容,让用户执行(或直接问环境信息)
→ 解析探测结果:OS / 架构 / Docker 版本 / Maven / Java / 网络可达性
→ 按以下逻辑推荐路径:

路径 A:远程 SSE 部署(推荐生产形态)
├─ 有远程 Linux x86_64 / aarch64 服务器 + Docker 24+
├─ 目标:多客户端共享一个 MCP Server 实例
├─ 加载 references/docker-sse-部署步骤.md
└─ 步骤:配置 .env → 构建镜像 → deploy.sh 一键部署 → 客户端配置接入

路径 B:本地 stdio 开发(开发调试形态)
├─ 在本地 macOS/Windows/Linux 跑 MCP Server 供 Claude Code/Cursor 使用
├─ 子选项 B1:Mock 模式(无需 SDK,任意平台) → 本地 JAR 直接跑
├─ 子选项 B2:Docker stdio 代理(需跑真 SDK) → Docker 容器 stdio
├─ 加载 references/stdio-本地开发步骤.md
└─ 步骤:构建 → 配置 MCP 客户端 → 验证工具列表

→ 架构判断 + 用户要跑真 SDK:
  SDK 分 amd64 / arm64 两个包,Linux x86_64 与 Linux aarch64 都可用;
  构建镜像时 --build-arg SDK_ARCH 必须与 --platform 指向同一架构。
  Windows / Intel Mac 只能用 Mock 模式或 Docker 代理
→ 与用户确认路径后,进入对应 references 逐步推进

Step entry points for each path

Path Step list Key artifacts
A: Remote SSE deployment references/docker-sse-部署步骤.md mcp/.env, Docker image, remote running container
B: Local stdio development references/stdio-本地开发步骤.md ~/.claude.json MCP configuration

Required variables quick reference (stop if missing)

See references/环境变量速查.md. Core required:

Variable Generation command Description
FH_SERVER_ADDRESS — DJI Cloud API 2 server address (including protocol)
FH_ACCESS_TOKEN Obtain from DJI Cloud API 2 console Workspace access token
FH_WORKSPACE_UUID Obtain from DJI Cloud API 2 console Workspace UUID
FH_SSE_AUTH_TOKEN openssl rand -hex 32 SSE authentication token (empty means startup rejected)

Troubleshooting routing

用户回报报错信息 / 部署卡住
→ 加载 references/部署排障.md,按"现象→排查动作"定位
→ 常见:SSE Auth 拒绝启动 / .so 加载失败 / exec format error /
   Claude Code 配置不生效 / ready 503 / 重连失败
→ 修复后回到原步骤继续

Anti-hallucination rules

  1. Deployment commands, image paths, ports, and base-path must come from mcp/docs/部署指南.md or references/*.md; do not fabricate from memory
  2. When unsure about a configuration item/command, first read the corresponding chapter of the deployment guide to confirm, then provide it
  3. Any reference must be traceable to a deployment guide chapter or project file

Shared specifications

The deployment constraints of this Skill are documented in constraints.yaml(aligned with the general constraint style of _shared/constraints-common.yaml ). For cross-Skill routing rules, see skills/_shared/skill-routing.md. Deployment guide (knowledge base):mcp/docs/部署指南.md; the references are all action checklists distilled from it.