slurm_mcp
Simple MCP server to interact with SLURM clusters in natural language.
Features
- Allows LLM agents to retrieve information on your running jobs from
squeue, prior jobs fromsacct, and to get compute usage information based on Prometheus (once you configure it, see instructions below).
Demo
Limitations
- This can only fetch your own SLURM job information, not of other users.
- This can't be used to launch jobs. It is not a good idea to let an LLM submit compute jobs for you.
- The GPU utilization metrics are only available for the Mila cluster. For other clusters, you will need to provide the prometheus URL to use in order to fetch job compute stats.
- Some jobs are missing GPU compute stats because of a bug in the DCGMI / slurm job exporter / nvidia driver / something, that causes the gpu util to be a very very very large number. This tool filters those and displays them as having no usable compute metrics.
Setup
You need to have SSH access to a SLURM compute cluster.
-
Create a
.vscode/mcp.jsonfile with the following content:
{
"servers": {
"slurm_mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://www.github.com/lebrice/slurm_mcp",
"slurm_mcp"
]
}
}
}
-
To get GPU metrics, you need to set the
PROMETHEUS_URL_<CLUSTER>environment variable to the Prometheus URL of your cluster. If the SLURM cluster requires authentication to connect to prometheus, you also need to set thePROMETHEUS_HEADERS_FILE_<CLUSTER>environment variable to point to a JSON file containing the headers to use for authentication (e.g.,{"Authorization": "Bearer <TOKEN>"}).- you can set these environment variables in your shell configuration file (e.g.,
.bashrc,.bash_aliases,.zshrc, etc.):
export PROMETHEUS_URL_MILA="THE_MILA_PROMETHEUS_URL" export PROMETHEUS_HEADERS_FILE_MILA="secrets/prometheus_headers_mila.json"
- you can set these environment variables in your shell configuration file (e.g.,
Metadata
Release files for slurm-mcp 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slurm_mcp-0.0.1.tar.gz | 134.4 kB | With provenance | Details for slurm_mcp-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slurm_mcp-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for slurm_mcp-0.0.1-py3-none-any.whl |
Total release size: 148.2 kB
Release files / slurm_mcp-0.0.1.tar.gz
| Download URL | slurm_mcp-0.0.1.tar.gz |
|---|---|
| Size | 134.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44a7b5077d1de69ad0ef4aba7b8deea7c1039bed25d97cb48e3052989ed0edc3
|
|
BLAKE2b-256 checksum How to use checksums |
23bff840ecf0c3cda5ac3d2a58a11b0af427d871707f12e09b2bbeb30deecdc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2025.
Transparency logRelease files / slurm_mcp-0.0.1-py3-none-any.whl
| Download URL | slurm_mcp-0.0.1-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80454152d4f323bceeabd987228f12f669141dc230e64e2100c43502ff519673
|
|
BLAKE2b-256 checksum How to use checksums |
67ee74d7de20b1a1fcad28eac8d4507b66c7313afae2e23c64d50ea49c16ee0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2025.
Transparency logSecurity for slurm-mcp 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for slurm_mcp-0.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 7, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.