kx mcp
Runs a Model Context Protocol server on stdin/stdout, for an MCP client — Claude Code, an IDE, an agent framework — to start as a subprocess.
Ten tools: list_marks and mark for kx’s marks; list_resources to list a kind; diagnose and tree for a resource’s health and ownership; events and logs for what happened; top for current usage; get_yaml for its manifest (Secrets redacted); and scan for image CVEs.
Every tool is read-only against the cluster. Resources are named by kind and name, by a mark, or by an index — a row number from your terminal’s current listing, read live. By default the one thing it writes is a new mark, and it refuses to move one you already set.
The server follows your kubeconfig live: switch context and the next call reads the new cluster, and says so in its result.
With --write-listings, what the agent lists — list_resources, a diagnose sweep, tree and top — is saved to your kx history as kx get, kx diag, kx tree and kx top would save it, and each row carries its index, so a number the agent quotes works in your terminal. Those listings are tagged: kx state says ‘via kx mcp’, and kx delete and kx drain say an index came from one before they act.
Usage
kx mcp [OPTIONS]Options
| Option | Description |
|---|---|
--write-listings | Save the agent’s listings to your kx history, tagged as agent-made, so their indexes work in your terminal |
Global options
| Option | Description |
|---|---|
--no-color | Disable styled output |
-h, --help | Show this message and exit |
Examples
claude mcp add kx -- kx mcp
claude mcp add kx -- kx mcp --write-listings