Skip to main content

slurm_mcp

CI

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 from sacct, and to get compute usage information based on Prometheus (once you configure it, see instructions below).

Demo

Screenshot from 2025-10-03 15-04-03

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.

  1. Install UV following the instructions here.

  2. Create a .vscode/mcp.json file with the following content:

{
    "servers": {
        "slurm_mcp": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "--from",
                "git+https://www.github.com/lebrice/slurm_mcp",
                "slurm_mcp"
            ]
        }
    }
}
  1. 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 the PROMETHEUS_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"
    

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)

Source distribution for slurm-mcp 0.0.1
File Size Uploaded
slurm_mcp-0.0.1.tar.gz 134.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for slurm-mcp 0.0.1
File Interpreter ABI Platform
slurm_mcp-0.0.1-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page