hmc-mcp
Click 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., "@hmc-mcpList all managed systems and show their power state"
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.
hmc-mcp
MCP server and CLI for the IBM Hardware Management Console (HMC) REST API
(/rest/api/uom/...). It lets you — or an AI agent over MCP — inventory
Power systems, inspect LPARs/VIOS, and submit jobs such as power on/off.
Stack
Python ≥3.12, managed with uv
MCP server: FastMCP (stdio or streamable HTTP)
CLI: Typer + Rich tables
REST transport: httpx (async), XML parsed with defusedxml
CLI passthrough: asyncssh — tools that shell out to HMC CLI commands (
lssyscfg,lshwres,chsyscfg, ...) over SSH
Related MCP server: quads-mcp
Install
cd ~/src/hmc-mcp
uv syncConfigure
Credentials come from a .env file, environment variables, or CLI flags
(priority: flags > env > .env). Copy the example:
cp .env.example .env # then editSetting | Env var | CLI flag | Default |
HMC host / IP |
|
| — |
REST port |
| — |
|
User |
|
| — |
Password |
|
| — |
Verify TLS |
|
|
|
HTTP timeout (s) |
| — |
|
SSH timeout (s) |
| — |
|
SSH key file |
| — | — |
Audit memento |
| — |
|
Schema version |
| — | — |
See docs/environment-variables.md for the
full reference, including descriptions and usage notes.
HMCs ship self-signed certificates, so TLS verification is off by default and
hmc-mcp warns on every logon while it stays off. To verify the HMC
certificate, install its CA locally and set HMC_VERIFY_SSL=true
(--verify-ssl) — otherwise the HMC credentials are at risk of
man-in-the-middle interception.
HMC version and schema compatibility
hmc-mcp targets HMC V8 through V11 and all the POWER generations they
manage. All uom XML documents are written with schemaVersion="V1_0" — the
floor every supported HMC understands — so create/modify operations succeed
regardless of firmware age.
HMC version | POWER generations managed | uom schema floor |
HMC V8 | POWER6, POWER7, POWER8 | V1_0 |
HMC V9 | POWER7, POWER8, POWER9 | V1_0 |
HMC V10 | POWER8, POWER9, POWER10 | V1_0 |
HMC V11 | POWER9, POWER10, POWER11 | V1_0 |
The HMC_SCHEMA_VERSION environment variable (or schema_version in .env)
optionally pins the X-HMC-Schema-Version request header. Leave it unset for
the default behaviour (let the HMC negotiate via the document's schemaVersion
attribute). See docs/environment-variables.md
for all supported variables.
CLI usage
hmc-mcp console info # connectivity check / HMC version
hmc-mcp systems list # table of managed systems
hmc-mcp systems show <uuid>
hmc-mcp systems summary <uuid> # one-call summary: state, MTMS, firmware, LPARs, free resources
hmc-mcp lpars list # all LPARs
hmc-mcp lpars list --system <uuid> # LPARs of one system
hmc-mcp lpars show mylpar # by name or UUID (JSON)
hmc-mcp lpars state mylpar # just "running", "not activated", ...
hmc-mcp lpars summary mylpar # one-call summary: state, RMC, memory, CPU, OS, adapters
hmc-mcp lpars create web01 --system <uuid> --mem 8192 --vcpus 2
hmc-mcp lpars modify web01 --mem 16384 --procs 2.0 # assign resources
hmc-mcp lpars delete web01 # destroy (must be powered off)
hmc-mcp lpars power-on mylpar # submits a PowerOn job (asks first)
hmc-mcp lpars power-off mylpar --immediate
hmc-mcp adapters list mylpar # network adapters (default type)
hmc-mcp adapters list mylpar --type VirtualSCSIClientAdapter
hmc-mcp adapters add-network mylpar --vlan 100 # add a NIC on VLAN 100
hmc-mcp adapters add-vscsi mylpar --vios-id 1 --vios-slot 5
hmc-mcp adapters add-vfc mylpar --vios-id 1 --vios-slot 6
hmc-mcp adapters delete mylpar --type ClientNetworkAdapter --uuid <adapter-uuid>
hmc-mcp vios list
hmc-mcp jobs list # recent jobs (default 20)
hmc-mcp jobs list -n 5 # last 5 jobs
hmc-mcp jobs show <job-uuid>
hmc-mcp raw get /rest/api/uom/VirtualSwitch # escape hatch, prints XMLAdd --json to list commands for machine-readable output. Every entry is the
parsed uom resource: {UUID, title, link, ResourceType, Resource} where
Resource is the flattened XML (namespace-stripped, HMC bookkeeping
attributes removed).
MCP server
hmc-mcp serve # stdio — what MCP clients/agents expect
hmc-mcp serve --http --host 127.0.0.1 --port 8000Security: the streamable-HTTP transport is unauthenticated. It exposes the full tool surface — including arbitrary HMC CLI execution (
hmc_run_command) and user administration — to anyone who can reach the port. Keep the default loopback bind.serve --httprefuses a non-loopback--hostunless--allow-remoteis passed; if you need remote access, put an authenticated reverse proxy (MCP gateway or HTTPS proxy with bearer-token auth) in front and never expose the port directly.
Exposed tools:
Read-only / inventory
Tool | Description |
| HMC version/network info; cheap connectivity check |
| All managed systems, or one by UUID |
| All LPARs, one by UUID, find by name, or quick state |
| One-call summary: state, RMC, memory/CPU, OS, adapter count, description |
| One-call system summary: state, MTMS, firmware, LPAR counts by state, free memory/CPU, VIOS count |
| Virtual I/O Servers, or storage-detail mappings for one |
| Any uom resource type (VirtualSwitch, SharedMemoryPool, ...) |
| Job status/result |
| Recent HMC jobs list (limit=20) |
| Per-system: total/assigned/free memory (MiB) and CPU, LPAR counts |
| Systems with enough free memory + CPU to host a new LPAR |
| Find a managed system by SystemName (exact match) |
| Poll a job until COMPLETED / FAILED / EXCEPTION (or timeout) |
Mutating / lifecycle
Tool | Description |
| End-to-end LPAR provisioning workflow: create + network adapter + vSCSI adapter + storage mapping + power on in one call; validates name/VLAN/VG preconditions; |
| Create an LPAR on a system (memory, shared/dedicated CPU, type); refuses if a partition with the same name already exists |
| Change an LPAR's name / memory / CPU (DLPAR when running) |
| DLPAR processor hot-plug on a running LPAR |
| DLPAR memory hot-plug on a running LPAR |
| Destroy an LPAR (must be powered off; irreversible) |
| Submit PowerOn job; returns |
| Submit PowerOff job ( |
| Submit a NIM-based LPAR OS installation job ( |
Virtual adapters (network / storage)
Tool | Description |
| List an LPAR's adapters by type (network / vSCSI / vFC / vNIC) |
| Add a Virtual Ethernet NIC (VLAN PVID, vswitch, tagged, MAC) |
| Add a Virtual SCSI client adapter paired to a VIOS |
| Add a Virtual Fibre Channel (NPIV) adapter paired to a VIOS |
| Remove an adapter from an LPAR by UUID |
Virtual storage (Volume Groups / Virtual Disks / mappings)
Tool | Description |
| List VIOS Volume Groups (free space, PVs, virtual disks) |
| Create a Volume Group from physical volumes |
| Carve a Virtual Disk (logical volume) out of a VG |
| Map a VirtualDisk/PhysicalVolume to an LPAR (vSCSI mapping) |
Virtual media (ISO library)
Tool | Description |
| Create the Virtual Media Repository (VMLibrary) on a VG |
| Create a blank optical media (ISO container) |
| Delete the Virtual Media Repository from a VG |
Virtual networking (switches / networks / bridges)
Tool | Description |
| List VirtualSwitches (names, SwitchIDs, mode) |
| List Virtual Networks (VLANs) on a system |
| Create a Virtual Network (VLAN) |
| Delete a Virtual Network |
| List NetworkBridges (Shared Ethernet Adapters) |
SSH/CLI tools — the
(SSH/CLI)tools run HMC CLI commands over SSH. Their system/LPAR arguments (system_name_or_uuid/lpar_name_or_uuid) accept either a CLI name or a UUID. Names are used as-is; UUIDs are resolved to their CLI names via the REST API first, falling back to anlssyscfgname lookup over SSH when the REST API is unreachable. Resolution happens before the command runs, so a UUID that cannot be resolved surfaces as an error rather than being passed through to the CLI.hmc_run_commandis the exception — it runs whatever command you give it verbatim.
VIOS administration
Tool | Description |
| Create a VIOS partition on a managed system |
| Delete (destroy) a VIOS partition (must be powered off) |
| Submit a NIM-based VIOS installation job — job |
| List existing VIOS backups (SSH/CLI) |
| Create a VIOS backup (SSH/CLI) |
| Restore a VIOS from a named backup (SSH/CLI) |
SR-IOV / vNIC & physical I/O (SSH/CLI)
Tool | Description |
| List vNICs (SR-IOV-backed Virtual NICs) on an LPAR |
| Add a vNIC to an LPAR |
| Remove a vNIC from an LPAR |
| List Virtual Fibre Channel (NPIV) adapters for a system |
| List Shared Ethernet Adapters for a system |
| Toggle a physical SR-IOV adapter between SR-IOV and dedicated mode |
Template library
Tool | Description |
| All partition templates, or one by UUID |
| Deploy a partition from a draft template — job |
Live Partition Mobility (LPM)
Tool | Description |
| Migrate an LPAR to another system — job |
| Pre-check a migration — job |
| Abort an in-progress migration — job |
| Recover after a failed migration — job |
| Remote-restart a failed LPAR — job |
System / VIOS power
Tool | Description |
| Change a managed system's configuration (only passed fields) |
| Power on a managed system — job |
| Power off a managed system — job |
| Power on a VIOS — job |
| Power off a VIOS — job |
Cluster / Shared Storage Pool (SSP)
Tool | Description |
| List Clusters (VIOS node sets sharing a pool) |
| All SSPs, or one by UUID (capacity, free space, logical units) |
| Create a Logical Unit (file-backed disk) — job |
| Delete a Logical Unit by UDID — job |
Performance & Capacity Monitoring (PCM)
Tool | Description |
| Read monitoring flags (LTM/aggregation/STM/energy) |
| Enable/disable PCM collection for a resource |
| List (mode=links) or download (mode=fetch, default) processed metrics (30s, ~2h retention) |
| List (mode=links) or download (mode=fetch, default) aggregated metrics (trend rollup) |
PCM notes: metrics are stored as JSON, reached via an Atom feed of links. Pass
mode="links"to get the link list;mode="fetch"(default) downloads the most recent document (or{}when none are in range). The CLImetrics showaccepts--fetchto do both in one step. Long-term monitoring + aggregation must be enabled viahmc_set_pcm_preferencesbefore processed/aggregated metrics accumulate. Categories includeManagementConsole,ManagedSystem,LogicalPartition,VirtualIOServer,SharedStoragePool,Cluster.
Users & access (HMC user administration)
Tool | Description |
| All HMC user accounts, or one by username |
| Create a new HMC local user account |
| Modify an HMC user account (only supplied fields) |
| Delete an HMC user account (irreversible) |
| List HMC password policies |
| Create a password policy (max age, rules) |
| Modify a password policy (only supplied fields) |
| Delete a password policy (irreversible) |
| Get the current HMC LDAP server configuration |
| Configure the HMC LDAP server integration |
| Remove a component of the LDAP configuration |
Software updates (HMC / VIOS / firmware)
Tool | Description |
| Submit an HMC software update (kind=update, PTF install) or upgrade (kind=upgrade, full version) job |
| Get available PTFs for the HMC software |
| Submit a VIOS software update (kind=update) or upgrade (kind=upgrade) job |
| Submit a managed-system firmware update job |
LPAR profiles (backup / restore)
Tool | Description |
| Backup all LPAR profiles on a system ( |
| Restore LPAR profiles from a backup file ( |
| Sync an LPAR's running config back to its current profile |
| Add a physical I/O slot DRC index to an LPAR's profile |
LPAR / system properties (SSH/CLI)
Tool | Description |
| Get an LPAR's description field |
| Set an LPAR's description field |
| Get the Migratable Service Partition flag |
| Set the MSP flag |
| List processor compatibility modes a system supports |
| Get an LPAR's current/pending proc-compat mode |
| Set an LPAR's processor compatibility mode |
| List physical I/O slots on a system |
| List shared memory pools on a system |
| Remove a shared memory pool from a system |
Escape hatch
Tool | Description |
| Run an arbitrary HMC CLI command (documented escape hatch) |
End-to-end: give an LPAR a bootable disk
# 1. create the partition
hmc-mcp lpars create web01 --system <sys-uuid> --mem 8192 --vcpus 2
# 2. give it a vSCSI adapter paired to the VIOS (find IDs via `vios list`)
hmc-mcp adapters add-vscsi web01 --vios-id 1 --vios-slot 5
# 3. carve a virtual disk out of a VIOS volume group
hmc-mcp storage list-vgs <vios-uuid> # find the VG + free space
hmc-mcp storage create-disk <vios-uuid> --vg <vg-uuid> --name web01_root --size 51200
# 4. map the disk to the partition
hmc-mcp storage map <vios-uuid> --lpar web01 --disk web01_root
# 5. (optionally) network + power on
hmc-mcp adapters add-network web01 --vlan 100
hmc-mcp lpars power-on web01Note on the storage model: an LPAR's vSCSI/vFC adapter (added with
adapters add-vscsi/add-vfc) is just plumbing — it pairs the partition with a VIOS server slot. The actual disk lives on the VIOS or in a Shared Storage Pool: carve it out of a Volume Group (storage create-disk) or a Cluster/SSP (cluster create-lu), then connect it with a mapping (storage map). Both the VIOS Volume Group / Virtual Disk model and the Cluster / SSP Logical Unit model are wrapped. Once a disk is mapped, partitioning it into filesystems is the guest OS's job (NIM, cloud-init,mkfs), not the HMC's.
Use with Hermes Agent
hermes mcp add hmc -- uv run --directory ~/src/hmc-mcp hmc-mcp serve(or point your MCP client's env at HMC_HOST/HMC_USER/HMC_PASSWORD).
Testing
1. Unit tests (no HMC needed)
The client and XML parser are tested against an HMC mocked with respx — no real hardware required:
uv run pytest -q
# ............... [100%]
# 15 passed in 0.10s2. MCP protocol smoke test (no HMC needed)
Verifies the server actually speaks MCP over stdio and lists every tool. It connects with a real FastMCP client and prints the tools:
uv run python scripts/smoke_mcp.py
# Connected. <N> tools exposed:
# - hmc_console_info
# - hmc_systems
# ...3. Live check against a real HMC
With credentials configured (.env or flags), the cheapest end-to-end check
is console info — one Logon + one ManagementConsole GET:
hmc-mcp console info
hmc-mcp systems list # should print a table of your Power serversIf console info prints the HMC version, auth, TLS and the session
lifecycle all work; everything else uses the same path.
Layout
src/hmc_mcp/
config.py # pydantic-settings config (env/.env/flags)
xmlutil.py # defusedxml Atom-feed -> dict parsing
errors.py # HMCError (shared by client and its mixins)
client.py # async HMCClient: session, transport, uom helpers, jobs
client_*.py # per-domain mixins (users, systems, lpars, storage, pcm, ...)
client_parse.py# defusedxml wrappers tagging failures with the HMC call
common.py # shared HMCClient/config helpers for tool definitions
ssh.py # asyncssh helpers running HMC CLI commands over SSH
documents.py # XML request-document builders (LPAR, adapters, storage, users, ...)
jobs.py # JobRequest XML templates (PowerOn/PowerOff/...)
pcm.py # PCM metrics/preferences parsing + XML documents
_app.py # shared FastMCP instance, READ_ONLY/DESTRUCTIVE_TOOLS sets, entry points
server.py # thin aggregator importing every server_*.py tool module
server_*.py # per-domain @mcp.tool definitions (power, storage, network, ...)
cli.py # thin aggregator importing every cli_*.py command module
cli_app.py # root Typer app, GlobalOpts/GLOBALS, shared CLI helpers
cli_*.py # per-domain CLI commands (systems, lpars, storage, ...)
tests/ # pytest + respx, no real HMC needed
scripts/ # smoke/manual harnessesNotes on the HMC API
Auth:
PUT /rest/api/web/Logonwith a LogonRequest XML body returns anX-API-Sessiontoken, sent as a header on every subsequent call;DELETE /rest/api/web/Logonlogs off.Resources are Atom feeds of vendor media type
application/vnd.ibm.powervm.uom+xml; type=<ResourceType>..../quick/<Property>returns a single property cheaply;.../search/(<Property>==<Value>)filters server-side.State changes are asynchronous jobs: POST a JobRequest to
/rest/api/uom/<Type>/<uuid>/do/<Operation>, then poll/rest/api/uom/Job/<job-uuid>.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for Nutanix Prism Central v4 REST API, enabling AI agents to list and inspect VMs, control VM power state, list clusters, read alerts, and list subnets.8MIT
- Alicense-qualityDmaintenanceMCP server for interacting with QUADS infrastructure systems via API, enabling resource management and automation through LLM applications.MIT
- FlicenseAqualityDmaintenanceAI-powered MCP server for enterprise OpenShift/Kubernetes cluster management, providing diagnostic tools, RAG knowledge retrieval, and autonomous remediation recommendations.9
- FlicenseAqualityBmaintenanceMCP server for IBM Technology Zone: manage reservations end-to-end and search the catalog from Claude.11
Related MCP Connectors
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/randomparity/hmc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server