Kubernetes MCP Server
An MCP server for fetching Kubernetes pod logs. This server provides AI assistants with the ability to list namespaces, pods, and access pod logs.
Features
- List available namespaces
- List pods in a namespace
- Get pod logs (with optional container selection and line limiting)
- Stream pod logs in real-time
Setup
- Install dependencies:
pip install -e .
-
Configure Kubernetes access:
Option A: Using Environment Variables (Recommended for specific cluster)
export K8S_API_SERVER="https://your-k8s-api-server" export K8S_TOKEN="your-service-account-token"
Option B: Using Local Kubeconfig
- The server will automatically try to use in-cluster configuration if running inside Kubernetes
- Otherwise, it will fall back to using your local kubeconfig file
For the Mareana dashboard cluster:
# Use the provided configuration source config.example.sh # Or set manually: export K8S_API_SERVER="https://dashboard-dev.mareana.com/api/v1" export K8S_TOKEN="test-dummy-token" export K8S_VERIFY_SSL="true"
Make sure you have the necessary permissions to access pod logs with your service account.
Running the Server
python -m k8s_mcp_server.server
Available Resources
The server provides the following resources:
-
Namespaces:
namespace/{namespace_name} -
Pods:
pod/{namespace_name}/{pod_name}
Available Tools
-
Get Pod Logs:
- Tool:
get_pod_logs - Parameters:
namespace: Kubernetes namespacepod_name: Name of the podcontainer: (optional) Container nametail_lines: (optional) Number of lines to return from the end
- Tool:
-
List Namespace Pods:
- Tool:
list_namespace_pods - Parameters:
namespace: Kubernetes namespace
- Tool:
Metadata
Release files for mareana-k8s-mcp-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mareana_k8s_mcp_server-0.1.1.tar.gz | 62.3 kB | Without provenance | Details for mareana_k8s_mcp_server-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mareana_k8s_mcp_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mareana_k8s_mcp_server-0.1.1-py3-none-any.whl |
Total release size: 68.6 kB
Release files / mareana_k8s_mcp_server-0.1.1.tar.gz
| Download URL | mareana_k8s_mcp_server-0.1.1.tar.gz |
|---|---|
| Size | 62.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d641fecd9e0dbef8d870a8547152937c336a762cd96df896ac53be0bf44c0eb
|
|
BLAKE2b-256 checksum How to use checksums |
b0f7a1af47002ed9a681d108b91bd8102f477a4820332203d5475095af5d191f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / mareana_k8s_mcp_server-0.1.1-py3-none-any.whl
| Download URL | mareana_k8s_mcp_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a74b21371f2662763809d7a4dc7c8584e1a669f955b8fecff85fc7eee8ebdb4
|
|
BLAKE2b-256 checksum How to use checksums |
b2be23596ae592a9d7d4759248672bf9c415c36d79199178d26f632682584515
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Security for mareana-k8s-mcp-server 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.