Skip to main content

Add your description here

Project description

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"
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slurm_mcp-0.0.1.tar.gz (134.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slurm_mcp-0.0.1-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file slurm_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: slurm_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 134.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slurm_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 44a7b5077d1de69ad0ef4aba7b8deea7c1039bed25d97cb48e3052989ed0edc3
MD5 5898d6afc6fb0b59580b0d22b8eb3c48
BLAKE2b-256 23bff840ecf0c3cda5ac3d2a58a11b0af427d871707f12e09b2bbeb30deecdc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for slurm_mcp-0.0.1.tar.gz:

Publisher: publish.yml on lebrice/slurm_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file slurm_mcp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: slurm_mcp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for slurm_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80454152d4f323bceeabd987228f12f669141dc230e64e2100c43502ff519673
MD5 2e6c20aa0ca1a1dfeabbec14209acaa9
BLAKE2b-256 67ee74d7de20b1a1fcad28eac8d4507b66c7313afae2e23c64d50ea49c16ee0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for slurm_mcp-0.0.1-py3-none-any.whl:

Publisher: publish.yml on lebrice/slurm_mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page