About Kubernetes MCP Server
A backend MCP server for managing Kubernetes resources and working with pod logs. It is aimed at users who need resource operations, log searches, and export formatting through an interactive interface.
Key features
- 01Create, list, inspect, and delete resources
- 02Retrieve pod logs
- 03Search logs by pattern
- 04Export logs as plaintext, JSON, CSV, or NDJSON
- 05Extensible architecture
Use cases
- 01Create or inspect Kubernetes resources
- 02Find matching patterns in pod logs
- 03Export logs in a selected format
MCP support
Exposes Kubernetes resource operations and log retrieval, search, and export capabilities through MCP.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEKubernetes MCP Server
A backend system that provides an interactive and extensible interface for managing Kubernetes resources, retrieving and analyzing logs, and formatting logs for export through the Model Context Protocol (MCP).
Features
- CRUD operations on Kubernetes resources (Pods, Services, Namespaces, Deployments, etc.)
- Log retrieval and pattern searching
- Log formatting and exporting in multiple formats (Plaintext, JSON, CSV, NDJSON)
- Extensible architecture for future enhancements
Requirements
- Go 1.24+
- Kubernetes cluster access
- kubectl configured
Installation
# Clone the repository
git clone https://github.com/mayukhsarkar/k8s-mcp-server.git
cd k8s-mcp-server
# Build the binary
go build -o k8s-mcp-server
# Run the server
./k8s-mcp-server serve
Usage
# Start the MCP server
./k8s-mcp-server serve
# Get help
./k8s-mcp-server --help
API Documentation
The MCP server exposes HTTP endpoints for interacting with Kubernetes resources and logs.
Kubernetes Operations
POST /api/v1/resources/{resource_type}- Create a resourceGET /api/v1/resources/{resource_type}- List resourcesGET /api/v1/resources/{resource_type}/{name}- Get resource detailsDELETE /api/v1/resources/{resource_type}/{name}- Delete a resource
Log Operations
GET /api/v1/logs/{namespace}/{pod}- Get logs from a podGET /api/v1/logs/search- Search logs with pattern matchingGET /api/v1/logs/export- Export logs in various formats
License
MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.