Quick Start
Prerequisites
Python 3.8+
Required runtime environment
Cluster Access
OpenShift or Kubernetes cluster
Kubeconfig
Valid kubeconfig file
Installation
Running the Server
Available Tools
The MCP server provides comprehensive tools for managing Kubernetes and OpenShift resources.Resource Management
list_resources
List Kubernetes/OpenShift resources with filtering capabilities. Parameters:resource_type(required): Type of resource (e.g., “pod”, “deployment”)namespace(optional): Namespace to search inlabel_selector(optional): Filter by labels (e.g., “app=nginx”)field_selector(optional): Filter by fieldslimit(optional): Maximum number of results
get_resource
Get detailed information about a specific resource. Parameters:resource_type(required): Type of resourcename(required): Resource namenamespace(optional): Namespace (required for namespaced resources)output_format(optional): Format - “info”, “yaml”, “json”, “wide” (default: “info”)
create_resource
Create a new resource from YAML or specifications. Parameters:resource_type(required): Type of resourcename(required): Resource namenamespace(optional): Namespace for namespaced resourcesyaml_content(optional): Complete YAML definitionspec(optional): Resource specification as dictlabels(optional): Labels to applyannotations(optional): Annotations to applywait(optional): Wait for resource to be ready
update_resource
Update an existing resource using patch operations. Parameters:resource_type(required): Type of resourcename(required): Resource namenamespace(optional): Namespacepatch(required): Patch data as dictpatch_type(optional): “merge”, “strategic”, “json” (default: “merge”)
delete_resource
Delete a resource. Parameters:resource_type(required): Type of resourcename(required): Resource namenamespace(optional): Namespacewait(optional): Wait for deletion to complete (default: true)timeout(optional): Deletion timeout in seconds (default: 60)
apply_yaml
Apply YAML manifests containing one or more resources. Parameters:yaml_content(required): YAML content with one or more resourcesnamespace(optional): Default namespace for resources without namespace
Pod Operations
get_pod_logs
Retrieve logs from pod containers. Parameters:name(required): Pod namenamespace(required): Namespacecontainer(optional): Container name (for multi-container pods)tail_lines(optional): Number of lines from endsince_seconds(optional): Logs since N seconds agoprevious(optional): Get logs from previous container instance
exec_in_pod
Execute commands inside pod containers. Parameters:name(required): Pod namenamespace(required): Namespacecommand(required): Command to execute as listcontainer(optional): Container name
Event and Discovery
get_resource_events
Get Kubernetes events related to a resource. Parameters:resource_type(required): Type of resourcename(required): Resource namenamespace(optional): Namespacelimit(optional): Maximum events to return (default: 10)
get_resource_types
Get all available resource types in the cluster. Parameters:random_string(required): Any string (required by MCP protocol)
AI Assistant Integration
Cursor Integration
Add to your Cursor settings (~/.cursor/mcp.json):
@openshift-python-wrapper.
Claude Desktop Integration
Add to Claude Desktop config:- Basic Configuration
- Custom Kubeconfig
Common Use Cases
Troubleshooting a Failing Pod
Deploying a Complete Application
Checking Cluster Health
Managing OpenShift Virtualization
Supported Resource Types
The server dynamically discovers all available resource types from your cluster.Core Kubernetes Resources
Core Kubernetes Resources
pod,service,deployment,replicaset,daemonsetconfigmap,secret,persistentvolume,persistentvolumeclaimnamespace,node,event,endpointserviceaccount,role,rolebinding,clusterrole,clusterrolebinding
OpenShift Specific
OpenShift Specific
route,project,imagestream,buildconfig,deploymentconfiguser,group,oauth,securitycontextconstraints
OpenShift Virtualization
OpenShift Virtualization
virtualmachine,virtualmachineinstance,datavolumehyperconverged,kubevirt,cdi
Operators
Operators
clusterserviceversion,subscription,installplan,operatorgroupcatalogsource,packagemanifest
Security Best Practices
RBAC
Ensure your kubeconfig has appropriate permissions for operations
Namespaces
Use namespace isolation for multi-tenant environments
Resource Limits
Set appropriate limits when listing resources to avoid overload
Sensitive Data
Be careful with secrets and configmaps containing sensitive information
Troubleshooting
Connection Issues
Connection Issues
Test cluster connectivity:
Permission Errors
Permission Errors
Check your permissions:
MCP Server Issues
MCP Server Issues
Run in debug mode:
Next Steps
API Reference
Explore the complete API documentation
Examples
Check out practical examples and tutorials