MCP - Multi-Platform Hardware Information Collection Tool
MCP is a cross-platform tool for collecting comprehensive hardware and system information, including CPU, GPU, memory, disk, operating system, and network configuration details.
Features
- Cross-platform support: Works on Windows, macOS, and Linux
- Comprehensive information collection:
- CPU: Brand, physical cores, logical cores, frequency, architecture
- GPU: Model, driver version, memory size (platform-specific implementation)
- Memory: Total, available, used, usage percentage
- Disk: Device, mount point, file system type, total space, used space, free space, usage percentage
- Operating System: Type, release, version, hostname
- Network: Interface names and IP addresses
- Error handling: Gracefully handles exceptions and returns error messages when information collection fails
- Structured data output: Returns information in structured dictionary format, easily convertible to JSON
Installation
You can install MCP using pip:
pip install mcp-hardware-info
Usage
Command Line
After installation, you can use the mcp command to get hardware information:
mcp
This will output all hardware information in JSON format.
Python API
You can also use MCP as a Python library:
from mcp.server import get_all_hardware_info, get_cpu_info, get_gpu_info, get_memory_info, get_disk_info, get_os_info, get_network_info
# Get all hardware information
hardware_info = get_all_hardware_info()
print(hardware_info)
# Get specific hardware information
cpu_info = get_cpu_info()
gpu_info = get_gpu_info()
memory_info = get_memory_info()
disk_info = get_disk_info()
os_info = get_os_info()
network_info = get_network_info()
Examples
Example Output
{
"cpu": {
"brand": "Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz",
"physical_cores": 8,
"logical_cores": 16,
"frequency_ghz": 4.7,
"architecture": "x86_64"
},
"gpu": {
"gpus": [
{
"name": "NVIDIA GeForce RTX 3080",
"memory_mb": 10240
}
]
},
"memory": {
"total_gb": 32.0,
"available_gb": 20.5,
"used_gb": 11.5,
"usage_percent": 35.9
},
"disk": {
"disks": [
{
"device": "/dev/sda1",
"mountpoint": "/",
"fstype": "ext4",
"total_gb": 500.0,
"used_gb": 200.0,
"free_gb": 300.0,
"usage_percent": 40.0
}
]
},
"os": {
"system": "Linux",
"release": "5.15.0-48-generic",
"version": "#54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022",
"hostname": "my-computer",
"platform": "Linux-5.15.0-48-generic-x86_64-with-glibc2.35",
"processor": "x86_64"
},
"network": {
"interfaces": [
{
"name": "eth0",
"addresses": [
{
"type": "IPv4",
"address": "192.168.1.100",
"netmask": "255.255.255.0"
}
]
}
]
}
}
Requirements
- Python 3.6+
- psutil >= 5.9.0
- py-cpuinfo >= 9.0.0
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- psutil: Cross-platform library for retrieving information on running processes and system utilization
- py-cpuinfo: Python module to get CPU info
Metadata
Release files for mcp-cuc-tjx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_cuc_tjx-0.1.0.tar.gz | 6.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_cuc_tjx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.5 kB
Release files / mcp_cuc_tjx-0.1.0.tar.gz
| Download URL | mcp_cuc_tjx-0.1.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14e9a64f3e16300e0f55c499d155a43601c3fabff06b47635f66af528224f79b
|
|
BLAKE2b-256 checksum How to use checksums |
24f9a9a2eb1fd4523e447cfd5bcaaf39b710915eea2dd319ecb11ba6f5b4bb05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.1 CPython/3.13.11 Darwin/25.0.0
|
Release files / mcp_cuc_tjx-0.1.0-py3-none-any.whl
| Download URL | mcp_cuc_tjx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
182916a504755d1bad3651ec04cbd9647e089c88083d42abd0710cd778f562fb
|
|
BLAKE2b-256 checksum How to use checksums |
8ea03d82f3f26db2b2ceb150371316b4d47fcfcfea9b9ab5412213d8faa39102
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.1 CPython/3.13.11 Darwin/25.0.0
|
Security for mcp-cuc-tjx 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.