Skip to content

Shreshtthh/MCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laptop Hardware MCP Server (Windows)

This project creates a local MCP server that gives GitHub Copilot access to hardware/system telemetry from your laptop (CPU, RAM, disk, battery, network, uptime).

What this server provides

The MCP server in server.py exposes these tools:

  • get_live_system_stats
  • get_cpu_info
  • get_memory_info
  • get_disk_info
  • get_battery_info
  • get_network_io
  • get_system_overview

VS Code MCP config is in .vscode/mcp.json.

Why Python 3.10+ matters

The modern mcp Python package requires a newer Python runtime than 3.8.

If you get an error like:

  • No matching distribution found for mcp

it usually means your active interpreter is too old.

Check which Python versions are installed

In PowerShell or CMD

py -0p

You should see at least one version that is 3.10+ (for example 3.10, 3.11, 3.12, 3.13).

If you do NOT have Python 3.10+

  1. Install Python from python.org (Windows installer).
  2. During install, enable:
    • Add Python to PATH
    • Install launcher for all users (recommended)
  3. Re-open terminal and run:
py -0p

Create a virtual environment using Python 3.10+

Use one of these commands (replace version if needed).

PowerShell / CMD

py -3.13 -m venv .venv

Git Bash

py -3.13 -m venv .venv

If .venv already exists and you want a clean reset:

py -3.13 -m venv .venv --clear

Activate the environment

PowerShell

.\.venv\Scripts\Activate.ps1

If script execution is blocked:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\.venv\Scripts\Activate.ps1

CMD

.venv\Scripts\activate.bat

Git Bash

source .venv/Scripts/activate

Important: in Bash, use / slashes, not \.

Install dependencies

From project root:

python -m pip install --upgrade pip
python -m pip install -r requirements.txt

Quick verification

python -c "import mcp, psutil; print('deps_ok')"

Expected output:

  • deps_ok

Run the server manually (optional test)

python server.py

Note: this is a stdio MCP server. If you stop it with Ctrl+C, you may see cancellation traces; that is normal for manual termination.

Use it in VS Code Copilot Chat

  1. Keep this file present: .vscode/mcp.json
  2. Reload VS Code:
    • Command Palette -> Developer: Reload Window
  3. Open Copilot Chat and ask:
    • Use laptop-hardware MCP server and call get_system_overview
    • Use laptop-hardware MCP server and call get_memory_info
    • Use laptop-hardware MCP server and call get_disk_info with path C:\\

Troubleshooting

Error: No matching distribution found for mcp

Cause: old Python interpreter.

Fix:

py -0p
py -3.13 -m venv .venv --clear

Then reactivate and reinstall dependencies.

Error: -r option requires 1 argument

Cause: command ended at pip install -r without a filename.

Fix:

python -m pip install -r requirements.txt

Git Bash activation command fails

Cause: using Windows backslashes.

Fix:

source .venv/Scripts/activate

Copilot does not see MCP server

  • Confirm .vscode/mcp.json exists.
  • Confirm dependencies are installed in .venv.
  • Reload VS Code window.

Project files

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages