K8s (silenceper)

Cloud and DevOps

A Kubernetes MCP (Model Control Protocol) server that enables interaction with Kubernetes clusters through MCP tools.

Your AI app calls the K8s (silenceper) MCP server, which does the work through tools like get_api_resources, get_resource, list_resources and create_resource and sends the result back to the chat.

About K8s (silenceper)

K8s (silenceper) is a community MCP server from silenceper, filed in our directory under cloud and devops. A Kubernetes MCP (Model Control Protocol) server that enables interaction with Kubernetes clusters through MCP tools.

K8s (silenceper) runs on your own machine: your AI app starts it with the command docker run -i --rm and talks to it over standard input and output.

The README for K8s (silenceper) lists tools such as get_api_resources, get_resource, list_resources and create_resource, which your AI app can call once the server is connected.

At a glance

Publisher
silenceper (community)
Runs
Locally on your machine
Install from
Docker image: ghcr.io/silenceper/mcp-k8s:latest
Written in
Go
License
Apache-2.0
GitHub stars
152

Tools K8s (silenceper) gives your AI app

  • get_api_resourcesGet all supported API resource types in the cluster.
  • get_resourceGet detailed information about a specific resource.
  • list_resourcesList all instances of a resource type.
  • create_resourceCreate new resources (can be disabled).
  • update_resourceUpdate existing resources (can be disabled).
  • delete_resourceDelete resources (can be disabled).
  • list_helm_releasesList all Helm releases in the cluster.
  • get_helm_releaseGet detailed information about a specific Helm release.
  • install_helm_chartInstall a Helm chart (can be disabled).
  • upgrade_helm_chartUpgrade a Helm release (can be disabled).
  • uninstall_helm_chartUninstall a Helm release (can be disabled).
  • list_helm_repositoriesList configured Helm repositories.
  • add_helm_repositoryAdd a new Helm repository (can be disabled).
  • remove_helm_repositoryRemove a Helm repository (can be disabled).

Tool names as the K8s (silenceper) README lists them. Your AI app shows the live list once K8s (silenceper) is connected.

How to set up K8s (silenceper)

  1. Have Docker running on the machine that runs your AI app, because K8s (silenceper) starts as a container.
  2. Check the K8s (silenceper) README for keys or settings; the registry lists none that K8s (silenceper) requires.
  3. Add K8s (silenceper) to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the K8s (silenceper) tools to confirm the connection.
  5. Run one read-only task with K8s (silenceper) first, such as a call to get_api_resources, before you allow anything that writes or sends.

K8s (silenceper) compared with similar servers

  • Diagram by andrewmoshu has fewer GitHub stars than K8s (silenceper) (150 against 152); both are community servers, and both run locally.
  • Comfy Colab Kit by FireTable has fewer GitHub stars than K8s (silenceper) (152 against 152); both are community servers, and both run locally.
  • Kom by weibaohui has fewer GitHub stars than K8s (silenceper) (150 against 152); both are community servers, and both run locally.

Before you connect K8s (silenceper)

  • Give K8s (silenceper) its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each K8s (silenceper) tool call until you trust what it does with them.
  • Treat text that K8s (silenceper) fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for K8s (silenceper) on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for K8s (silenceper)

How marketing and sales teams put K8s (silenceper) to work, by company size. Pick the size closest to yours and start K8s (silenceper) on one use case.

Small business

  • A small business can ask K8s (silenceper) why the site is slow or down and get the likely cause in plain words.
  • Owners can use K8s (silenceper) to check hosting costs and spot services they pay for but no longer use.
  • K8s (silenceper) runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Web teams can connect K8s (silenceper) to watch deploys during a launch and roll back fast if a campaign page breaks.
  • Marketing engineering can use K8s (silenceper) to spin up preview environments for every landing page review.
  • Start with get_api_resources and get_resource, the tools K8s (silenceper) lists first, and add more once the team trusts the results.

Enterprise

  • Enterprises should give K8s (silenceper) read access first, with changes gated by the same approvals as any infrastructure change.
  • Large orgs can use K8s (silenceper) to answer cost and reliability questions across accounts, so marketing launches are planned with real capacity.
  • K8s (silenceper) is a community server, so have security review the code and pin a version before K8s (silenceper) touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

K8s (silenceper) README

From silenceper/mcp-k8s on GitHub, shared under its Apache-2.0 license. Images are left out; the original has them.

README.md

mcp-k8s

A Kubernetes MCP (Model Control Protocol) server that enables interaction with Kubernetes clusters through MCP tools.

Features

  • Query supported Kubernetes resource types (built-in resources and CRDs)
  • Kubernetes resource operations with fine-grained control
    • Read operations: get resource details, list resources by type with filtering options
    • Write operations: create, update, and delete resources (each can be independently enabled/disabled)
    • Support for all Kubernetes resource types, including custom resources
  • Connects to Kubernetes cluster using kubeconfig
  • Helm support with fine-grained control
    • Helm releases management (list, get, install, upgrade, uninstall)
    • Helm repositories management (list, add, remove)
    • Each operation can be independently enabled/disabled

Preview

Interaction through cursor

Use Cases

1. Kubernetes Resource Management via LLM
  • Interactive Resource Management: Manage Kubernetes resources through natural language interaction with LLM, eliminating the need to memorize complex kubectl commands
  • Batch Operations: Describe complex batch operation requirements in natural language, letting LLM translate them into specific resource operations
  • Resource Status Queries: Query cluster resource status using natural language and receive easy-to-understand responses
2. Automated Operations Scenarios
  • Intelligent Operations Assistant: Serve as an intelligent assistant for operators in daily cluster management tasks
  • Problem Diagnosis: Assist in cluster problem diagnosis through natural language problem descriptions
  • Configuration Review: Leverage LLM's understanding capabilities to help review and optimize Kubernetes resource configurations
3. Development and Testing Support
  • Quick Prototype Validation: Developers can quickly create and validate resource configurations through natural language
  • Environment Management: Simplify test environment resource management, quickly create, modify, and clean up test resources
  • Configuration Generation: Automatically generate resource configurations that follow best practices based on requirement descriptions
4. Education and Training Scenarios
  • Interactive Learning: Newcomers can learn Kubernetes concepts and operations through natural language interaction
  • Best Practice Guidance: LLM provides best practice suggestions during resource operations
  • Error Explanation: Provide easy-to-understand error explanations and correction suggestions when operations fail

Architecture

1. Project Overview

An stdio-based MCP server that connects to Kubernetes clusters and provides the following capabilities:

  • Query Kubernetes resource types (including built-in resources and CRDs)
  • CRUD operations on Kubernetes resources (with configurable write operations)
  • Helm operations for release and repository management
2. Technical Stack
  • Go
  • mcp-go SDK
  • Kubernetes client-go library
  • Helm v3 client library
  • Stdio for communication
3. Core Components
  1. MCP Server: Uses mcp-go's mcp-k8s package to create an stdio-based MCP server
  2. K8s Client: Uses client-go to connect to Kubernetes clusters
  3. Helm Client: Uses Helm v3 library for Helm operations
  4. Tool Implementations: Implements various MCP tools for different Kubernetes operations
4. Available Tools
Resource Type Query Tools
  • get_api_resources: Get all supported API resource types in the cluster
Resource Operation Tools
  • get_resource: Get detailed information about a specific resource
  • list_resources: List all instances of a resource type
  • create_resource: Create new resources (can be disabled)
  • update_resource: Update existing resources (can be disabled)
  • delete_resource: Delete resources (can be disabled)
Helm Operation Tools
  • list_helm_releases: List all Helm releases in the cluster
  • get_helm_release: Get detailed information about a specific Helm release
  • install_helm_chart: Install a Helm chart (can be disabled)
  • upgrade_helm_chart: Upgrade a Helm release (can be disabled)
  • uninstall_helm_chart: Uninstall a Helm release (can be disabled)
  • list_helm_repositories: List configured Helm repositories
  • add_helm_repository: Add a new Helm repository (can be disabled)
  • remove_helm_repository: Remove a Helm repository (can be disabled)

Usage

mcp-k8s supports three communication modes:

1. Stdio Mode (Default)

In stdio mode, mcp-k8s communicates with the client through standard input/output streams. This is the default mode and is suitable for most use cases.

# Run in stdio mode (default)
{
    "mcpServers":
    {
        "mcp-k8s":
        {
            "command": "/path/to/mcp-k8s",
            "args":
            [
                "--kubeconfig",
                "/path/to/kubeconfig",
                "--enable-create",
                "--enable-delete",
                "--enable-update",
                "--enable-list",
                "--enable-helm-install",
                "--enable-helm-upgrade"
            ]
        }
    }
}
2. SSE Mode

In SSE (Server-Sent Events) mode, mcp-k8s exposes an HTTP endpoint to mcp client. You can deploy the service on a remote server (but you need to pay attention to security)

# Run in SSE mode
./bin/mcp-k8s --kubeconfig=/path/to/kubeconfig --transport=sse --port=8080 --host=localhost --enable-create --enable-delete --enable-list --enable-update --enable-helm-install
# This command will open all operations

mcp config

{
  "mcpServers": {
    "mcp-k8s": {
      "url": "http://localhost:8080/sse",
      "args": []
    }
  }
}

SSE mode configuration:

  • --transport: Set to "sse" to enable SSE mode
  • --port: HTTP server port (default: 8080)
  • --host: HTTP server host (default: "localhost")
3. Streamable HTTP Mode

In Streamable HTTP mode, mcp-k8s exposes an HTTP endpoint that supports both direct HTTP responses and SSE streams. This mode provides better flexibility and supports streaming output.

# Run in Streamable HTTP mode
./bin/mcp-k8s --kubeconfig=/path/to/kubeconfig --transport=streamable-http --port=8080 --host=localhost --endpoint-path=/mcp --enable-create --enable-delete --enable-list --enable-update --enable-helm-install

mcp config

{
  "mcpServers": {
    "mcp-k8s": {
      "url": "http://localhost:8080/mcp",
      "args": []
    }
  }
}

Streamable HTTP mode configuration:

  • --transport: Set to "streamable-http" to enable Streamable HTTP mode
  • --port: HTTP server port (default: 8080)
  • --host: HTTP server host (default: "localhost")
  • --endpoint-path: Endpoint path for the MCP server (default: "/mcp")
4. Docker environment
SSE Mode
  1. Complete Example Assuming your image name is mcp-k8s and you need to map ports and set environment parameters, you can run:
docker run --rm -p 8080:8080 -i -v ~/.kube/config:/root/.kube/config ghcr.io/silenceper/mcp-k8s:latest --transport=sse
Streamable HTTP Mode
docker run --rm -p 8080:8080 -i -v ~/.kube/config:/root/.kube/config ghcr.io/silenceper/mcp-k8s:latest --transport=streamable-http --endpoint-path=/mcp
stdio Mode
{
  "mcpServers": {
    "mcp-k8s": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "-v",
        "~/.kube/config:/root/.kube/config",
        "--rm",
        "ghcr.io/silenceper/mcp-k8s:latest"
      ]
    }
  }
}

Getting Started

Direct Usage

You can directly download the binary for your platform from the releases page and use it immediately.

Go Install
go install github.com/silenceper/mcp-k8s/cmd/mcp-k8s@latest
Build
Using Makefile (Recommended)

The Makefile automatically injects version information from the VERSION file:

git clone https://github.com/silenceper/mcp-k8s.git
cd mcp-k8s
make build

This will build with version information injected via ldflags.

Direct Build
git clone https://github.com/silenceper/mcp-k8s.git
cd mcp-k8s
go build -o bin/mcp-k8s cmd/mcp-k8s/main.go

Note: Direct build will show version as "dev" unless you specify ldflags manually.

Command Line Arguments

You can use mcp-k8s --help to see all available options, or mcp-k8s --version to check the version.

Kubernetes Resource Operations
  • --kubeconfig: Path to Kubernetes configuration file (uses default config if not specified)
  • --enable-create: Enable resource creation operations (default: false)
  • --enable-update: Enable resource update operations (default: false)
  • --enable-delete: Enable resource deletion operations (default: false)
  • --enable-list: Enable resource list operations (default: true)
Helm Operations
  • --enable-helm-release-list: Enable Helm release list operations (default: true)
  • --enable-helm-release-get: Enable Helm release get operations (default: true)
  • --enable-helm-install: Enable Helm chart installation (default: false)
  • --enable-helm-upgrade: Enable Helm chart upgrade (default: false)
  • --enable-helm-uninstall: Enable Helm chart uninstallation (default: false)
  • --enable-helm-repo-list: Enable Helm repository list operations (default: true)
  • --enable-helm-repo-add: Enable Helm repository add operations (default: false)
  • --enable-helm-repo-remove: Enable Helm repository remove operations (default: false)
Transport Configuration
  • --transport: Transport type (stdio, sse, or streamable-http) (default: "stdio")
  • --host: Host for HTTP transport (SSE or Streamable HTTP) (default: "localhost")
  • --port: TCP port for HTTP transport (SSE or Streamable HTTP) (default: 8080)
  • --endpoint-path: Endpoint path for Streamable HTTP transport (default: "/mcp")
Version Information
  • --version: Display version information including version, commit hash, and build date
  • --help or -h: Display help information
Testing Streamable HTTP

To test if Streamable HTTP mode is working correctly, you can use the provided test script:

# Start the server in one terminal
./bin/mcp-k8s --transport=streamable-http --port=8080 --enable-list

# In another terminal, run the test script
./test_streamable_http.sh

For detailed testing instructions, see TEST_STREAMABLE_HTTP.md.

Integration with MCP Clients

mcp-k8s is an stdio-based MCP server that can be integrated with any MCP-compatible LLM client. Refer to your MCP client's documentation for integration instructions.

Security Considerations

  • Write operations are strictly controlled through independent configuration switches
  • Uses RBAC to ensure K8s client has only necessary permissions
  • Validates all user inputs to prevent injection attacks
  • Helm operations follow the same security principles with read operations enabled by default and write operations disabled by default

Follow WeChat Official Account

Questions about K8s (silenceper)

What is the K8s (silenceper) MCP server?

A Kubernetes MCP (Model Control Protocol) server that enables interaction with Kubernetes clusters through MCP tools. K8s (silenceper) is maintained by silenceper on GitHub at silenceper/mcp-k8s, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the K8s (silenceper) MCP server?

Add K8s (silenceper) to your AI app's MCP config with the command docker run -i --rm ghcr.io/silenceper/mcp-k8s:latest. In Claude Code, run claude mcp add --transport stdio k8s -- docker run -i --rm ghcr.io/silenceper/mcp-k8s:latest. To run K8s (silenceper) this way you need Docker running.

Does K8s (silenceper) need an API key?

The registry lists no required keys for K8s (silenceper). Check the K8s (silenceper) README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is K8s (silenceper) an official MCP server?

No. K8s (silenceper) is a community server maintained by silenceper. Community servers can be excellent; read the code and the open issues before you give K8s (silenceper) access to company data.

What license is K8s (silenceper) under?

K8s (silenceper) is released under the Apache-2.0 license, according to its GitHub repository. The license covers the code of K8s (silenceper); the service it connects to has its own terms.