MCP Kubernetes

Model Context Protocol server for Kubernetes operations
  • python

10

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jterceiro-mcp_kubernetes": {
      "command": "python",
      "args": [
        "src/mcp_kubernetes/main.py"
      ]
    }
  }
}

You run an MCP server that gives you programmatic access to manage Kubernetes clusters. It lets you query pods, deployments, and nodes, fetch logs, and switch contexts across multiple Kubernetes environments from a single interface, making cluster administration more automation-friendly and centralized.

How to use

To interact with this MCP server, you call its functions from a compatible MCP client. You can list pods and deployments, fetch detailed pod/deployment information, manage scaling and rollouts, retrieve node information, and read logs from specific pods and containers. You can also switch between Kubernetes contexts and set a default context to streamline repeated tasks.

How to install

Prerequisites You need Python 3.8 or newer and a working internet connection.

Install the required Python dependencies and prepare to run the MCP server.

pip install -r requirements.txt

Additional notes

Configuration and logging utilities are provided to load Kubernetes configurations and to emit structured logs, helping you monitor and troubleshoot MCP operations across contexts and namespaces.

Run the MCP Kubernetes server with the Python entry point shown in the usage example to start listening for MCP client requests.

Available tools

get_pods

Retrieve the list of pods for a given context and namespace to monitor workload distribution.

get_pod_details

Fetch comprehensive details for a specific pod, including events, containers, volumes, and status.

get_deployments

List deployments within a specified namespace and context to observe application state.

scale_deployment

Scale the number of replicas for a deployment to adjust capacity.

rollout_deployment

Trigger a rollout/restart of a deployment to apply changes.

get_nodes

Obtain information about cluster nodes, including capacity, status, and roles.

get_logs

Retrieve logs from a specific pod and container, with options for previous logs and line limits.

get_available_contexts

Return the Kubernetes contexts that are configured for the MCP server.

set_default_context

Change the default Kubernetes context to simplify repeated operations across environments.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational