by Flux159
MCP Server for kubernetes management commands
# Add to your Claude Code skills
git clone https://github.com/Flux159/mcp-server-kubernetesGuides for using mcp servers skills like mcp-server-kubernetes.
mcp-server-kubernetes is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by Flux159. MCP Server for kubernetes management commands. It has 1,617 GitHub stars.
mcp-server-kubernetes's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/Flux159/mcp-server-kubernetes" and add it to your Claude Code skills directory (see the Installation section above).
mcp-server-kubernetes is primarily written in TypeScript. It is open-source under Flux159 on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mcp-server-kubernetes against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
MCP Server that can connect to a Kubernetes cluster and manage it. Supports loading kubeconfig from multiple sources in priority order.
https://github.com/user-attachments/assets/f25f8f4e-4d04-479b-9ae0-5dac452dd2ed
Before using this MCP server with any tool, make sure you have:
You can verify your connection by running kubectl get pods in a terminal to ensure you can connect to your cluster without credential issues.
By default, the server loads kubeconfig from ~/.kube/config. For additional authentication options (environment variables, custom paths, etc.), see ADVANCED_README.md.
Add the MCP server to Claude Code using the built-in command:
claude mcp add kubernetes -- npx mcp-server-kubernetes
This will automatically configure the server in your Claude Code MCP settings.
Add the MCP server to Codex CLI using the built-in command:
codex mcp add kubernetes -- npx mcp-server-kubernetes
This registers the server globally in ~/.codex/config.toml and makes its tools available in all Codex sessions.
Add the following configuration to your Claude Desktop config file:
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
MCP Server Kubernetes is also available as a mcpb (formerly dxt) extension. In Claude Desktop, go to Settings (Cmd+, on Mac) -> Extensions -> Browse Extensions and scroll to find mcp-server-kubernetes in the modal. Install it & it will install & utilize kubectl via command line & your kubeconfig.
To manually install, you can also get the .mcpb by going to the latest Release and downloading it.
VS Code has built-in MCP support. Use the one-click install button above, or add the server to .vscode/mcp.json in your workspace (or to your user mcp.json via MCP: Open User Configuration):
{
"servers": {
"kubernetes": {
"type": "stdio",
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
Cursor supports MCP servers through its AI integration. Add the server to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
The server will automatically connect to your current kubectl context. You can verify the connection by asking the AI assistant to list your pods or create a test deployment.
Muse Code reads MCP servers from the mcp_servers block of ~/.config/muse/settings.json. The file must include "schema_version": 1:
{
"schema_version": 1,
"mcp_servers": {
"kubernetes": {
"transport": "stdio",
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
To connect over Streamable HTTP instead, first start the server in HTTP mode (it serves /mcp on port 3000 by default; see Streamable HTTP Transport):
ENABLE_UNSAFE_STREAMABLE_HTTP_TRANSPORT=1 npx mcp-server-kubernetes
Then point Muse Code at that endpoint with the streamable_http transport (headers is optional):
{
"schema_version": 1,
"mcp_servers": {
"kubernetes": {
"transport": "streamable_http",
"url": "http://localhost:3000/mcp",
"mode": "optional"
}
}
}
"mode": "optional" lets Muse Code start with a warning if the HTTP server isn't running, instead of aborting.
Start a new Muse Code session after editing the file, then run /mcp to confirm the kubernetes server and its tools are connected.
mcp-chat is a CLI chat client for MCP servers. You can use it to interact with the Kubernetes server.
npx mcp-chat --server "npx mcp-server-kubernetes"
Alternatively, pass it your existing Claude Desktop configuration file from above (Linux should pass the correct path to config):
Mac:
npx mcp-chat --config "~/Library/Application Support/Claude/claude_desktop_config.json"
Windows:
npx mcp-chat --config "%APPDATA%\Claude\claude_desktop_config.json"
kubectl_getkubectl_describekubectl_getkubectl_createkubectl_applykubectl_deletekubectl_logskubectl_contextexplain_resourcelist_api_resourceskubectl_scalekubectl_patchkubectl_rolloutkubectl_genericpingkubectl_scale (replaces legacy scale_deployment)port_forwardhelm_template_apply) to bypass authentication issueshelm_template_uninstall) to bypass authentication issuescleanup_pods) in states: Evicted, ContainerStatusUnknown, Completed, Error, ImagePullBackOff, CrashLoopBackOffnode_management) for maintenance and scaling operationsk8s-diagnose)
kubectl get secrets commands, does not affect logs)The MCP Kubernetes server includes optional OpenTelemetry integration for comprehensive observability. This feature is disabled by default and can be enabled via environment variables or Helm configuration.
Enable observability with environment variables:
export ENABLE_TELEMETRY=true
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
npx mcp-server-kubernetes
Works with any OTLP-compatible backend:
See docs/OBSERVABILITY.md for comprehensive documentation including:
#