# k8scortex-mcp [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/apatilgtn/k8scortex-mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 330  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/k8scortex-mcp

## Description
Kubernetes MCP server: 75 tools for GKE, AKS, EKS, RBAC, audit logging, GitOps, multi-cluster.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "k8scortex-mcp": {
    "command": "npx",
    "args": ["-y","k8scortex-mcp"],
    "env": {
      "K8SCORTEX_STDIO_ROLES": "",
      "CLUSTERS_CONFIG": "",
      "AZURE_KEYVAULT_URI": "",
      "USE_LOCAL_KUBECONFIG": "",
      "DEFAULT_CLUSTER": "",
      "OIDC_ISSUER": "",
      "OIDC_AUDIENCE": "",
      "OIDC_JWKS_URI": ""
    }
  }
}
```

**Requires environment variables:** `K8SCORTEX_STDIO_ROLES`, `CLUSTERS_CONFIG`, `AZURE_KEYVAULT_URI`, `USE_LOCAL_KUBECONFIG`, `DEFAULT_CLUSTER`, `OIDC_ISSUER`, `OIDC_AUDIENCE`, `OIDC_JWKS_URI` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What k8scortex-mcp does

k8scortex-mcp provides an MCP gateway for Kubernetes operations across local and managed clusters. It can work with kubeconfig contexts, Amazon EKS, Google GKE, and Azure Key Vault-backed AKS configurations. Registered clusters are addressed through a `cluster` parameter, allowing one MCP connection to route requests to different environments.

The server groups its 75 tools across workload management, deployments, configuration, observability, jobs, networking, GitOps, cluster administration, and generic read operations. Generic list and get coverage helps agents inspect resources beyond the server’s curated mutation paths.

Access control is applied per tool and cluster. A five-level role hierarchy, cluster-specific policies, and OIDC identities can restrict which operations a caller may perform. Each call is recorded with the caller, arguments, and result. Destructive operations use simulation mode by default, and short-lived EKS and GKE credentials are created on demand and retained only until expiration.

## How it works

Cluster sources are selected from the environment. Setting `CLUSTERS_CONFIG` uses a registry file; setting `AZURE_KEYVAULT_URI` uses an Azure Key Vault cluster index; otherwise, the server reads contexts from `KUBECONFIG` or the default kubeconfig, with in-cluster service-account access also supported. `DEFAULT_CLUSTER` supplies a fallback for calls that omit a target. Read-only calls may use that fallback, while mutating calls require an explicit cluster when multiple clusters are registered.

Registry entries can describe kubeconfig, EKS, GKE, or Azure Key Vault providers. EKS uses the AWS credential chain and can assume a configured role. GKE uses Application Default Credentials. Azure Key Vault entries retrieve base64-encoded kubeconfig data from a secret. Cluster policies can raise the minimum role for matching clusters or disable named tools; policies only make the global permissions more restrictive.

The server offers stdio for local MCP clients and SSE/HTTP for programmatic or shared deployments. HTTP mode expects OIDC configuration unless authentication is explicitly disabled. OIDC discovery, audience validation, optional JWKS overrides, and configurable role or group claims support identity providers such as Entra ID, Okta, Cognito, Keycloak, and Google.

## Setup and configuration

Local use requires Node.js 22 or newer and a working kubeconfig. Install the package through an MCP client using `npx -y k8scortex-mcp`, or build from source with `npm install`, `npm run build`, and the generated stdio entry point. `K8SCORTEX_STDIO_ROLES=developer` creates a read-only local session; omitting it exposes the full configured toolset.

For a shared service, deploy the Helm chart or container image and provide OIDC settings plus a cluster registry. The container listens on port 3000 in the documented example and exposes the MCP endpoint at `/mcp`. A management-cluster deployment can use Workload Identity, IRSA, or managed identity for cloud-provider access.

## Tools and capabilities

- Route operations to registered local, EKS, GKE, AKS, or OpenShift clusters.
- Inspect and manage workloads, deployments, jobs, networking, configuration, and cluster resources.
- Compare resources across clusters with cluster-aware policy checks.
- Preview destructive operations through default dry-run behavior.
- Apply role-based and per-cluster restrictions to tool calls.
- Record caller identity, arguments, and outcomes for auditing.

## Limitations and notes

Mutating access depends on both the server’s role configuration and the target cluster policy. A production policy can require an SRE-level role for writes or deny particular tools altogether. Cloud providers also require their respective permissions: EKS needs `eks:DescribeCluster` and an EKS access entry, while GKE needs `container.clusters.get` and Kubernetes RBAC. HTTP deployments must configure an identity provider unless authentication is deliberately disabled. The server does not replace Kubernetes RBAC or the permissions granted by the underlying cloud credentials.

_Full upstream README: https://allmcps.com/mcp/k8scortex-mcp/readme_

