hpc-mcp
You can operate authorized HPC projects over SSH/SFTP and manage Slurm jobs from Codex via local STDIO.
Check SSH connectivity, Slurm availability, and list configured server aliases without connecting.
Register local/remote project mappings, inspect status, sync changes, and list remote changes.
List, stat, read, search, and revision-checked patch remote files inside registered project roots.
Upload/download files within allowed project roots and run allowlisted commands or structured programs under policy.
Preview, submit idempotently, inspect, list, read logs for, and list artifacts for registered Slurm jobs; watch handoff requires hpc-agent.
Credentials and project/command boundaries are enforced by configuration; tools do not expose credentials.
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., "@hpc-mcp sync my project to the HPC cluster and submit train.py as a Slurm job"
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.
hpc-mcp
让 Codex 在 Windows 电脑上通过 SSH/SFTP 管理已授权的 HPC 项目与 Slurm 作业,并在结束后把结果交回原任务。运行方式是本地 STDIO;集群不需要安装 MCP 服务。
交给 Codex 安装
帮我安装 https://github.com/watcher47/hpc-mcp ,先阅读 AGENTS.md 和 docs/install-with-codex.md,按发布版流程执行。询问我自己的 SSH 用户名和允许使用的本地项目目录;密码只在本机遮蔽输入窗口填写。
已发布稳定版为 v0.1.0,安装时使用该版本的 Codex 安装契约,验证 SHA-256,再用隔离环境安装。项目不承诺 PyPI 包可用。
当前 main 是包含后续修复的 0.2.0 源码,尚未发布对应安装资产。当前能力和安装契约随源码更新;源码提交不表示受管安装已升级。
10.29.114.128 是明确的站点预设,本站用户无需重新设置 IP;其他集群可以覆盖。它不是 SSH 运行时通用默认值。必须使用你自己的 SSH 用户名,不能根据 Windows 用户或仓库作者推断。密码只保存在用户本机 servers.json,不进入聊天、命令参数、环境变量或日志;本配置流程不使用钥匙串。新建窗口不会覆盖已有配置。
要求 Windows、Python 3.11+、带 tkinter 的官方完整 Python、uv、Codex CLI/Desktop。集群需要 SSH/SFTP、Python 3、sbatch、squeue 和 sacct;远程文本搜索需要 rg。Windows 是本版安装目标;其他平台没有完整部署支持承诺。GUI 取消或不可用意味着配置未完成。安装不会自动提交 Slurm 作业。
Related MCP server: Codex Desktop Bridge
能力与边界
当前源码的 26 个 MCP 工具覆盖连接检查、项目映射/同步、远程文件、受限 SSH 命令、GPU 清单与选卡、Slurm 预览/提交/取消/查询/日志/结果与监控。凭据不出现在工具参数或返回值中。项目路径限制、命令策略、TOFU 主机信任与请求 UUID 提交防重保持生效。授权目录和策略见 配置说明,按明确 JobID 停止本人作业见 取消接口。
可按物理 GPU index、UUID 或单卡 GRES 精确选卡,也可自动选择指定数量。启用该功能的提交会复查物理占用,并在业务启动前核验实际分配;同一 UUID 重试恢复原选择。首版要求直连计算节点、单节点 Bash 和每卡唯一 GRES,详见 GPU 选择。
独立 hpc-agent 每约 45–55 秒查询作业,等待轮询不消耗模型 token;后续分析回合会消耗。它通过原生队列通知原任务,队列 ACK 不证明结果已收集。原生协议不提供全局绝对 exactly-once 保证;证据不足时保留不确定状态,详见 队列交接 与 诊断。
Windows 安装、升级与回退保留用户配置、数据库、监控记录和旧发布环境。真实集群/桌面验收需要独立授权,本地测试不能替代它。
开发验证
uv sync --extra test --locked
uv run pytest -m "not real_cluster" --cov=hpc_mcp --cov-report=term-missing --cov-fail-under=85
uv build复用已安装服务完成最小 CPU 作业提交、监控和结果回收,见 无人值守 CPU 流程与恢复说明。真实提交需要明确授权;该流程保留 UUID 和验证证据,不自动提交科研仿真。
Available Tools
24 toolsproject_ensureProject EnsureC
Register a local project and ensure its remote project directory exists.
Inputs: local_root (required), server_alias.
project_list_remote_changesProject List Remote ChangesC
Plan synchronization and report remote changes without uploading.
Inputs: project_id (required).
project_statusProject StatusC
Return the registered project mapping.
Inputs: project_id (required).
project_syncProject SyncC
Incrementally upload project changes while preserving conflicts.
Inputs: project_id (required).
remote_apply_patchRemote Apply PatchC
Apply text edits only when the remote revision and match counts agree.
Inputs: edits (required), project_id (required), relative_path (required), expected_sha256 (required).
remote_downloadRemote DownloadC
Download a remote file into the registered local project.
Inputs: project_id (required), remote_relative_path (required), local_relative_path.
remote_executeRemote ExecuteC
Execute structured program arguments under the remote project and command policy.
Inputs: args (required), program (required), project_id (required), environment, +2 more.
remote_listRemote ListC
List a directory within a registered remote project.
Inputs: project_id (required), relative_path.
remote_readRemote ReadC
Read bounded UTF-8 text with a SHA-256 revision for optimistic editing.
Inputs: project_id (required), relative_path (required), limit, offset.
remote_searchRemote SearchC
Search for literal text inside the remote project with bounded results.
Inputs: pattern (required), project_id (required), max_matches, relative_path.
remote_statRemote StatC
Return metadata for a project-relative remote path.
Inputs: project_id (required), relative_path (required).
remote_uploadRemote UploadC
Upload a file between paths confined to the registered project roots.
Inputs: project_id (required), local_relative_path (required), remote_relative_path.
server_listServer ListA
List configured SSH aliases and public endpoint information without connecting.
Inputs: no named parameters.
server_test_connectionServer Test ConnectionB
Check configured SSH connectivity and Slurm command availability.
Inputs: server_alias.
slurm_get_jobSlurm Get JobC
Inspect one registered job using the queue and accounting records.
Inputs: job_id (required).
slurm_list_artifactsSlurm List ArtifactsC
List bounded artifacts within a registered job's project output directory.
Inputs: job_id (required).
slurm_list_jobsSlurm List JobsC
Inspect locally registered jobs only.
Inputs: no named parameters.
slurm_previewSlurm PreviewB
Preview a remote batch script without submitting a job.
Inputs: project_id (required), script_path (required).
slurm_read_logSlurm Read LogC
Read a bounded chunk of a registered job log; default to its tail.
Inputs: job_id (required), offset, stream.
slurm_submitSlurm SubmitB
Submit a validated batch script idempotently; reuse the request UUID on retries.
Inputs: project_id (required), request_id (required), script_path (required).
slurm_watch_jobSlurm Watch JobD
Verify local handoff registration. Run hpc-agent watch in the original Codex terminal first.
Inputs: job_id (required), server_alias.
ssh_downloadSsh DownloadB
Download one regular file between configured allowed roots, replacing the destination.
Inputs: local_path (required), remote_path (required), server_alias.
ssh_executeSsh ExecuteB
Run a config-allowlisted command in an allowed directory; submit jobs with slurm_submit.
Inputs: cmd_string (required), directory, timeout_ms, server_alias.
ssh_uploadSsh UploadB
Upload one regular file between configured allowed roots, replacing the destination.
Inputs: local_path (required), remote_path (required), server_alias.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Several tool pairs overlap heavily: ssh_upload/remote_upload, ssh_download/remote_download, and ssh_execute/remote_execute all perform essentially the same file/command operations, differing only in scope wording (allowed roots vs project roots). Descriptions hint at differences but an agent could easily misselect between them.
Names follow a predictable prefix+verb_noun snake_case pattern (project_*, remote_*, slurm_*, server_*). The one inconsistency is that equivalent operations get different prefixes (ssh_upload vs remote_upload), which slightly muddies the scheme but is still readable.
24 tools is on the heavy side of the 16-25 borderline band. The HPC scope (SSH, project sync, file transfer, Slurm lifecycle) broadly justifies the count, but several overlapping transfer/execute tools arguably inflate it.
Strong lifecycle coverage: project registration/sync, remote file ops, patch application, and a full Slurm surface (preview, submit, get, list, watch, read_log, list_artifacts). The notable gap is job cancellation/deletion, which agents may need.
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA Windows-first MCP server that maintains persistent stateful SSH sessions to Linux servers, enabling Codex to run commands, manage files, and use sudo without exposing credentials.130 PyPI1MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients on Linux to drive the official Codex Computer Use and Browser Use runtime on a remote Windows PC over SSH, operating in the logged-in Windows desktop session.1MIT
- AlicenseAqualityCmaintenanceEnables MCP-compatible coding agents to execute the local Codex CLI as a coding agent, including code reviews, session resume/fork, and CLI diagnostics.9MIT
- AlicenseAqualityCmaintenanceBridges MCP clients such as Claude Code and Cursor to independent Codex app-server sessions, letting them start, poll, steer, review, compact, cancel, and answer prompts for asynchronous Codex tasks over local stdio or a remote authenticated WebSocket. Runs read-only by default, with workspace-write sandboxing only when a user explicitly enables it, and reports job status, model listing, and progress back to the client.101MIT