IPI Provisioner MCP Server
OfficialClick on "Deploy 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 Server generate 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: ocp-mcp
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
Available Tools
24 toolscalculate_cluster_network_capacityA
Calculate cluster network capacity.
Args: cluster_cidr: Cluster network CIDR (e.g., '10.128.0.0/14') host_prefix: Host prefix - subnet size per node (e.g., 23)
Returns: Capacity calculations (max nodes, IPs per node, etc.)
Inputs: host_prefix (required), cluster_cidr (required). Returns: object
check_installer_binaryA
Check if openshift-install binary is available.
Args: install_dir: Optional installation directory to check for local binary
Returns: Binary existence check results
Inputs: install_dir. Returns: object
check_ip_in_networkB
Check if an IP address is within a CIDR range.
Args: ip_address: IP address to check cidr: CIDR range
Returns: Check result
Inputs: cidr (required), ip_address (required). Returns: object
check_network_overlapB
Check if two networks overlap.
Args: cidr1: First CIDR cidr2: Second CIDR
Returns: Overlap check result
Inputs: cidr1 (required), cidr2 (required). Returns: object
create_baremetal_host_entryA
Create a baremetal host entry for install-config.yaml.
Args: name: Host name (e.g., 'master-0') role: Host role ('master' or 'worker') bmc_address: BMC address (e.g., 'redfish://192.168.1.100') bmc_username: BMC username bmc_password: BMC password boot_mac_address: Boot MAC address (e.g., 'aa:bb:cc:dd:ee:ff') root_device_hint: Optional root device hint (e.g., '/dev/sda' or 'wwn')
Returns: Host configuration dictionary ready for install-config.yaml
Inputs: name (required), role (required), bmc_address (required), bmc_password (required), +3 more. Returns: object
create_installation_manifestsA
Create Kubernetes manifests from install-config.yaml.
Args: install_dir: Installation directory containing install-config.yaml installer_path: Path to openshift-install binary (default: 'openshift-install')
Returns: Manifest creation results
Inputs: install_dir (required), installer_path. Returns: object
extract_openshift_installerA
Extract openshift-install binary from a release image.
Args: release_image: OpenShift release image URL (e.g., 'quay.io/openshift-release-dev/ocp-release:4.17.0-x86_64') output_dir: Directory to extract installer to (default: current directory)
Returns: Extraction results and next steps
Inputs: release_image (required), output_dir. Returns: object
generate_bmc_test_scriptB
Generate a bash script to test BMC connectivity for multiple hosts.
Args: hosts: List of host configurations with BMC details
Returns: Bash script for testing BMC connectivity
Inputs: hosts (required). Returns: object
generate_dns_configA
Generate DNS configuration for the cluster.
Args: cluster_name: Cluster name base_domain: Base domain api_vip: API VIP address ingress_vip: Ingress VIP address hosts: Optional JSON string of hosts list. Each host should have 'name' and 'ip' keys. Example: '[{"name": "master-0", "ip": "10.1.235.25"}, {"name": "master-1", "ip": "10.1.235.26"}]'
Returns: Required DNS records and validation commands including A and PTR records for hosts
Inputs: api_vip (required), base_domain (required), ingress_vip (required), cluster_name (required), +1 more. Returns: object
generate_install_configA
Generate an install-config.yaml for baremetal IPI.
Args: cluster_name: Name of the cluster base_domain: Base domain (e.g., example.com) pull_secret: Pull secret content (JSON string) ssh_key: SSH public key content api_vip: API VIP address ingress_vip: Ingress VIP address hosts: List of baremetal hosts with BMC configuration machine_network_cidr: Machine network CIDR (default: 192.168.1.0/24) cluster_network_cidr: Cluster network CIDR (default: 10.128.0.0/14) service_network_cidr: Service network CIDR (default: 172.30.0.0/16) network_type: Network type (default: OVNKubernetes) control_plane_replicas: Number of master nodes (default: 3) worker_replicas: Number of worker nodes (default: 0)
Returns: Generated install-config as dictionary and YAML string
Inputs: hosts (required), api_vip (required), ssh_key (required), base_domain (required), +9 more. Returns: object
generate_network_diagramA
Generate a network diagram for the cluster.
Args: cluster_cidr: Cluster (pod) network CIDR service_cidr: Service network CIDR machine_cidr: Machine network CIDR api_vip: API VIP ingress_vip: Ingress VIP
Returns: Network diagram
Inputs: api_vip (required), ingress_vip (required), cluster_cidr (required), machine_cidr (required), +1 more. Returns: object
get_config_templateA
Get an install-config template.
Args: template_name: Template name (e.g., 'baremetal-ipi-compact', 'baremetal-ipi-ha')
Returns: Template content and metadata
Inputs: template_name (required). Returns: object
get_installation_logsA
Get recent installation log entries.
Args: install_dir: Installation directory lines: Number of recent lines to retrieve (default: 50)
Returns: Recent log entries
Inputs: install_dir (required), lines. Returns: object
get_installation_statusB
Get cluster installation status.
Args: install_dir: Installation directory
Returns: Installation status and progress
Inputs: install_dir (required). Returns: object
list_config_templatesA
List all available install-config templates.
Returns: List of templates with descriptions
Inputs: no named parameters. Returns: object
parse_bmc_addressA
Parse and validate BMC address format.
Args: bmc_address: BMC address (e.g., 'redfish://192.168.1.100:443')
Returns: Parsed BMC address components
Inputs: bmc_address (required). Returns: object
prepare_cluster_destroyA
Prepare cluster destroy command.
This tool provides the command to destroy the cluster. Use with caution - this will delete the entire cluster!
Args: install_dir: Installation directory installer_path: Path to openshift-install binary (default: 'openshift-install')
Returns: Destroy command and information
Inputs: install_dir (required), installer_path. Returns: object
prepare_cluster_installationA
Prepare cluster installation command.
This tool doesn't actually start the installation (which can take 30-60 minutes), but provides the command to run.
Args: install_dir: Installation directory installer_path: Path to openshift-install binary (default: 'openshift-install') log_level: Log level (debug, info, warn, error)
Returns: Installation command and information
Inputs: install_dir (required), log_level, installer_path. Returns: object
test_bmc_connectionA
Test BMC connectivity (Redfish).
Args: bmc_address: BMC address (e.g., 'redfish://192.168.1.100' or 'redfish+https://192.168.1.100') username: BMC username password: BMC password verify_ssl: Whether to verify SSL certificates (default: False)
Returns: Connection test results
Inputs: password (required), username (required), bmc_address (required), verify_ssl. Returns: object
validate_bmc_addressesA
Validate BMC addresses for multiple hosts.
Args: hosts: List of host configurations with BMC details Each host should have: name, bmc.address, bmc.username, bmc.password
Returns: Validation results for all hosts
Inputs: hosts (required). Returns: object
validate_complete_network_configA
Validate complete network configuration for overlaps and validity.
Args: cluster_cidr: Cluster network CIDR service_cidr: Service network CIDR machine_cidr: Machine network CIDR api_vip: Optional API VIP (required for HA) ingress_vip: Optional Ingress VIP (required for HA)
Returns: Comprehensive validation results
Inputs: cluster_cidr (required), machine_cidr (required), service_cidr (required), api_vip, +1 more. Returns: object
validate_install_configA
Validate an install-config.yaml file.
Args: config_yaml: The install-config.yaml content as a string
Returns: Validation results with errors and summary
Inputs: config_yaml (required). Returns: object
validate_network_cidrA
Validate CIDR notation.
Args: cidr: CIDR string (e.g., '192.168.1.0/24')
Returns: Validation result
Inputs: cidr (required). Returns: object
validate_vip_configurationC
Validate VIP (Virtual IP) configuration.
Args: api_vip: API VIP address ingress_vip: Ingress VIP address machine_network_cidr: Machine network CIDR
Returns: Validation results
Inputs: api_vip (required), ingress_vip (required), machine_network_cidr (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Tools are mostly distinct, each targeting a specific task like config generation, BMC testing, network validation, or installer commands. However, test_bmc_connection and validate_bmc_addresses could be confused, though one is a live test and the other validates multiple host BMC details.
All tool names follow a consistent verb_noun pattern with lowercase and underscores, such as list_config_templates, generate_install_config, validate_vip_configuration, and get_installation_logs. The verbs vary but the pattern is uniformly applied.
24 tools is on the higher end but reasonable for the complex IPI provisioning domain, covering templates, BMC, network, and installer utilities. Some tools like parse_bmc_address and validate_network_cidr are granular, but the count is not excessive for the scope.
The tool surface covers the main lifecycle stages: config generation and validation, BMC connectivity, network checks, DNS generation, manifest creation, installation preparation, status, logs, and destroy commands. A minor gap is that actual installation execution is not performed (only the command is provided), but this is a reasonable design choice.
Maintenance
Related MCP Connectors
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
MCP server for Appcircle mobile CI/CD platform.
MCP compatibility and transport verification server.
Related MCP Servers
- AlicenseAqualityDmaintenanceAI-powered MCP server for enterprise OpenShift/Kubernetes cluster management, providing diagnostic tools, RAG knowledge retrieval, and autonomous remediation recommendations.9MIT
- FlicenseBqualityDmaintenanceAn MCP server for managing multiple OpenShift Container Platform (OCP) clusters through AI assistants.77-
- AlicenseAqualityDmaintenanceMCP server for Oracle Cloud Infrastructure (OCI) that provides tools to manage Compute, Object Storage, Block Storage, Networking, Autonomous Database, and IAM via the official OCI SDK.2361 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for bare-metal lab operations, enabling inventory, commissioning, deployment, fabric audit, and job scheduling via Hermes agent skills and a tool server.Apache 2.0