MCP server
Use kdashboard as the Kubernetes MCP server of Claude Code, Claude Desktop, Cursor, Codex or any other MCP client on your machine.
The tools the agent panel uses can also be served to the AI clients you already work in. They see the cluster through kdashboard: your kubeconfig credentials, your RBAC, and the same approval dialog in front of every change.
Turn it on
- Open Settings (⌘,) → General → AI Agent → Expose to external AI tools (MCP server).
- Switch on Enable external MCP endpoint. A token is generated the first time.
- The status line reads
Listening on http://127.0.0.1:47831/mcp.
| Setting | |
|---|---|
| Port | 47831 by default; any port from 1024 to 65535 |
| Token | Show, copy, or regenerate. Regenerating disconnects every client until you give it the new token. |
The endpoint listens on 127.0.0.1 only, requires the bearer token on every request, and runs only while kdashboard is open.
Connect a client
The Connect row has a copy button for each client, with your port and token already filled in.
Claude Code
Copy Claude Code command, then paste it in a terminal:
claude mcp add --transport http kdashboard http://127.0.0.1:47831/mcp \
--header "Authorization: Bearer <token>"
Claude Desktop and Cursor
Copy JSON config, then merge it into the client’s MCP configuration:
{
"mcpServers": {
"kdashboard": {
"type": "http",
"url": "http://127.0.0.1:47831/mcp",
"headers": { "Authorization": "Bearer <token>" }
}
}
}
Codex
Copy Codex config, then add it to ~/.codex/config.toml and export the token:
[mcp_servers.kdashboard]
url = "http://127.0.0.1:47831/mcp"
bearer_token_env_var = "KDASHBOARD_MCP_TOKEN"
export KDASHBOARD_MCP_TOKEN=<token>
How it behaves
- The tools are the same ten read tools and four mutations listed for the agent panel.
- Clients follow the app. They act on the context that is active in kdashboard at that moment. Switch context in the app, and the next tool call goes to the new cluster.
get_current_contexttells the client where it is. - Changes are approved in kdashboard, not in the client. When a client asks to scale, restart, delete a pod or change resources, the Agent requests a change dialog appears in the app window. Unanswered for five minutes, it is denied.
- This endpoint is independent of the agent panel: the panel’s own sessions work whether it is on or off.
Keep the token safe
The token is stored in kdashboard’s settings file. Anyone who can read that file can use the endpoint with your cluster permissions while kdashboard is open. Regenerate the token if in doubt, and turn the endpoint off when you do not use it.