Skip to main content

A cross-platform hardware information collection tool

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_cuc_tjx-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_cuc_tjx-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file mcp_cuc_tjx-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_cuc_tjx-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.11 Darwin/25.0.0

File hashes

Hashes for mcp_cuc_tjx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 14e9a64f3e16300e0f55c499d155a43601c3fabff06b47635f66af528224f79b
MD5 dc1655444af54bab239ac740773e66b5
BLAKE2b-256 24f9a9a2eb1fd4523e447cfd5bcaaf39b710915eea2dd319ecb11ba6f5b4bb05

See more details on using hashes here.

File details

Details for the file mcp_cuc_tjx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_cuc_tjx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.11 Darwin/25.0.0

File hashes

Hashes for mcp_cuc_tjx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 182916a504755d1bad3651ec04cbd9647e089c88083d42abd0710cd778f562fb
MD5 c7f76c628055c7beaa5eec674294d327
BLAKE2b-256 8ea03d82f3f26db2b2ceb150371316b4d47fcfcfea9b9ab5412213d8faa39102

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page