Skip to main content
Glama
jterceiro

MCP Kubernetes

by jterceiro

MCP Kubernetes

Model Context Protocol server for Kubernetes operations.

Description

This project implements an MCP (Model Context Protocol) server for advanced management of Kubernetes clusters. It provides tools to query, manage, and monitor resources such as pods, deployments, nodes, and logs, with support for multiple contexts and namespaces.

Related MCP server: MCP Server Kubernetes

Features

  • 🟒 Pod Management:

    • πŸ“¦ List pods by namespace and context.

    • πŸ” Retrieve complete pod details, including events, containers, volumes, and status.

  • πŸš€ Deployment Management:

    • πŸ“¦ List deployments by namespace and context.

    • πŸ“ˆ Scale replicas and rollout (restart) deployments.

    • πŸ“ Query detailed deployment status.

  • πŸ–₯️ Node Management:

    • πŸ—‚οΈ List nodes with capacity, status, roles, and cluster summary.

  • πŸ“„ Pod Logs:

    • πŸ“ Retrieve logs from specific pods and containers, with options for previous logs and line count.

  • πŸ”„ Multi-context Support:

    • πŸ”Ž Query and switch Kubernetes contexts.

    • βš™οΈ Set default context.

  • βš™οΈ Configuration and Logging:

    • πŸ› οΈ Utilities for loading Kubernetes configuration and structured logging.

Installation

pip install -r requirements.txt

Usage

Run the MCP server:

python src/mcp_kubernetes/main.py

API Examples

The tools are exposed as MCP functions and can be invoked from compatible clients:

  • Get pods: get_pods(context="my-context", namespace="default")

  • Pod details: get_pod_details(environment="prod", pod_name="nginx-123", namespace="default", context="my-context")

  • Get deployments: get_deployments(context="my-context", namespace="default")

  • Scale deployment: scale_deployment(namespace="default", deployment_name="web", replicas=5)

  • Rollout deployment: rollout_deployment(namespace="default", deployment_name="web")

  • Get nodes: get_nodes(context="my-context")

  • Get logs: get_logs(context="my-context", environment="prod", pod_name="nginx-123", namespace="default", container="nginx")

  • Available contexts: get_available_contexts()

  • Change context: set_default_context(context="other-context")

Project Structure

  • src/mcp_kubernetes/main.py: Main entry point for the MCP server.

  • src/mcp_kubernetes/config.py: Configuration and logging utilities.

  • src/mcp_kubernetes/tools/: Kubernetes tools modules:

    • deployments.py: Deployment management.

    • pods.py: Pod management and details.

    • nodes.py: Node information and summary.

    • logs.py: Pod log retrieval.

Contributing

Contributions are welcome! Please open an issue or pull request for suggestions and improvements.

License

MIT License. See the LICENSE file

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Enables comprehensive Kubernetes cluster management through kubectl operations, Helm chart deployments, pod troubleshooting, and node management. Supports both read-only and full cluster administration capabilities with built-in safety features.
    15,818
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Enables interactive Kubernetes cluster monitoring and troubleshooting through natural language queries. Users can diagnose pod issues, check service status, and investigate cluster problems using conversational AI.
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to interact with and manage Kubernetes clusters, supporting operations on pods, deployments, services, configmaps, secrets, namespaces, metrics, and events with built-in safety features for destructive actions.
    9
    14
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Create and manage AI agents that collaborate and solve problems through natural language interacti…

  • Enterprise AI Control Plane: governance, guardrails, spend tracking, compliance & smart routing.

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jterceiro/mcp_kubernetes'

If you have feedback or need assistance with the MCP directory API, please join our Discord server