1. Conduid
  2. Cloud
  3. K8s MCP Server
MCP server · Cloud

K8s MCP Server

MCP server for Kubernetes

Unclaimed last commit a year ago cloud
43Fair

Scored 5 months ago · breakdown

About K8s MCP Server

K8s MCP Server is an MCP server published by HomayoonAlimohammadi in the Cloud category: mCP server for Kubernetes.

The repository has 1 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/HomayoonAlimohammadi/k8s-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about K8s MCP Server

Powered by Claude · Grounded in docs

I know everything about K8s MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 22 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • !License declaredNo license file. Legally you have no right to use it in a product.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

K8s MCP Server

A Model Context Protocol (MCP) server that provides Kubernetes cluster access tools for AI assistants.

Overview

This MCP server allows AI assistants to interact with Kubernetes clusters by providing tools to:

  • Get specific Kubernetes resources
  • List resources with filtering capabilities

The server uses the Kubernetes Go client library and supports both in-cluster and external cluster configurations.

Features

  • Resource Access: Get and list Kubernetes resources by kind, name, and namespace
  • Filtering: Support for label selectors when listing resources
  • Flexible Authentication: Works with kubeconfig files or in-cluster service account
  • Structured Logging: Configurable logging levels and formats
  • Graceful Shutdown: Proper signal handling and shutdown procedures

Installation

Prerequisites

  • Go 1.23.2 or later
  • Access to a Kubernetes cluster
  • Valid kubeconfig file (if running outside the cluster)

Build from source

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

Configuration

The server is configured through environment variables:

Variable Default Description
SERVER_NAME k8s-mcp-server Server name identifier
SERVER_VERSION 1.0.0 Server version
KUBECONFIG ~/.kube/config Path to kubeconfig file
K8S_IN_CLUSTER false Use in-cluster configuration
LOG_LEVEL info Logging level (debug, info, warn, error)
LOG_FORMAT text Log format (text, json)

Usage

Running the server

# Using default configuration
./bin/k8s-mcp-server

# With custom configuration
SERVER_NAME=my-k8s-server LOG_LEVEL=debug ./bin/k8s-mcp-server

Available Tools

getResource

Get a specific Kubernetes resource.

Parameters:

  • kind (required): Resource kind (e.g., "Pod", "Service", "Deployment")
  • name (required): Resource name
  • namespace (optional): Resource namespace

listResources

List Kubernetes resources with optional filtering.

Parameters:

  • kind (required): Resource kind to list
  • namespace (optional): Namespace to search in
  • labelSelector (optional): Label selector for filtering

Example Usage with MCP Client

// Get a specific pod
await mcpClient.callTool("getResource", {
  kind: "Pod",
  name: "my-pod",
  namespace: "default"
});

// List all deployments in a namespace
await mcpClient.callTool("listResources", {
  kind: "Deployment",
  namespace: "production"
});

// List pods with label selector
await mcpClient.callTool("listResources", {
  kind: "Pod",
  labelSelector: "app=nginx"
});

Development

Running in development

make run

Testing

make test

Code formatting and linting

make fmt
make lint

Docker

Build image

make docker-build

Run container

make docker-run

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

README fetched from the repository 22 hours ago. The original is authoritative.

Questions

About K8s MCP Server

How do I install K8s MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is K8s MCP Server safe to use with an AI agent?

Its trust score is 43 out of 100 (fair). It passes 3 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is K8s MCP Server still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.