IPI Provisioner MCP Server
OfficialClick on "Install 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., "@IPI Provisioner MCP Servergenerate install-config for HA cluster with 3 masters"
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.
IPI Provisioner MCP Server
An MCP (Model Context Protocol) server for OpenShift Baremetal IPI (Installer-Provisioned Infrastructure) cluster provisioning. This tool helps you generate, validate, and manage install-config.yaml files, test BMC connectivity, validate network configurations, and guide you through the cluster installation process.
Features
Install Config Management: Generate and validate install-config.yaml files
BMC Testing: Test Redfish/IPMI BMC connectivity
Network Validation: Validate CIDR ranges, VIPs, and DNS configuration
Cluster Lifecycle: Extract installer, create manifests, and manage installations
Templates: Pre-built templates for Compact and HA deployments
Related MCP server: mcpdeployment
Architecture
ipi-provisioner-mcp/
├── mcp_server/
│ ├── config.py # Configuration and environment variables
│ ├── main.py # FastMCP server setup
│ ├── models/ # Pydantic data models
│ │ ├── install_config.py # InstallConfig models
│ │ ├── baremetal.py # Baremetal host models
│ │ └── network.py # Network configuration models
│ ├── services/ # Business logic
│ │ ├── validation_service.py # Config validation
│ │ ├── bmc_service.py # BMC operations
│ │ ├── network_service.py # Network validation
│ │ └── openshift_service.py # Installer operations
│ ├── tools/ # MCP tool implementations
│ │ ├── config_tools.py # Config generation/validation
│ │ ├── bmc_tools.py # BMC testing
│ │ ├── network_tools.py # Network validation
│ │ └── cluster_tools.py # Cluster lifecycle
│ └── utils/ # Utilities
│ ├── yaml_handler.py # YAML operations
│ └── templates.py # Template management
├── templates/ # Install-config templates
│ ├── baremetal-ipi-compact.yaml
│ └── baremetal-ipi-ha.yaml
└── tests/ # Unit testsAvailable MCP Tools
Config Generation & Validation (6 tools)
validate_install_config- Validate install-config.yaml contentgenerate_install_config- Generate install-config.yaml from parametersget_config_template- Get a pre-built templatelist_config_templates- List all available templatescreate_baremetal_host_entry- Create a host entry for install-config
BMC Operations (4 tools)
test_bmc_connection- Test single BMC connectivity (Redfish)validate_bmc_addresses- Validate multiple BMC addressesparse_bmc_address- Parse and validate BMC address formatgenerate_bmc_test_script- Generate bash script for BMC testing
Network Validation (8 tools)
validate_network_cidr- Validate CIDR notationcheck_ip_in_network- Check if IP is in CIDR rangecheck_network_overlap- Check if two networks overlapvalidate_vip_configuration- Validate VIP configurationgenerate_dns_config- Generate DNS records for clustercalculate_cluster_network_capacity- Calculate pod network capacitygenerate_network_diagram- Generate network diagramvalidate_complete_network_config- Comprehensive network validation
Cluster Lifecycle (6 tools)
check_installer_binary- Check if openshift-install existsextract_openshift_installer- Extract installer from release imagecreate_installation_manifests- Create Kubernetes manifestsprepare_cluster_installation- Prepare installation commandprepare_cluster_destroy- Prepare cluster destroy commandget_installation_status- Get installation statusget_installation_logs- Get installation logs
Installation
cd /Users/jhajyahy/mcp/ipi-provisioner-mcp
uv sync # Creates venv and installs dependencies
source .venv/bin/activate # On Windows: .venv\Scripts\activateConfiguration
Environment Variables (Optional)
# OpenShift Configuration
export OPENSHIFT_RELEASE_IMAGE="quay.io/openshift-release-dev/ocp-release:4.17.0-x86_64"
export PULL_SECRET_PATH="$HOME/pull-secret.json"
export SSH_KEY_PATH="$HOME/.ssh/id_rsa.pub"
# MCP Transport (default: stdio)
export MCP_TRANSPORT="stdio" # or "sse" for web-based integration
export MCP_HOST="127.0.0.1" # for sse transport
export MCP_PORT="8000" # for sse transportMCP Client Configuration
Claude Desktop / Cursor IDE
Add to your ~/.config/claude-desktop/mcp.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"ipi-provisioner": {
"command": "uv",
"args": ["run", "python", "/Users/jhajyahy/mcp/ipi-provisioner-mcp/main.py"],
"description": "IPI Cluster Provisioning Assistant for OpenShift Baremetal",
"env": {
"OPENSHIFT_RELEASE_IMAGE": "quay.io/openshift-release-dev/ocp-release:4.17.0-x86_64",
"PULL_SECRET_PATH": "/path/to/pull-secret.json",
"SSH_KEY_PATH": "/path/to/id_rsa.pub"
}
}
}
}Usage Examples
1. List Available Templates
User: List available install-config templatesResponse shows Compact and HA templates with descriptions.
2. Generate Install Config
User: Generate an install-config for a 3-master HA cluster named 'prod-cluster'
with base domain 'example.com', API VIP 192.168.1.10, Ingress VIP 192.168.1.113. Validate Install Config
User: Validate this install-config.yaml:
[paste your config]Returns validation errors, warnings, and a summary.
4. Test BMC Connectivity
User: Test BMC connection to redfish://192.168.1.100 with username admin and password secret5. Validate Network Configuration
User: Validate network config with cluster CIDR 10.128.0.0/14, service CIDR 172.30.0.0/16,
machine CIDR 192.168.1.0/24, API VIP 192.168.1.10, Ingress VIP 192.168.1.116. Generate DNS Configuration
User: Generate DNS config for cluster 'ocp' with base domain 'example.com',
API VIP 192.168.1.10, Ingress VIP 192.168.1.11, and hosts:
- master-0 with IP 192.168.1.20
- master-1 with IP 192.168.1.21
- master-2 with IP 192.168.1.22This will generate A and PTR records for all cluster components including the API VIP, Ingress VIP, and all hosts.
7. Extract OpenShift Installer
User: Extract openshift-install from release image
quay.io/openshift-release-dev/ocp-release:4.17.0-x86_648. Check Installation Status
User: Get installation status for /path/to/install-dirCommon Workflows
Workflow 1: Validate Existing Config
Validate config:
validate_install_config(yaml_content)Validate networks:
validate_complete_network_config(...)Validate BMCs:
validate_bmc_addresses(hosts)Generate DNS config:
generate_dns_config(...)
Workflow 2: Troubleshoot Installation
Check status:
get_installation_status(install_dir)Get logs:
get_installation_logs(install_dir, lines=100)Validate network:
validate_complete_network_config(...)Test BMCs:
validate_bmc_addresses(hosts)
Testing
Run the test suite:
uv run pytest tests/ -vTemplates
Available Templates
baremetal-ipi-compact.yaml - Compact Cluster
3 master nodes (also act as workers)
Requires API and Ingress VIPs
Good for resource-constrained environments
baremetal-ipi-ha.yaml - High Availability
3 master nodes
2+ dedicated worker nodes
Requires API and Ingress VIPs
Production-ready configuration
Network Requirements
Machine Network
Physical network for baremetal hosts
Contains API VIP and Ingress VIP (for HA)
Example: 192.168.1.0/24
Cluster Network (Pod Network)
Virtual network for pod-to-pod communication
Example: 10.128.0.0/14
Each node gets a /23 subnet (510 IPs per node)
Service Network
Virtual network for Kubernetes services
Example: 172.30.0.0/16
DNS Requirements (HA/Compact)
A Records
api.<cluster_name>.<base_domain>→ API VIP*.apps.<cluster_name>.<base_domain>→ Ingress VIP (wildcard)<hostname>.<base_domain>→ Host IP (for each cluster node)
PTR Records (Reverse DNS)
API VIP →
api.<cluster_name>.<base_domain>Each host IP →
<hostname>.<base_domain>
Example for cluster 'ocp' with domain 'example.com':
# A Records
api.ocp.example.com. A 10.1.235.200
*.apps.ocp.example.com. A 10.1.235.201
master-0.example.com. A 10.1.235.25
master-1.example.com. A 10.1.235.26
master-2.example.com. A 10.1.235.27
# PTR Records
200.235.1.10.in-addr.arpa. PTR api.ocp.example.com.
25.235.1.10.in-addr.arpa. PTR master-0.example.com.
26.235.1.10.in-addr.arpa. PTR master-1.example.com.
27.235.1.10.in-addr.arpa. PTR master-2.example.com.BMC Requirements
Supported BMC Types
Redfish (recommended)
Redfish Virtual Media
IPMI
iDRAC Virtual Media
BMC Address Format
Redfish:
redfish://192.168.1.100orredfish+https://192.168.1.100:443IPMI:
ipmi://192.168.1.100
Troubleshooting
Common Issues
BMC Connection Failures
Use
test_bmc_connectionto verify connectivityCheck BMC credentials
Verify network connectivity to BMC
Network Validation Errors
Use
validate_complete_network_configto check for overlapsEnsure VIPs are in machine network range
Verify DNS is configured correctly
Installation Failures
Use
get_installation_logsto check logsVerify all BMCs are reachable
Check network configuration
Ensure DNS records exist (for HA)
Contributing
Contributions are welcome! Please ensure:
All tests pass:
uv run pytest tests/ -vCode follows existing patterns
Add tests for new functionality
License
Apache 2.0
Built for OpenShift Metal Platform Team
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/redhat-community-ai-tools/openshift-ipi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server