ChipCloud MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ChipCloud MCP Server diagnose pending jobs on the cluster"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ChipCloud MCP Server (chipcloud-mcp)
面向 芯片云(ChipCloud / zscheduler) HPC 集群、作业、队列与节点管理 API 的生产级 Model Context Protocol (MCP) Server。
基于官方 Python MCP SDK v2 (MCPServer)、httpx 异步连接池、Pydantic v2 强类型校验与 cryptography AES-CBC 加密实现,同时支持 stdio(本地离线直调)与 Streamable HTTP(内网中心化 / Docker / Kubernetes 部署),专门适配 Claude Code、OpenCode、DeepSeek Harness (dsh) 等离线 Vibe Coding Agent 与内网模型 API 环境。
完整文档与模板:
客户端现成模板:
examples/clients/(Claude Code / OpenCode v1 & v2 /dsh)离线打包与安装脚本:
scripts/build_offline_wheelhouse.sh、scripts/install_offline.sh、Dockerfile.offline
核心特性
100% 覆盖芯片云 API 文档全部 10 个接口(用户登录、集群列表、活动作业列表/详情、历史作业列表/详情、队列名称/资源/配置、节点资源)+ 2 个高价值 AIOps 复合诊断工具(集群健康全景摘要、排队作业根因分析)。
生产级认证与 Token 生命周期管理:
完整实现文档 6.1.3 规定的
AES/CBC/PKCS5Padding+ Base64 密码加密(与 Java JCA 逐字节一致),支持LOCAL/AD/LDAP/NIS登录类型。单飞锁(Single-Flight
asyncio.Lock)防止高并发下的登录风暴;结合 JWTexp与expireSecond提前刷新,并在 HTTP401时自动失效重登并重放请求一次。同时支持预加密密码(
CHIPCLOUD_PASSWORD_ENCRYPTED)或外部注入静态 Token(CHIPCLOUD_TOKEN)。
弹性网络与多端口/网关兼容:
默认支持芯片云三端口架构(
:18083管理/作业、:18090监控服务、:18082配置服务),也支持通过独立 Base URL 环境变量无缝对接 Nginx / API Gateway / K8s Ingress。连接池复用、可配置分阶段超时、指数退避 + 抖动重试(针对网络抖动与
429/502/503/504)、自定义企业私有 CA 证书。
生产安全与可观测性:
所有日志强制输出至
stderr(保障stdioJSON-RPC 帧不被污染),支持 JSON 结构化日志,自动脱敏密码与 Bearer Token。Streamable HTTP 模式内置
/healthz(存活探针)、/readyz(就绪探针,验证上游认证连通性)、无状态水平扩展模式(MCP_STATELESS_HTTP=true)、常时间比对的入站 Bearer Token 鉴权(MCP_SERVER_AUTH_TOKEN)、DNS Rebinding 防护与 CORS。所有工具均声明 MCP
ToolAnnotations(read_only_hint=True, destructive_hint=False, idempotent_hint=True),安全可控。
Related MCP server: clausius
工具、资源与提示词清单
MCP Tools(12 个)
工具名 | 对应芯片云 API | 端口 | 说明 |
|
|
| 检查认证连通性、License 状态( |
|
|
| 查询纳管集群列表与 |
|
|
| 分页查询活动作业(支持状态、队列、用户、节点、内存/时长筛选与排序) |
|
|
| 查询活动作业详情(含 |
|
|
| 分页查询历史作业(时间范围自动兼容毫秒时间戳与 |
|
|
| 查询历史作业完整详情(退出码/退出原因/均值与峰值) |
|
|
| 查询集群队列名称列表 |
|
|
| 查询队列实时资源利用率、作业槽占用与平均排队时长 |
|
|
| 查询队列调度策略、优先级、状态与 |
|
|
| 查询节点资源负载、核心进程存活状态( |
| 复合聚合(支持部分降级) | 多服务 | 并发输出集群健康评级、异常/进程故障/高负载节点与队列排队排行 |
| 复合聚合(并发限流) | 多服务 | 自动抓取 |
MCP Resources & Prompts
Resources:
chipcloud://reference/enums— 完整状态枚举字典(登录类型、集群类型、作业/队列/节点状态及中文释义)chipcloud://clusters— 当前纳管集群列表只读资源
Prompts:
cluster_inspection_report— 标准化集群日常巡检报告模板troubleshoot_job— 作业排队/挂起/异常退出系统化排查模板
快速开始
1. 本地安装(推荐 uv)
cd chipcloud-mcp
uv sync
cp .env.example .env
# 编辑 .env 填写 CHIPCLOUD_HOST、CHIPCLOUD_ACCOUNT、CHIPCLOUD_PASSWORD 等配置2. stdio 模式运行(适用于 Cursor / Claude Desktop / 本地 Agent)
uv run chipcloud-mcp --transport stdioCursor / Claude Desktop 配置示例
{
"mcpServers": {
"chipcloud": {
"command": "uv",
"args": [
"--directory",
"/path/to/chipcloud-mcp",
"run",
"chipcloud-mcp",
"--transport",
"stdio"
],
"env": {
"CHIPCLOUD_HOST": "10.0.66.88",
"CHIPCLOUD_ACCOUNT": "admin",
"CHIPCLOUD_PASSWORD": "your_password",
"CHIPCLOUD_LOGIN_TYPE": "LOCAL",
"CHIPCLOUD_LOG_FORMAT": "text"
}
}
}
}3. Streamable HTTP 模式运行(适用于远端服务 / Docker / Kubernetes)
MCP_SERVER_AUTH_TOKEN="your-strong-mcp-token" \
uv run chipcloud-mcp --transport streamable-http --host 0.0.0.0 --port 8000 --stateless服务端点:
MCP Streamable HTTP:
POST/GET/DELETE http://<host>:8000/mcp存活探针(Liveness):
GET http://<host>:8000/healthz就绪探针(Readiness):
GET http://<host>:8000/readyz
远端 MCP 客户端配置示例
{
"mcpServers": {
"chipcloud-prod": {
"url": "https://chipcloud-mcp.internal.example.com/mcp",
"headers": {
"Authorization": "Bearer your-strong-mcp-token"
}
}
}
}4. Docker / Docker Compose 部署
cp .env.example .env
# 强烈建议在 .env 中设置 MCP_SERVER_AUTH_TOKEN
docker compose up -d --build
curl http://127.0.0.1:8000/healthz环境变量说明
完整配置见 .env.example。关键项如下:
环境变量 | 必填 | 默认值 | 说明 |
| 是* | — | 芯片云 IP/域名(若未设置独立 Service Base URL) |
| 否 |
| 覆盖管理/登录/作业服务 Base URL(反向代理场景) |
| 否 |
| 覆盖监控服务 Base URL |
| 否 |
| 覆盖队列配置服务 Base URL |
| 是* | — | 登录账号(与密码配合实现自动登录刷新) |
| 是* | — | 明文密码(运行时自动 AES-CBC 加密,不落盘、不打日志) |
| 否 | — | 已 AES-CBC+Base64 加密的密码(与明文密码二选一) |
| 否 |
|
|
| 否 | — | 静态 Bearer Token(替代账号密码登录,无自动刷新) |
| 否 | — | 可选默认 |
| 否 |
|
|
| 生产推荐 | — | 保护 Streamable HTTP |
| 否 |
| 无状态模式,支持 K8s 多副本负载均衡 |
| 否 |
| TLS 校验与私有 CA 证书路径 |
开发与质量验证
# 运行全部单元与集成测试
uv run pytest
# 代码静态检查
uv run ruff check src tests
# 严格类型检查
uv run mypy src tests开源协议与声明
本项目采用 Apache License 2.0 开源,详见 LICENSE 与 NOTICE。
本协议仅适用于
chipcloud-mcp集成服务本身,不包含也不授予紫芯调度器(ZScheduler)及芯片云平台本体的商业使用许可;相关产品名称与商标归各自权利人所有。
Available Tools
12 toolscheck_auth_status检查芯片云认证与 License 状态ARead-onlyIdempotent
检查芯片云平台认证连通性、License 状态(hasLicense / remainNum)与 Token 有效期。
对应芯片云 API: GET /v1/admin/inner/login(端口 18083)。
不会暴露任何明文密码或 Bearer Token。
Inputs: force_refresh. Returns: object
diagnose_pending_jobs排队作业根因分析(复合诊断)ARead-onlyIdempotent
自动抓取 PEND 排队作业并并发查询作业详情,聚合 pendReason 根因分布、关联队列配额限制与节点状态。
一步定位「为什么作业一直在排队」,省去人工逐个查看 getJobDetail 和 queueList。
Inputs: user_name, cluster_id, queue_name, sample_size. Returns: object
get_active_job_detail查询活动作业详情ARead-onlyIdempotent
查询单个活动作业的详细信息,包含命令行、资源需求、进程 PIDs、峰值 CPU/内存、排队原因(pendReason)与挂起原因(suspReason)。
对应芯片云 API: GET /cluster/getJobDetail(端口 18083)。
Inputs: job_id (required), job_index, cluster_id. Returns: object
get_cluster_health_summary集群健康全景摘要(复合诊断)ARead-onlyIdempotent
并发聚合集群元数据、节点监控、队列资源与队列配置,一次性输出集群健康全景报告。
适用于日常巡检、故障定位与容量评估,自动识别:
- 异常/不可达/宕机/进程异常节点(unavail / unreach / closed_Loadmgr / process status != 1)
- 高负载节点(CPU / 内存 / 磁盘 / 作业槽 >= 阈值)
- 处于关闭或灭活状态的队列以及排队压力最大的队列
支持部分降级:若某个子服务短暂不可用,仍返回其余维度并记录 warnings。
Inputs: cluster_id, high_util_threshold. Returns: object
get_history_job_detail查询历史作业详情ARead-onlyIdempotent
查询单条历史作业的详细信息,包括退出码/退出原因、排队与运行时长、峰值/平均内存与 CPU 指标等。
对应芯片云 API: GET /jobInfo/getJobHistoryDetailNew(端口 18083)。
Inputs: end_time (required), record_id (required). Returns: object
list_active_jobs查询活动作业列表BRead-onlyIdempotent
分页查询芯片云集群中的活动作业列表(运行中、排队中、挂起中等)。
对应芯片云 API: GET /cluster/getJob(端口 18083)。
Inputs: ascend, status, max_mem, min_mem, +11 more. Returns: object
list_clusters查询纳管集群列表ARead-onlyIdempotent
查询芯片云纳管的集群列表,返回 clusterId、调度器类型(如 zscheduler)、主节点 IP 与纳管状态。
对应芯片云 API: GET /manageCluster(端口 18083)。
建议在调用作业、队列或节点查询工具前先调用本工具获取目标集群的 clusterId。
Inputs: name, cad_ip. Returns: object
list_history_jobs查询历史作业列表ARead-onlyIdempotent
分页查询芯片云历史作业列表,支持队列、用户、项目、状态、内存/运行时长以及时间区间过滤。
对应芯片云 API: POST /jobInfo/jobHistoryPageNew(端口 18083)。
返回记录中的 id 与 endTime 可用于调用 get_history_job_detail 查看完整历史详情。
Inputs: page, size, user, ascend, +16 more. Returns: object
list_node_resources查询节点资源与状态列表BRead-onlyIdempotent
查询集群节点的实时 CPU/内存/磁盘/网络负载、作业槽占用、调度核心进程存活状态(processList)、SSH/VNC 会话数及节点健康状态。
对应芯片云 API: POST /monitor-service/node/listNodeResource(端口 18090)。
Inputs: sort, status, cluster_id, node_names, +3 more. Returns: object
list_queue_configs查询队列调度配置列表ARead-onlyIdempotent
查询队列的调度配置与配额限制,包括队列状态(Open:Active 等)、调度策略、优先级、QJOB/UJOB/HJOB/PJOB_LIMIT 以及内存/Swap 阈值。
对应芯片云 API: GET /configure/queue/queueList(端口 18082)。
Inputs: cluster_id. Returns: object
list_queue_names查询队列名称列表BRead-onlyIdempotent
查询指定集群下的所有队列名称列表。
对应芯片云 API: GET /monitor-service/queue/listQueueNames(端口 18090)。
Inputs: cluster_id. Returns: object
list_queue_resources查询队列实时资源列表ARead-onlyIdempotent
查询队列的计算节点数、CPU/内存利用率、总/已用/排队作业槽数及平均排队时长。
对应芯片云 API: POST /monitor-service/queue/listQueueResource(端口 18090)。
Inputs: sort, cluster_id, sort_field, queue_names. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools have clearly distinct resource/action targets: clusters, queue names, queue resources, queue configs, active jobs, history jobs, node resources, auth, and two aggregate diagnosis tools. The main overlap is between granular tools and the composite tools get_cluster_health_summary and diagnose_pending_jobs, which intentionally re-aggregate data from list_node_resources, list_queue_resources, list_queue_configs, and job detail tools. Descriptions make the intended distinction clear, but an agent may still hesitate between calling a summary tool versus the underlying detailed tools.
All 12 names use consistent snake_case with predictable verb_noun phrasing: list_*, get_*, check_*, and diagnose_*. Resource nouns are consistently ordered and descriptive, such as list_active_jobs/get_active_job_detail and list_history_jobs/get_history_job_detail. No mixed casing or wildly inconsistent verb styles are present.
Twelve tools is well within the ideal range for a monitoring-oriented cluster management server. Each tool maps to a meaningful operation, and the two aggregate tools add convenience without bloating the surface excessively. The set is scoped enough to stay navigable while covering several resource types.
For a cluster monitoring/inspection server, coverage is strong: clusters, queues, queue resources/configs, active jobs, history jobs, nodes, auth/license status, health summary, and pending-job diagnosis are all present. Minor gaps remain, such as retrieving job logs/output, node-level detail, or project/user-level quota views, and there are no job lifecycle actions like submit/cancel/hold. These gaps are workable for a monitoring-focused surface but prevent full lifecycle completeness.
Maintenance
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA production-grade MCP server designed for multi-tenant, authenticated, and observable AI agent systems, enabling secure tool execution across heterogeneous data sources.69MIT
- FlicenseNot gradedqualityAmaintenanceAn MCP server for monitoring and managing multi-cluster Slurm GPU jobs, enabling AI agents to execute commands, check allocations, and explore logs across HPC clusters.1-
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients such as ChatGPT and Claude to administer Linux or macOS hosts through authenticated Streamable HTTP, including running shell commands, reading and writing files within a workspace, listing directories, and retrieving system metrics.39 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceA remote Streamable HTTP MCP server that lets web clients like Claude.ai and ChatGPT manage cloud machines with OAuth login — creating, starting, pausing and deleting machines, running commands, reading and writing files, managing snapshots and public ports, and driving an optional Linux desktop via screenshots and input actions. Long-running work can be backgrounded and operations polled, so browser-based clients stay within their timeouts.2MIT