Skip to content
Back to search

infra-mcp

Read-only-by-default MCP server for IT infrastructure: VMware, Redfish hardware health, daily health report.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/esayabhi--infra-mcp/badge.svg)](/listings/esayabhi--infra-mcp)

HTML

<a href="/listings/esayabhi--infra-mcp"><img src="/api/listings/esayabhi--infra-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone https://github.com/EsayAbhi/infra-mcp.git
cd infra-mcp
python -m venv .venv
# Windows: .venv\\\\Scripts\\\\activate      Linux/macOS: source .venv/bin/activate
pip install -e .              # add ".\\\[windows]" for the Windows connector
cp config.example.yaml config.yaml    # Windows: copy config.example.yaml config.yaml
cp .env.example .env                  # put your passwords here
infra-mcp --check                     # validates config and lists tools

Enable the connectors you want in `config.yaml` (`enabled: true`).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 123 lines
  1. # infra-mcp
  2. > \\\*\\\*Status: v0.1.0.\\\*\\\* Tested against simulators (VMware vcsim and a Redfish mock server).
  3. > Real-hardware pilots are welcome: please open an issue with your results.
  4. One MCP server that lets AI assistants (Claude, ChatGPT, Cursor, etc.) safely work with your IT infrastructure.
  5. One MCP server that lets AI assistants (Claude, ChatGPT, Cursor, etc.) safely work with your IT infrastructure.
  6. * **Safe by default:** read-only mode, every call is audit-logged, secrets are redacted, host allowlists.
  7. * **Works anywhere:** Windows, Linux, macOS, Docker. Credentials come from environment variables, never from code.
  8. * **Modular:** enable only the connectors you need. Add a new one by dropping in one file.
  9. |Connector|What it does|Credentials|
  10. |-|-|-|
  11. |`network`|ping, DNS, port check, TLS certificate expiry|none|
  12. |`redfish`|**physical server health** via BMC (iDRAC/iLO/CIMC/XCC): CPU, memory, temps, fans, PSUs, disks, event log, fleet check|read-only BMC account|
  13. |`vmware`|VMs, hosts, host hardware sensors, clusters, datastores, alarms, old snapshots, power actions (write)|vCenter/ESXi user|
  14. |`prometheus`|PromQL queries, down targets, firing alerts|URL (+ token)|
  15. |`grafana`|list dashboards/data sources, **create dashboards from a simple list, import community dashboards by ID**|service-account token|
  16. |`windows`|uptime, disks, stopped services, pending reboot, event errors (WinRM)|service account|
  17. |`rest`|**any tool with a REST API** (ServiceNow, Jira, Graylog, Veeam...) via config only|per service|
  18. ## Quick start (5 minutes)
  19. ```bash
  20. git clone https://github.com/EsayAbhi/infra-mcp.git
  21. cd infra-mcp
  22. python -m venv .venv
  23. # Windows: .venv\\\\Scripts\\\\activate Linux/macOS: source .venv/bin/activate
  24. pip install -e . # add ".\\\[windows]" for the Windows connector
  25. cp config.example.yaml config.yaml # Windows: copy config.example.yaml config.yaml
  26. cp .env.example .env # put your passwords here
  27. infra-mcp --check # validates config and lists tools
  28. ```
  29. Enable the connectors you want in `config.yaml` (`enabled: true`).
  30. ## Daily health report
  31. One report that merges hardware (Redfish), VMware (hosts, sensors, datastores, alarms, old snapshots) and certificate expiry, critical problems first.
  32. * Ask your AI: *"Give me the daily infrastructure health report."*
  33. * Or run it yourself:
  34. ```bash
  35. infra-mcp --config config.yaml --report --output report.md --email
  36. ```
  37. * Schedule it every morning with Windows Task Scheduler or cron. Exit code: `0` OK, `1` warnings, `2` critical.
  38. * Thresholds (datastore free %, snapshot age, certificate days) are configurable in `config.yaml`.
  39. ## Sample output
  40. *
  41. * Demo environment (simulators), not real servers. Demo thresholds are set so even brand-new snapshots are flagged.
  42. * !\[Daily health report](docs/report.png)
  43. * A power action is refused while read\_only is true:
  44. * !\[Read-only lock](docs/read-only-lock.png)
  45. * Every call is recorded in an audit log, with secrets hidden:
  46. * !\[Audit log](docs/audit-log.png)
  47. ## Connect to Claude Desktop
  48. Edit `claude\\\_desktop\\\_config.json` (Settings > Developer > Edit Config):
  49. ```json
  50. {
  51. "mcpServers": {
  52. "infra": {
  53. "command": "C:\\\\\\\\path\\\\\\\\to\\\\\\\\infra-mcp\\\\\\\\.venv\\\\\\\\Scripts\\\\\\\\infra-mcp.exe",
  54. "args": \\\["--config", "C:\\\\\\\\path\\\\\\\\to\\\\\\\\infra-mcp\\\\\\\\config.yaml"]
  55. }
  56. }
  57. }
  58. ```
  59. Restart Claude Desktop, then ask: *"Which datastores are below 15% free?"* or *"Check disks on SRV-APP01."*
  60. ## Remote / team use (Docker)
  61. ```bash
  62. docker build -t infra-mcp .
  63. docker run -p 8000:8000 -v $(pwd)/config.yaml:/config/config.yaml --env-file .env infra-mcp
  64. ```
  65. Put it behind your own reverse proxy with authentication before exposing it beyond localhost.
  66. ## Safety model
  67. 1. `read\\\_only: true` (default) blocks every action that changes something, in every connector.
  68. 2. To allow changes, set `read\\\_only: false` **and** use accounts with least privilege.
  69. 3. `audit.jsonl` records who/what/when for every call. Passwords and tokens are masked.
  70. 4. Use `allowed\\\_hosts` in `network` and `windows` to limit where the AI can reach.
  71. 5. Use a dedicated read-only service account per system.
  72. ## Add your own connector
  73. 1. Copy `src/infra\\\_mcp/connectors/\\\_template.py` to `connectors/yourtool.py`.
  74. 2. Set `NAME`, write tools inside `register()`:
  75. ```python
  76. @guard.tool(mcp) # read tool
  77. def yourtool\\\_status() -> dict:
  78. """The AI reads this docstring to know when to use the tool."""
  79. @guard.tool(mcp, write=True) # blocked in read-only mode
  80. def yourtool\\\_restart(name: str) -> dict: ...
  81. ```
  82. 3. Add a block under `connectors:` in `config.yaml`. No other file changes needed.
  83. For tools with a plain REST API you do not even need code: add them under `rest:` in `config.yaml`.
  84. ## Development and testing
  85. ```bash
  86. pip install -e ".\\\[dev]"
  87. pytest # unit and simulator tests
  88. python scripts/run\\\_all\\\_checks.py # full check with fake VMware + hardware servers (needs vcsim)
  89. ```
  90. ## License
  91. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.