OpenShift MCP Server
v1.2.0OpenShift/Kubernetes cluster management via the oc CLI for MCP clients
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
oc_get
Get OpenShift resources like pods, deploymentconfigs, routes, projects, etc.
| Parameter | Type | Description |
|---|---|---|
resourceType * | string | Type of resource to get (e.g., pods, deploymentconfigs, routes, projects, services) |
allNamespaces | boolean | List resources across all namespaces |
context | string | OpenShift context to use (optional) |
fieldSelector | string | Filter resources by field selector |
labelSelector | string | Filter resources by label selector (e.g., app=nginx) |
name | string | Name of the resource (optional - if not provided, lists all resources) |
namespace | string | OpenShift namespace/project |
output | string | Output format |
oc_create
Create OpenShift resources like projects, deploymentconfigs, routes, etc.
| Parameter | Type | Description |
|---|---|---|
context | string | OpenShift context to use (optional) |
description | string | Description for project |
displayName | string | Display name for project |
dryRun | boolean | Validate only, don't create |
filename | string | Path to YAML file to create resources from |
hostname | string | Hostname for route |
image | string | Container image for deploymentconfig |
manifest | string | YAML manifest to create resources from |
name | string | Name of the resource |
namespace | string | OpenShift namespace/project |
replicas | number | Number of replicas |
resourceType | string | Type of resource to create (project, deploymentconfig, route, service, etc.) |
service | string | Service name for route |
oc_install_operator
Install an Operator on the OpenShift/Kubernetes cluster using OLM, Helm, or direct manifests
| Parameter | Type | Description |
|---|---|---|
operatorName * | string | Name of the operator to install (e.g., "prometheus-operator", "cert-manager") |
channel | string | Update channel for the operator (stable, alpha, beta, etc.) |
context | string | OpenShift context to use (optional) |
createNamespace | boolean | Create namespace if it does not exist |
helmRepo | string | Helm repository URL (required if source is helm) |
installPlanApproval | string | Install plan approval strategy for OLM |
manifestUrl | string | URL to operator manifest (required if source is manifest) |
namespace | string | Target namespace for operator installation |
source | string | Installation method: olm (Operator Lifecycle Manager), helm (Helm chart), or manifest (direct YAML) |
version | string | Version of the operator to install (if not specified, installs latest available) |
oc_new_app
Create a new application from a GitHub repository using S2I build and expose it with an edge-terminated route
| Parameter | Type | Description |
|---|---|---|
gitRepo * | string | GitHub repository URL for the source code |
appName | string | Name for the application (if not specified, derives from repo name) |
builderImage | string | Builder image for S2I build (e.g., "nodejs:18-ubi8", "python:3.9-ubi8") |
context | string | OpenShift context to use (optional) |
contextDir | string | Context directory within the Git repository |
createNamespace | boolean | Create namespace if it does not exist |
env | array | Environment variables in KEY=VALUE format |
exposeRoute | boolean | Create an edge-terminated route to expose the application |
gitRef | string | Git reference (branch, tag, or commit) to build from (default: main/master) |
labels | array | Labels in KEY=VALUE format |
namespace | string | Target namespace for the application |
routeHostname | string | Custom hostname for the route (if not specified, uses default) |
strategy | string | Build strategy: source (S2I) or docker |
oc_scale
Scale the number of pods in a deployment, deploymentconfig, replicaset, or statefulset to the specified number of replicas
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource to scale |
replicas * | number | Number of replicas to scale to |
context | string | OpenShift context to use (optional) |
namespace | string | OpenShift namespace/project |
resourceType | string | Resource type to scale (deployment, deploymentconfig, replicaset, statefulset) |
oc_describe
Describe any OpenShift resource and share the output in various formats including human-readable summary
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource to describe |
resourceType * | string | Type of resource to describe (pod, deployment, service, route, etc.) |
context | string | OpenShift context to use (optional) |
namespace | string | OpenShift namespace/project |
output | string | Output format: text (default oc describe), yaml, json, or human-readable (concise summary) |
oc_apply
Apply YAML manifests to OpenShift cluster with comprehensive error handling and validation for all scenarios
| Parameter | Type | Description |
|---|---|---|
cascade | string | Deletion cascade strategy |
context | string | OpenShift context to use (optional) |
dryRun | boolean | Validate only, don't apply (client or server) |
fieldManager | string | Field manager name for server-side apply |
filename | string | Path to YAML file to apply |
force | boolean | Force apply, ignore conflicts |
gracePeriod | number | Grace period for resource deletion (seconds) |
kustomize | boolean | Apply kustomization directory |
manifest | string | YAML manifest content to apply |
namespace | string | OpenShift namespace/project |
overwrite | boolean | Overwrite existing resources |
prune | boolean | Prune resources not in current configuration |
pruneWhitelist | array | Resource types to include in pruning |
recursive | boolean | Process directory recursively |
selector | string | Label selector for pruning |
serverSideApply | boolean | Use server-side apply |
timeout | string | Timeout for wait operation (e.g., "60s", "5m") |
url | string | URL to YAML manifest to apply |
validate | boolean | Validate resources before applying |
wait | boolean | Wait for resources to be ready |
oc_delete
Delete OpenShift resources with comprehensive safety checks, validation, and error handling
| Parameter | Type | Description |
|---|---|---|
all | boolean | Delete all resources of the specified type |
allNamespaces | boolean | Delete resources across all namespaces |
cascade | string | Deletion cascade strategy |
confirm | boolean | Require explicit confirmation for destructive operations |
context | string | OpenShift context to use (optional) |
dryRun | boolean | Show what would be deleted without actually deleting |
fieldSelector | string | Delete resources matching field selector |
filename | string | Path to YAML file to delete resources from |
force | boolean | Force deletion (bypass finalizers) |
gracePeriodSeconds | number | Grace period for deletion in seconds |
ignore404 | boolean | Ignore 404 errors if resource does not exist |
labelSelector | string | Delete resources matching label selector |
manifest | string | YAML manifest defining resources to delete |
name | string | Name of the resource to delete |
namespace | string | OpenShift namespace/project |
recursive | boolean | Process directory recursively |
resourceType | string | Type of resource to delete (required if not using manifest/filename) |
timeout | string | Timeout for deletion operation (e.g., "60s", "5m") |
url | string | URL to YAML manifest defining resources to delete |
wait | boolean | Wait for deletion to complete |
oc_logs
Get logs from OpenShift resources like pods, deployments, builds, etc. with advanced filtering and streaming options
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource |
allContainers | boolean | Get logs from all containers in the pod |
container | string | Container name (for pods with multiple containers) |
context | string | OpenShift context to use (optional) |
follow | boolean | Follow logs output (stream live logs) |
limitBytes | number | Maximum bytes to return |
maxLogRequests | number | Maximum number of concurrent log requests when using selectors |
namespace | string | OpenShift namespace/project |
previous | boolean | Show logs from previous terminated container |
resourceType | string | Type of resource to get logs from |
selector | string | Label selector to filter pods |
since | string | Show logs since relative time (e.g. 5s, 2m, 3h) or absolute time |
sinceTime | string | Show logs since absolute timestamp (RFC3339) |
tail | number | Number of lines to show from end of logs (-1 for all) |
timestamps | boolean | Include timestamps in log output |
oc_patch
Patch OpenShift resources with strategic merge, JSON merge, or JSON patch operations
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource to patch |
patch * | string | Patch content as JSON string or YAML. For strategic merge patch (default), provide the fields to update. For JSON patch, use RFC 6902 format. |
resourceType * | string | Type of resource to patch (pod, deployment, service, route, configmap, secret, etc.) |
context | string | OpenShift context to use (optional) |
dryRun | boolean | Perform a dry run without making actual changes |
fieldManager | string | Field manager name for server-side apply tracking |
force | boolean | Force the patch operation, ignoring conflicts |
namespace | string | Namespace/project for the resource (not required for cluster-scoped resources) |
patchType | string | Type of patch operation |
recordHistory | boolean | Record the patch operation in the resource annotation for rollback purposes |
subresource | string | Subresource to patch (e.g., status, scale) |
oc_login
Securely log into an OpenShift cluster using username/password or token authentication
| Parameter | Type | Description |
|---|---|---|
authMethod * | string | Authentication method to use |
server * | string | OpenShift cluster server URL (e.g., https://api.cluster.example.com:6443) |
certificateAuthority | string | Path to certificate authority file for TLS verification |
context | string | Context name to save the login session (optional) |
insecureSkipTlsVerify | boolean | Skip TLS certificate verification (not recommended for production) |
namespace | string | Default namespace to set after login |
password | string | Password for password authentication (required if authMethod is password) |
timeout | number | Login timeout in seconds |
token | string | OpenShift authentication token (required if authMethod is token) |
username | string | Username for password authentication (required if authMethod is password) |
oc_api_resources
List all available API resources in the OpenShift cluster with their details
| Parameter | Type | Description |
|---|---|---|
apiGroup | string | Filter by specific API group (e.g., apps, extensions, networking.k8s.io) |
categories | boolean | Group resources by categories (core, apps, networking, etc.) |
context | string | OpenShift context to use (optional) |
namespaced | boolean | Filter by namespaced resources only |
output | string | Output format for the API resources list |
verbs | array | Filter by supported verbs (e.g., ["get", "list", "create", "delete"]) |
oc_explain
Explain OpenShift/Kubernetes resource schemas, fields, and API documentation
| Parameter | Type | Description |
|---|---|---|
resource * | string | Resource type to explain (e.g., pod, deployment, service, route.route.openshift.io) |
apiVersion | string | Specific API version to explain (e.g., apps/v1, route.openshift.io/v1) |
context | string | OpenShift context to use (optional) |
field | string | Specific field path to explain (e.g., spec.containers, metadata.labels) |
output | string | Output format for the explanation |
recursive | boolean | Show all fields recursively |
oc_expose
Expose an OpenShift resource (service, deployment, etc.) with secure route endpoints supporting SSL/TLS termination
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the resource to expose |
resourceType * | string | Resource type to expose (service, deploymentconfig, deployment) |
annotations | array | Annotations to apply to the route in KEY=VALUE format |
caCertificate | string | Path to CA certificate file |
certificate | string | Path to TLS certificate file |
context | string | OpenShift context to use (optional) |
destinationCaCertificate | string | Path to destination CA certificate file (for reencrypt) |
dryRun | boolean | Show what would be created without actually creating it |
hostname | string | Custom hostname for the route |
insecureEdgeTerminationPolicy | string | Policy for insecure traffic: None (reject), Allow (allow), Redirect (redirect to secure) |
key | string | Path to TLS private key file |
labels | array | Labels to apply to the route in KEY=VALUE format |
namespace | string | OpenShift namespace/project |
path | string | Path for the route (e.g., /api) |
port | string | Target port to expose (port name or number) |
routeName | string | Name for the route (if not specified, derives from resource name) |
routeType | string | Type of secure route: edge (SSL termination at router), passthrough (SSL passthrough), reencrypt (SSL re-encryption) |
tlsTermination | string | TLS termination type (deprecated, use routeType instead) |
weight | number | Weight for this route (0-256) |
wildcardPolicy | string | Wildcard policy for the route |