Skip to content

Use with your agent

Connect Claude or another MCP-capable agent to mcp.c4e.ai so it can run Slurm jobs for you, as you.

The cluster has a remote MCP server at https://mcp.c4e.ai. Point an agent at it and the agent can check the queue, submit and cancel jobs, and look at nodes for you. It always acts as your own cluster account, so it can do only what you can.

Connect Claude

  1. Add the connector

    In Claude, open Settings, then Connectors, then Add custom connector. Name it C4E and paste https://mcp.c4e.ai as the URL. Leave the OAuth client ID and secret empty.

  2. Sign in

    Click Connect. You’ll see the usual C4E sign-in at id.c4e.ai: enter your email and the code we send you.

  3. Approve

    A consent page named C4E for agents lists what the agent may do. Approve it, and Claude shows the cluster tools.

Other agents that support remote MCP servers with OAuth (such as Claude Code: claude mcp add --transport http c4e https://mcp.c4e.ai) connect the same way. Sign-ins last 30 days before you’re asked again.

What the agent can do

Tool What it does Arguments
list_jobs Jobs in the queue, yours and others’ none
get_job One job’s state, exit code, reason and output file paths {"path": {"job_id": "123"}}
submit_job Submit a batch job as you see below
cancel_job Cancel one of your own jobs {"path": {"job_id": "123"}}
list_nodes The Sparks, with free CPUs, memory and GPUs none
list_partitions Partitions and their limits none

A job submission looks like this. Replace your-username with your cluster username:

{
  "body": {
    "script": "#!/bin/bash\nsrun --container-image=nvcr.io#nvidia/cuda:13.0.1-base-ubuntu24.04 nvidia-smi -L",
    "job": {
      "name": "gpu-check",
      "partition": "jobs",
      "current_working_directory": "/home/your-username",
      "environment": ["PATH=/usr/bin:/bin"],
      "tres_per_node": "gres/gpu:1",
      "memory_per_node": {"set": true, "number": 65536},
      "time_limit": {"set": true, "number": 60}
    }
  }
}

The same rules apply as for any Slurm job. GPU jobs must ask for memory (memory_per_node is in MB), because GPU memory counts against the job.

What it can’t do yet

  • Read your job’s output files. Open them in Open OnDemand’s file browser.
  • Show finished jobs once they leave the queue.
  • Explain refusals. If Slurm says no (for example, cancelling someone else’s job), the agent sees a general error.
  • Admin tasks. Those stay in the admin tools.

Calling the models

The MCP server is for jobs. For the cluster’s models, have your agent or code call https://api.c4e.ai/v1 with an API key from chat.c4e.ai. See Use the API.

Reading these docs

Agents can read this site too, with no sign-in. Point an MCP client at https://docs.c4e.ai/mcp (read-only, separate from the cluster server above), or give it llms.txt for a plain-text index.

Type to search…

↑↓ navigate↵ selectEsc close