# ksterx/srunx [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/ksterx/srunx  
**GitHub Stars:** 23  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ksterx-srunx

## Description
MCP server for the SLURM workload manager. Submit jobs, run YAML workflows, monitor GPU resources, manage SSH profiles, and sync files to remote HPC clusters from natural language. 14 tools spanning local SLURM and SSH-remote clusters; companion CLI and FastAPI Web UI ship in the same package.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "srunx": {
    "command": "uvx",
    "args": ["--from","srunx[mcp]","srunx-mcp"]
  }
}
```

## Documentation

## What ksterx/srunx does

ksterx/srunx gives AI agents an MCP interface to SLURM workload management. It can target a local SLURM installation or dispatch operations to an SSH-connected cluster through a named profile. The package covers the routine job lifecycle: submit work, inspect status, cancel jobs, follow logs, and review cluster resources.

The server is part of the broader srunx package, which also provides a command-line interface, Python API, and FastAPI web dashboard. MCP support is installed through the package's optional `mcp` extra.

## How it works

Operations can run against the local cluster or use an SSH profile to reach a remote cluster. Remote execution uses the same operational model as local execution: the target is selected with a profile rather than a separate remote command mode. srunx can synchronize code to the remote environment, submit the job there, and stream logs back.

Workflow execution is based on YAML definitions. A workflow can describe multiple jobs, dependencies, arguments, exported values, and container settings. Jobs whose dependencies are complete can proceed, while independent branches can run in parallel. Command-line overrides support workflow arguments and matrix-style parameter sweeps.

The underlying package requires Python 3.12 or newer and access to a SLURM cluster, either directly or through SSH. Container-oriented workloads can use Pyxis, Apptainer, or Singularity settings.

## Setup and configuration

Install the package with either `uv add srunx` or `pip install srunx`. Add the MCP extra when the MCP server is needed:

```bash
uv add "srunx[mcp]"
```

Configure SSH targets as srunx profiles, then select one for remote operations. The CLI supports an `SRUNX_SSH_PROFILE` environment variable as an alternative to repeatedly passing a profile option. SSH profiles can be added, listed, synchronized, and tested through the srunx SSH commands.

The same installation includes the web dashboard and Slack notification support. The dashboard can be launched locally with `srunx ui`; its default address is `http://127.0.0.1:8000`, and the port can be changed.

## Tools and capabilities

The MCP integration spans 14 tools for interacting with SLURM and SSH-backed clusters. Its supported task areas include:

- Submitting and cancelling SLURM jobs.
- Listing active jobs, partitions, node states, and accounting information.
- Viewing or streaming job output and watching job or resource changes.
- Running and validating YAML workflows with dependency graphs.
- Passing workflow arguments and launching parameter sweeps with parallelism limits.
- Summarizing GPU availability across partitions.
- Managing SSH profiles and synchronizing files for remote execution.
- Managing per-remote-account secrets and srunx configuration.
- Creating, listing, and pruning read-only code snapshots for cluster use.

The wider srunx package also provides job templates, a browser-based dashboard, workflow DAG visualization, remote file browsing, and notifications through Slack. These package features complement the MCP interface but are accessed through the CLI or web UI where applicable.

## Limitations and notes

srunx is designed around SLURM and requires access to a compatible cluster. It is aimed at the workflow of SLURM job submission, monitoring, and lightweight dependency orchestration rather than a full scientific workflow platform. For larger workflow systems, the project positions tools such as Snakemake or Nextflow as better fits.

Remote operation depends on SSH profile configuration and the target cluster's SLURM environment. Container support covers Pyxis, Apptainer, and Singularity, but the relevant runtimes and cluster configuration still need to be available on the target system.

_Full upstream README: https://allmcps.com/mcp/ksterx-srunx/readme_

