mcpnertes
The server provides read-only access to a Kubernetes cluster through MCP tools, with policy-based restrictions on namespaces and resource kinds.
List cluster resources:
list_pods,list_deployments,list_services,list_nodes, andlist_namespaces(filtered by allowlist).Retrieve logs:
get_pod_logsfor a specific pod, andget_logsfor pods/deployments/jobs/label selectors with options like tail, container, timestamps, and since_seconds.Access cluster events:
get_eventsfor a namespace or all namespaces.Generic dynamic client access:
list_resourceandget_resourcecan work with any resource kind (including CRDs), but blocked kinds (e.g., Secrets) are always refused.Discover available resources:
list_api_resourcesshows which resource kinds (including CRDs) can be listed, omitting blocked kinds.All tools are read-only: every operation is GET/LIST only, and the policy (namespace allow/deny, resource block) is enforced before any cluster API call.
Provides read-only access to a Kubernetes cluster, with tools for listing pods, deployments, services, namespaces, nodes, events, and logs, as well as generic resource listing and retrieval, subject to namespace allow/deny and resource block policies.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcpnertes list all running pods in the default namespace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mcpnertes
Read-only Kubernetes MCP server. Every tool is GET/LIST-only, and every tool
passes through a config-driven policy (config.toml) before it touches the
cluster:
Namespace allowlist —
namespaces.allowdefaults to["*"](every namespace). Restrict it to an explicit list to scope the server to specific namespaces, and usenamespaces.denyto carve out exceptions.Resource blocklist —
resources.blockdefaults to["Secret"]. Blocked kinds are refused by every tool, including the genericlist_resource/get_resourcedynamic-client tools, so there's no way to route around the block by asking a different tool.
Both checks happen in a single chokepoint (mcpnertes.config.Policy) before
any Kubernetes API call is made — see src/mcpnertes/config.py.
Install
pip install -e .Related MCP server: Claude Ops Investigator
Run standalone
mcpnertesUse from an MCP client (Claude Desktop, Claude Code, etc.)
Add to the client's MCP server config. The policy (namespace allow/deny,
resource block) is set directly in env — no config.toml file needed.
uvx fetches and runs it from PyPI without a local install:
{
"mcpServers": {
"mcpnertes": {
"command": "uvx",
"args": ["mcpnertes"],
"env": {
"UV_HTTP_TIMEOUT": "120",
"MCPNERTES_NAMESPACE_ALLOW": "*",
"MCPNERTES_NAMESPACE_DENY": "kube-system,cert-manager",
"MCPNERTES_RESOURCE_BLOCK": "Secret"
}
}
}
}args must be plain mcpnertes, not mcpnertes@latest — @latest is
npm/npx syntax, not a valid uv/pip version specifier, and uvx will
hang trying to resolve it until the MCP client's connect timeout kills it.
Plain mcpnertes always resolves to the newest PyPI release.
UV_HTTP_TIMEOUT is optional but recommended on a cold cache: the first
uvx run downloads the kubernetes dependency (~4.4MiB) and uv's
default 30s HTTP timeout can be too short on a slow connection, causing
the same "connection timed out" symptom. 120s comfortably covers a cold
install; subsequent runs use uv's cache and start in milliseconds.
All three MCPNERTES_* env vars are optional and comma-separated. Omit
any of them to fall back to config.toml (if present) or the built-in
default (allow all namespaces, block Secret).
Not yet on PyPI? Point uvx at this checkout instead:
{
"mcpServers": {
"mcpnertes": {
"command": "uvx",
"args": ["--from", "/absolute/path/to/Mcpnertes", "mcpnertes"],
"env": {
"MCPNERTES_NAMESPACE_ALLOW": "*",
"MCPNERTES_NAMESPACE_DENY": "kube-system,cert-manager",
"MCPNERTES_RESOURCE_BLOCK": "Secret"
}
}
}
}Configuring the policy
Two equivalent ways to set it — pick whichever fits how you're running the server. If both are present, the env vars win field-by-field.
Env vars (for mcpServers configs — no file needed)
Variable | Format | Default |
| comma-separated, |
|
| comma-separated | (empty) |
| comma-separated, case-insensitive |
|
"env": {
"MCPNERTES_NAMESPACE_ALLOW": "default,staging",
"MCPNERTES_NAMESPACE_DENY": "",
"MCPNERTES_RESOURCE_BLOCK": "Secret,ConfigMap,Ingress"
}config.toml (for standalone runs)
Resolution order (first match wins): $MCPNERTES_CONFIG, ./config.toml
(current working directory), then the config.toml shipped next to the
installed package.
[namespaces]
# "*" = every namespace (default). Replace with an explicit list to scope
# the server to only those namespaces.
allow = ["*"]
# Namespaces to block even if matched by `allow`. `deny` always wins.
deny = []
[resources]
# Resource kinds always refused, regardless of which tool is called
# (including the generic list_resource/get_resource tools). Case-insensitive.
block = ["Secret"]Scope to specific namespaces:
[namespaces]
allow = ["default", "staging"]
deny = []Allow everything except a couple of sensitive namespaces:
[namespaces]
allow = ["*"]
deny = ["kube-system", "cert-manager"]Block additional resource kinds (e.g. also hide ConfigMaps and Ingresses):
[resources]
block = ["Secret", "ConfigMap", "Ingress"]Tools
Tool | Description |
| List pods in a namespace or across all namespaces |
| List deployments in a namespace or across all namespaces |
| Get logs from a specific pod |
| List services in a namespace or across all namespaces |
| List namespaces (filtered by the allowlist) |
| Get cluster events for a namespace or all namespaces |
| Get logs from a pod/deployment/job/label selector |
| List cluster nodes |
| List any resource kind (including CRDs) via the dynamic client |
| Get a single resource of any kind by name |
| Discover listable resource kinds the cluster exposes |
Testing
pip install -e ".[dev]"
pytest -qtests/test_config.py unit-tests the Policy allow/deny/block logic in
isolation. tests/test_e2e.py and tests/test_e2e_stdio.py are full
end-to-end tests with no mocks: they seed a real namespace/pod/deployment
/service/secret on whatever cluster your current kubeconfig context points
to, then drive the actual MCP server (in-process and as a real stdio
subprocess) against it. They auto-skip if no cluster is reachable.
License
Apache-2.0 — see LICENSE.
Available Tools
11 toolsget_eventsGet EventsBRead-onlyIdempotent
Get Kubernetes events from the cluster for a specific namespace or all namespaces
Inputs: namespace, field_selector.
get_logsGet LogsBRead-onlyIdempotent
Get logs from pods, deployments, jobs, or resources matching a label selector
Inputs: resource_type (required), name, tail, container, +4 more.
get_pod_logsGet Pod LogsBRead-onlyIdempotent
Get logs from a pod in a specified namespace
Inputs: pod_name (required), namespace (required), previous, container, +1 more.
get_resourceGet ResourceARead-onlyIdempotent
Get a single resource of any kind (including CRDs) by name via the dynamic client. GET only; never mutates. Blocked kinds are refused.
Inputs: kind (required), name (required), namespace, api_version.
list_api_resourcesList API ResourcesARead-onlyIdempotent
Discover which resource kinds (including CRDs) the cluster exposes and can be listed. Read-only discovery; blocked kinds are omitted.
Inputs: no named parameters.
list_deploymentsList DeploymentsARead-onlyIdempotent
List all deployments in a specified namespace
Inputs: namespace.
list_namespacesList NamespacesARead-onlyIdempotent
List all namespaces in the cluster (filtered by the namespace allowlist)
Inputs: no named parameters.
list_nodesList NodesARead-onlyIdempotent
List all nodes in the cluster
Inputs: no named parameters.
list_podsList PodsARead-onlyIdempotent
List all pods in a namespace or across all namespaces
Inputs: namespace.
list_resourceList ResourceARead-onlyIdempotent
List resources of any kind (including CRDs) via the dynamic client. GET/LIST only; never mutates. Blocked kinds (see config.toml) are refused.
Inputs: kind (required), namespace, api_version, field_selector, +1 more.
list_servicesList ServicesARead-onlyIdempotent
List all services in a namespace or across all namespaces
Inputs: namespace.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
There is notable overlap between list_pods, list_deployments, list_services, list_resource, and list_api_resources. list_resource and get_resource are generic dynamic-client tools that can overlap with the specific resource listers, though the specific ones are convenient. get_pod_logs and get_logs also overlap, with get_logs being a broader version of get_pod_logs.
Most tools follow a consistent list_<resource> or get_<resource> pattern. Minor deviations: list_resource and get_resource are generic rather than resource-specific, and list_api_resources is a discovery operation rather than listing actual resources, but the overall pattern is predictable.
11 tools is a reasonable count for a Kubernetes MCP server covering common read-only operations. It is slightly redundant because generic list_resource/get_resource could subsume the specific listers, but the count is not excessive.
The server is read-only by design, so it covers listing and getting resources, logs, events, and discovery. However, it lacks common read operations like describe/status for resources, and there is no way to get a single deployment or pod by name except through the generic get_resource, which is a minor gap.
Maintenance
Related MCP Connectors
Provides read access to your GKE and Kubernetes resources.
Read-only MCP for identity resolution and write guardrails.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Kubernetes cluster introspection via MCP tools, such as listing pods, namespaces, nodes, and events.4ISC
- FlicenseNot gradedqualityBmaintenanceEnables read-only Kubernetes incident investigation through MCP tools for listing pods, describing resources, fetching logs, and searching runbooks.1-
- AlicenseAqualityBmaintenanceEnables MCP clients to inspect and operate Kubernetes clusters across multiple contexts, with read-only/read-write/admin access modes and security flags controlling namespaces, contexts, deletes, applies, and exec.1095 npm3MIT
- AlicenseNot gradedqualityBmaintenanceEnables read-only inspection of Google Ads accounts through MCP, including account inventory, reporting, metadata, change history, and safe GAQL queries.Apache 2.0