Baremetal MCP Server
An MCP (Model Context Protocol) server for managing bare-metal infrastructure. It exposes Redfish BMC operations (Dell iDRAC, HPE iLO, Supermicro) and Junos switch queries as tools for AI assistants, providing inventory collection, power management, virtual media injection, boot control, firmware updates, and network switch CLI access.
Built with FastMCP, it works with any MCP-compatible client including Claude Code, Gemini CLI, and others.
Table of Contents
Features
- Inventory: Detailed hardware overview (CPUs, Memory, NICs, Storage).
- Power Control: On, Off, Graceful Shutdown, and Reboots.
- Boot Management: Set one-time boot targets (PXE, CD/ISO, HDD, USB).
- Virtual Media: Mount and eject ISO images remotely.
- Dell-Specific: Firmware updates and detailed XML inventory exports.
- Junos Switches: Query Juniper switch configuration, interfaces, MAC tables, and run arbitrary CLI commands via SSH.
- Parallelism: Perform actions on multiple servers simultaneously.
- Caching: Slow inventory calls (
get_firmware_inventory, get_hardware_overview, get_system_info) are cached in memory with TTLs to avoid redundant BMC requests.
Requirements
Ensure you have Python installed and install the necessary dependencies:
pip install fastmcp httpx PyYAML urllib3 paramiko
Prerequisites
Before using the MCP server with any AI agent, you must configure two mandatory environment variables pointing to your server and credentials files:
# Required — must be set before running Claude Code or Gemini CLI
export REDFISH_CONFIG="/path/to/redfish_servers.yaml"
export REDFISH_SECRETS="/path/to/redfish_secrets.yaml"
# Optional — only if you need firmware ISOs or custom settings
export ISOS_FILE="/path/to/isos.yaml"
export GLOBAL_CONFIG="/path/to/global_config.yaml"
Add these to your ~/.bashrc or ~/.zshrc to make them permanent. See Configuration for file format details.
Installation
Running manually
# stdio transport (for MCP clients)
fastmcp run -t stdio main.py
# HTTP transport (for network access)
fastmcp run --port 5004 --host 127.0.0.1 -t streamable-http main.py
Claude Code
Install as a plugin from GitHub (recommended)
Make sure the prerequisite env vars are exported in your shell, then:
claude plugin marketplace add sshnaidm/baremetal-mcp
claude plugin install baremetal-mcp@baremetal-mcp-marketplace
Verify it works:
claude mcp list # see configured servers
Or within a Claude Code session, run /mcp to see active tools and server status.
Alternative: clone and auto-detect
Clone the repository and open it with Claude Code. The included .mcp.json is detected automatically — you'll be prompted to approve the server on first use.
git clone https://github.com/sshnaidm/baremetal-mcp.git
cd baremetal-mcp
claude
Alternative: manual setup with env vars
Register the server directly and pass config paths as env vars:
claude mcp add --transport stdio baremetal-mcp \
--env REDFISH_CONFIG=/path/to/redfish_servers.yaml \
--env REDFISH_SECRETS=/path/to/redfish_secrets.yaml \
-- fastmcp run -t stdio /path/to/baremetal-mcp/main.py
Gemini CLI
Make sure the prerequisite env vars are exported in your shell, then install directly from the repository:
gemini extensions install https://github.com/sshnaidm/baremetal-mcp.git
Verify it works:
/extensions list - See installed extensions.
/mcp - See active tools and server status.
Cursor
Add the server to your Cursor MCP configuration file (.cursor/mcp.json in your project or ~/.cursor/mcp.json globally):
{
"mcpServers": {
"baremetal-mcp": {
"command": "fastmcp",
"args": ["run", "-t", "stdio", "/path/to/baremetal-mcp/main.py"],
"env": {
"REDFISH_CONFIG": "/path/to/redfish_servers.yaml",
"REDFISH_SECRETS": "/path/to/redfish_secrets.yaml"
}
}
}
}
Other MCP Clients
Any MCP-compatible client can use this server via stdio transport. Add it to your client's MCP configuration:
{
"mcpServers": {
"baremetal-mcp": {
"command": "fastmcp",
"args": ["run", "-t", "stdio", "/path/to/baremetal-mcp/main.py"],
"env": {
"REDFISH_CONFIG": "/path/to/redfish_servers.yaml",
"REDFISH_SECRETS": "/path/to/redfish_secrets.yaml"
}
}
}
}