Skip to main content
Glama
Hardware Inventory MCP

Hardware Inventory MCP

by Ahmad-1276
README.md
# Hardware Inventory MCP

Build a structured inventory of CPUs, memory, storage, PCI, USB, and motherboard hardware.

![Python](https://img.shields.io/badge/Python-3.10%2B-3776AB?logo=python&logoColor=white)
![MCP](https://img.shields.io/badge/MCP-Model%20Context%20Protocol-000000)
![License](https://img.shields.io/badge/license-MIT-green)

## Tools

| Tool | Description |
| --- | --- |
| `get_hardware_summary` | High-level CPU, memory, storage, GPU, and motherboard summary |
| `get_cpu_hardware` | CPU model, sockets, cores, threads, frequency, and cache |
| `get_memory_hardware` | Memory totals plus DIMM slots when available |
| `get_storage_devices` | Block devices, models, sizes, mount points, and rotational flags |
| `get_pci_devices` | PCI devices from lspci |
| `get_usb_devices` | USB devices from lsusb |
| `get_motherboard_info` | Motherboard vendor, model, version, and serial when available |

## Requirements

- Python 3.10+
- `pip install -e .`

## Install

```bash
git clone https://github.com/Ahmad-1276/hardware-inventory-mcp.git
cd hardware-inventory-mcp

python3 -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate

pip install -e .
```

## Run

```bash
hardware-inventory-mcp
# or
python -m hardware_inventory_mcp.server
```

The server speaks the MCP stdio protocol and waits for a client.

## Connect an MCP client

Add this to your client's MCP config (Claude Desktop, Cursor, VS Code, etc.):

```json
{
  "mcpServers": {
    "hardware-inventory": {
      "command": "/absolute/path/to/.venv/bin/hardware-inventory-mcp",
      "args": []
    }
  }
}
```

Use the absolute path to the executable inside your virtual environment. On Windows the path is `.venv\Scripts\hardware-inventory-mcp.exe`.

## Example prompts

- Summarize this machine's hardware.
- How many RAM slots are populated?
- List storage devices and models.
- What USB devices are connected?

## Notes

Some details require root (`dmidecode`) or platform tools (`lspci`, `lsusb`). Missing data is reported with `available: false` instead of failing the whole tool.

## Development

```bash
pip install -e ".[dev]"
pytest -q
```

## License

MIT — see [LICENSE](LICENSE).

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation5/5

Each tool maps cleanly to one hardware category (CPU, memory, storage, PCI, USB, motherboard), so there is no realistic misselection. The summary tool overlaps in content with the individual getters but is clearly signposted as a high-level aggregate.

Naming Consistency4/5

All tools follow a get_<subject> pattern, which makes the set very predictable. Minor inconsistency in the noun suffixes (get_cpu_hardware vs. get_motherboard_info vs. get_hardware_summary) is cosmetic rather than confusing.

Tool Count5/5

Seven tools is a well-scoped set for a read-only hardware inventory server, and every tool covers a distinct physical component category plus a summary. Nothing feels padded or missing at the count level.

Completeness4/5

Coverage of core inventory (CPU, memory, storage, PCI, USB, motherboard, summary) is solid, but GPU and network interface detail are only reachable through the summary or not at all, leaving a small dead end. The summary explicitly includes GPU, yet no dedicated get_gpu tool exists.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues