clusterctl mcp serve
clusterctl mcp serve
Serve the Model Context Protocol over standard input and output
Synopsis
Run an MCP server on standard input and output for a client started on this workstation. It acts as you: your configuration, your ssh agent, and the context it was started in, which it keeps for its whole life.
The agent can resolve node sets, describe nodes, query Slurm and run any command that only reads. It cannot change anything directly. A change is planned first, which resolves the node set once, refuses protected hosts and shows exactly what would be sent; applying the plan puts the same question the confirmation prompt asks to you, through the client, and the agent cannot answer it. Every plan and every attempt to apply one is recorded in mcp/audit.jsonl under the state directory.
With –confirm=approval the question is left to the client’s own approval of the apply_plan call instead, for a client that cannot ask. Only use it with a client that asks you before every call of that tool.
Commands on the nodes cannot be run, and –yes, –force, –dry-run and –nodes are refused: the server never confirms or forces anything itself.
Register it with Claude Code:
claude mcp add clusterctl – clusterctl mcp serve –context prod
clusterctl mcp serve [flags]Options
--confirm string who confirms a change: elicit or approval (default "elicit")
-h, --help help for serve
--plan-ttl duration how long a plan may wait to be applied (default 10m0s)Options inherited from parent commands
--config strings configuration file or directory to read, repeatable (default: CLUSTERCTL_CONFIG or the search path)
--context string context to act on (default: the current one)
--dry-run report what would be done and change nothing
--fanout int how many hosts to work on at once, at least 1 (default: from the configuration)
--force allow protected hosts, and nodes the inventory does not know, to be touched
-n, --nodes stringArray node set to act on, for example 'exe[1-10],@rack:R02' (default: CLUSTERCTL_NODES)
-o, --output string output format: table, wide, json, yaml, nodeset, name, jsonpath=, jq= (default "table")
--set stringArray override one configuration value as PATH=VALUE, repeatable
-y, --yes answer the confirmation prompts with yesSEE ALSO
- clusterctl mcp - Offer clusterctl to an AI agent