
Mcp Openshift
io.github.dockndevaiPublished by GitHub account dockndevaiv0.2.0Updated Oct 24, 2026
Safe-by-default MCP for OpenShift / Kubernetes: projects, pods, logs, deployments, routes.
Overview
A safe-by-default MCP server that lets an assistant inspect and, in higher modes, operate an OpenShift or Kubernetes cluster: projects, pods, logs, deployments,
- What you can do
- Confirm identity and list visible projects/namespaces, list any resource kind with namespace and label filters, and fetch a single resource with full spec and status. Read pod container logs and recent namespace events. In read-write mode, set replicas on Deployments/DeploymentConfigs and restart Deployments. With extra flags, create or update resources from manifests and delete resources.
- When to use it
- Use it when an assistant should help triage or operate an OpenShift/Kubernetes cluster — checking what is running, reading logs and events, and making controlled changes such as scaling or restarting — with read-only access by default.
- Requirements
- Runs locally via npx (Node.js). Needs the cluster API URL in OPENSHIFT_SERVER and a credential: either OPENSHIFT_TOKEN, or OPENSHIFT_USERNAME plus OPENSHIFT_PASSWORD against the cluster's local identity provider. For private CAs, set OPENSHIFT_CA_CERT to the CA bundle. Network access to the cluster API is required.
Installation
In SourceWeft
- Open Mcp Openshift in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
mcp-openshift
A safe-by-default Model Context Protocol server for OpenShift / Kubernetes. It lets an agent explore and operate a cluster — projects, pods and logs, deployments and deploymentconfigs, routes, services, builds, imagestreams, and any resource by kind — and, in higher modes, scale workloads, restart deployments, apply manifests, and delete.
Connect with a token from the web console you already use, or your username/password against the cluster's local identity provider.
Part of the dockndevai MCP server suite — one governance model across all of them.
What it gives an agent
Starts read-only (see Safe by default); higher-capability tools are only registered when you raise the mode.
Install
You need your cluster's API URL and a credential. The quickest, since you use the browser console:
In the OpenShift web console, click your username (top-right) → Copy login command → Display Token. Copy the value after
--token=(sha256~…) and the URL after--server=.
Then set OPENSHIFT_SERVER + OPENSHIFT_TOKEN. (Console tokens are short-lived; grab a fresh one when it expires, or use username/password below, which re-logs in automatically.)
Configure
See docs/CLIENTS.md for Claude Code / Cursor / Codex / VS Code / Windsurf, and .env.example for every variable.
Authentication
Auth mode is chosen automatically (override with OPENSHIFT_AUTH):
- token —
OPENSHIFT_TOKEN(bearer). From the console (above) oroc whoami -t. - password —
OPENSHIFT_USERNAME+OPENSHIFT_PASSWORDagainst the cluster's built-in OAuth server (HTPasswd / LDAP / any challenge-capable local IdP). The server runs the same request-token flowoc login -u … -p …uses, caches the token at~/.mcp-openshift/token.json(0600), and re-logs in on expiry. The password is sent only to your cluster's OAuth endpoint and is never logged or written to disk.
TLS: clusters usually use a private CA — set OPENSHIFT_CA_CERT to the CA bundle, or (dev only) OPENSHIFT_INSECURE_TLS=true to skip verification.
Safe by default
Enforced by src/security.ts — defence in depth on top of your account's cluster RBAC:
OPENSHIFT_MODE—read-only(default) →read-write→admin. Tools above the mode aren't registered.OPENSHIFT_NAMESPACE_ALLOWLIST/OPENSHIFT_PROTECTED_NAMESPACES— confine writes to named namespaces; system namespaces (kube-*,openshift,openshift-*,default) are readable but never mutable.OPENSHIFT_ALLOW_APPLY— creating/updating resources needs this flag on top of read-write, plus a human confirmation.OPENSHIFT_ALLOW_DELETE— deletes need admin mode plus this flag, plus confirmation.OPENSHIFT_DRY_RUN— sends writes with KubernetesdryRun=All: validated and admission-checked, but nothing persists.- Human-in-the-loop — apply, delete, and scale-to-zero pause and ask a person to approve via MCP elicitation.
OPENSHIFT_AUDIT_LOG— a JSON audit line per guarded op on stderr; Secret values are redacted from all output.
Optional AI risk guard. Set OPENSHIFT_GUARD_MODE=monitor|enforce to have apply_resource / delete_resource consult a local laya-guard daemon (pipx install laya-guard && laya-guard) that classifies the operation allow/confirm/block before it runs. Runs after the apply/delete gates; only tightens, never grants; fails closed.
There is a bundled skill, openshift-safe-operations, that teaches an agent how to authenticate (including from the browser console), the safety rules, and the standard triage/operate workflows. See also SECURITY.md.
Developing
Licence
MIT
Source: README.md at commit 9a57679
Tools
0Version history
2- v0.2.0LatestSep 27, 2026
- v0.1.0Sep 19, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts