Metadata-Version: 2.4
Name: mcidrac
Version: 2026.8.10
Summary: MCP server for Dell iDRAC9 (14G+ PowerEdge) — multi-iDRAC registry over Redfish
Project-URL: Homepage, https://github.com/supported-systems/mcidrac
Project-URL: Source, https://github.com/supported-systems/mcidrac
Author-email: Ryan Malloy <ryan@supported.systems>
License-Expression: MIT
Keywords: dell,idrac,mcp,model-context-protocol,poweredge,redfish
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Hardware
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.11
Requires-Dist: fastmcp>=0.4
Description-Content-Type: text/markdown

# mcidrac

MCP server for Dell iDRAC9 (14G+ PowerEdge) over Redfish. Manage a fleet of
iDRACs from Claude or any MCP client: power, health, inventory, SEL, virtual
media, boot-to-ISO, BIOS/iDRAC attributes, SCP backup/restore, and virtual
console access.

Sibling of [mccimc](https://pypi.org/project/mccimc/) (the Cisco CIMC
equivalent) — same registry model, same conventions.

## Install

```bash
uvx mcidrac --check          # run from PyPI, validate config
uv tool install mcidrac      # or install persistently
```

## Configure

Create `~/.config/mcidrac/idracs.toml` (or `./mcidrac.toml`, or point
`$MCIDRAC_CONFIG` at a file):

```toml
[[idracs]]
name = "r740-lab"
host = "192.0.2.10"
user = "root"
password_env = "R740_LAB_PASS"       # or password = "..." literally
# cert_path = "~/certs/idrac-ca.pem" # optional pinned TLS; default skips verify
description = "R740 lab box, rack 2 U12"
```

Verify with `mcidrac --check`.

## Run

```bash
mcidrac                                  # HTTP on 127.0.0.1:7903/mcp
mcidrac --transport stdio                # stdio for embedded use
mcidrac --transport http --port 7903 --host 0.0.0.0
```

Register with Claude Code:

```bash
# stdio (spawned per session, simplest)
claude mcp add idrac --scope user --env R740_LAB_PASS=... -- uvx mcidrac --transport stdio

# or long-running HTTP
claude mcp add idrac --transport http http://127.0.0.1:7903/mcp
```

## Surface

**24 tools** (`idrac_*`): list/ping/info/health, raw `idrac_get` escape
hatch, power control + locator LED, inventory/sensors/firmware, SEL +
Lifecycle logs, virtual media + boot override + one-shot `idrac_boot_to_iso`,
BIOS + Dell attribute get/set, job queue, SCP export/import, and
`idrac_console` (HTML5 console URL with one-shot temp credentials).

**Resources**: bundled reference docs (`idrac://docs/redfish-map`,
`firmware-quirks`, `operations-cookbook`, `jobs-and-tasks`), the registry,
and live per-box snapshots (`idrac://{name}/info`, `/sensors`, `/sel`,
`/vmedia`, `/jobs`).

**Prompts**: `health_check` (fleet sweep), `identify_box`,
`prepare_install` (ISO → console), `diagnose_wedged`, `firmware_audit`,
`backup_config`.

## Integration testing without hardware

Dell publishes real Redfish captures of iDRAC9 and iDRAC10 systems
([dell/iDRAC-Redfish-Scripting](https://github.com/dell/iDRAC-Redfish-Scripting),
"iDRAC Redfish Mockup Clients"). `scripts/mockup-up.sh` serves them with
[DMTF's Redfish-Mockup-Server](https://github.com/DMTF/Redfish-Mockup-Server)
over HTTPS in Docker, so the whole stack — TLS, token sessions, Dell OEM
paths — gets exercised against genuine iDRAC responses:

```bash
scripts/mockup-up.sh              # start the iDRAC9 R660xs capture
scripts/mockup-up.sh all          # plus three iDRAC10 firmware lines + 2 configs
MCIDRAC_CONFIG=.mockup/idracs.toml python3 scripts/shakedown.py
scripts/mockup-up.sh down         # tear down
```

The shakedown runs the 15-tool read ladder against every configured box
over MCP stdio.

Static mockups can't simulate writes, so `scripts/simdrac.py` is a
**behavioral** simulator: it serves the R660xs capture for reads and
overlays a live state machine with the Dell write semantics — token
sessions with 401 enforcement, a power state machine ("already on"
errors), vMedia insert/eject state, DellAttributes read-only rejections
via top-level ExtendedInfo, BIOS PATCH → JID job lifecycle
(Scheduled→Running→Completed), the SCP export task-morph, and SEL clear.

```bash
python3 scripts/write-shakedown.py   # self-contained: boots simdrac,
                                     # runs all destructive tools, asserts outcomes
```

Real hardware remains the final gate (a simulator can only encode the
semantics we know about), but every tool and every guardrail now has an
executable test.

## Compatibility

Targets iDRAC9 (PowerEdge 14G+: R(x)40 / R(x)50 / R(x)60 era). Pure
Redfish — no racadm, no WS-Man, no vendor SDK; the only dependency is
FastMCP. iDRAC8 partially works for reads on recent firmware but is not a
target. Known firmware-version quirks (virtual-media path moves, `$expand`
support, GetKVMSession availability) are handled in code and documented in
`idrac://docs/firmware-quirks`.

## Safety notes

- Destructive tools (`idrac_power`, `idrac_bios_set`, `idrac_scp_import`,
  `idrac_boot_to_iso`, `idrac_sel_clear`, `idrac_attributes_set`) carry
  MCP `destructiveHint` annotations so clients can gate them.
- Failed logins count toward iDRAC's IP-block lockout; the server uses
  token sessions with guaranteed logout and never retries auth in a loop.
- Passwords never leave the server process — `idrac_list` and the registry
  resource return summaries only.

## License

MIT
