
How to add K8M to Claude Desktop
AI-driven mini Kubernetes dashboard with a built-in MCP server exposing 49 cluster operation tools Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 · 849★ · sse · apikey
Claude Desktop config for K8M
{
"mcpServers": {
"k8m": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:3618/mcp/k8m/sse",
"--header",
"Authorization: <token-from-k8m-个人中心-开放MCP>"
]
}
}
}Claude Desktop connects to remote servers through the `mcp-remote` proxy (installed on first run via npx). Restart Claude Desktop after saving.
Setup steps
- 1Open Claude Desktop → Settings → Developer → Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the K8M config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm K8M's tools appear under the 🔌 tools menu.
Before you start
- A running, self-hosted K8M instance (single binary or docker-compose; default port 3618)
- One or more Kubernetes clusters registered/managed in K8M
- The built-in 'k8m' MCP server enabled under 平台设置-MCP管理
- An MCP access link and Authorization Token created under 个人中心-开放MCP (the Token is bound to the creating user's cluster permissions)
What K8M can do in Claude Desktop
list_clustersList all registered Kubernetes clusters
scale_deploymentScale a Deployment up or down
restart_deploymentRestart a Deployment
stop_deploymentStop a Deployment
restore_deploymentRestore a stopped Deployment
update_tag_deploymentUpdate a Deployment's image tag
rollout_history_deploymentQuery a Deployment's rollout history
rollout_undo_deploymentRoll back a Deployment
Security
The MCP server is only reachable after you self-host K8M and create an access link under 个人中心-开放MCP; the URL http://localhost:3618/mcp/k8m/sse is a per-user template — replace localhost with your server IP and use your own generated link. External clients must authenticate by passing the Token (created under 个人中心-开放MCP) in the Authorization header. MCP permissions are bound to the creating user's cluster authorization (read-only / exec / cluster-admin), so scope that user carefully — cluster-admin links can apply YAML, delete resources, drain nodes, and exec into Pods. Change the default k8m/k8m credentials and enable 2FA before exposing the dashboard.
K8M + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the K8M config there under the "mcpServers" key and restart the client.
Is K8M safe to use with Claude Desktop?
The MCP server is only reachable after you self-host K8M and create an access link under 个人中心-开放MCP; the URL http://localhost:3618/mcp/k8m/sse is a per-user template — replace localhost with your server IP and use your own generated link. External clients must authenticate by passing the Token (created under 个人中心-开放MCP) in the Authorization header. MCP permissions are bound to the creating user's cluster authorization (read-only / exec / cluster-admin), so scope that user carefully — cluster-admin links can apply YAML, delete resources, drain nodes, and exec into Pods. Change the default k8m/k8m credentials and enable 2FA before exposing the dashboard.
What transport does the MCP server use?
SSE only. The docs state the built-in MCP server supports the SSE protocol exclusively; the endpoint is http://<server-ip>:3618/mcp/k8m/sse.
How does authentication work?
Create an access link/Token under 个人中心-开放MCP in the K8M UI, then pass it in the Authorization header from your MCP client. The link inherits the creating user's cluster permissions (read-only, exec, or cluster-admin).
Do I need to install a package?
No npm/pip package. You self-host the K8M binary (or docker-compose), enable the built-in k8m MCP server in admin settings, and connect your client to the SSE URL.