A production-ready Model Context Protocol (MCP) server for comprehensive Windows system health monitoring
Monitor laptop health across performance, battery, thermal, network, and security dimensions with intelligent caching and actionable insights. Built following optimal MCP design patterns for maximum efficiency.
- Highlights
- Quick Start
- Architecture
- Tools Reference
- Usage Examples
- Performance
- Installation
- Troubleshooting
- Contributing
This server demonstrates best practices for MCP tool design:
| Feature | Implementation | Benefit |
|---|---|---|
| π― Primary Tool First | get_health_alerts provides fast triage |
40-50% fewer tool calls |
| π Smart Deep Tools | 6 specialized tools with actionable outputs | Targeted investigations only |
| β‘ Intelligent Caching | 3-30s TTL based on data volatility | 96% faster repeated calls |
| π§ Decision Guidance | Every tool includes nextStepsToCheck |
Clear investigation paths |
| π Actionable Outputs | Severity + recommendations + summaries | No interpretation needed |
- β Read-only monitoring - Zero system modifications, pure telemetry
- β Graceful degradation - Works with limited permissions, escalates when needed
- β Multi-fallback queries - 3-tier fallback chains for reliability
- β Windows-optimized - PowerShell + WMI integration for deep insights
- β Production-ready - Error handling, caching, and performance optimizations
- Node.js 18+ and npm
- Windows 10/11 (PowerShell 5.1+)
- Optional: Administrator privileges for full telemetry
# Clone the repository
git clone <your-repo-url>
cd health_check
# Install dependencies
npm install
# Start the MCP server
npm startAdd to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"system-health": {
"command": "node",
"args": ["c:/Users/shri/PycharmProjects/MCP/health_check/src/index.js"]
}
}
}You: "Check my system health"
Claude: (calls get_health_alerts)
"Your system is healthy (score: 95/100). CPU at 25%, memory at 45%,
all security features active."
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Request: "My laptop is slow" β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β π― PRIMARY TOOL β
β get_health_alerts β β Fast (3s cache)
β Returns: Alerts + β β CPU, Memory, Disk, Security
β nextStepsToCheck β β No expensive calls
βββββββββββββ¬ββββββββββββ
β
βββββββββββββββ΄ββββββββββββββ
β Result: CPU 92% (critical)β
β Next: get_performance_statsβ
βββββββββββββββ¬ββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β π DEEP TOOL β
β get_performance_stats β β Called only when needed
β Returns: Top processesβ β Actionable data
βββββββββββββ¬ββββββββββββ
β
βββββββββββββββ΄βββββββββββββββ
β Chrome using 8GB (50% RAM) β
β Recommendation: Close tabs β
ββββββββββββββββββββββββββββββ
π¦ health_check/
βββ π― PRIMARY (Call First)
β βββ get_health_alerts β Lightweight triage + guidance
β
βββ π DEEP TOOLS (Call on Demand)
β βββ get_performance_stats β CPU/memory investigation
β βββ get_battery_status β Power & health analysis
β βββ get_thermal_status β Temperature monitoring
β βββ get_network_status β Connectivity diagnostics
β βββ get_system_health β Security & stability
β
βββ π LEGACY
βββ get_full_health_report β Quick snapshot (optional)
When to use: First call for any health-related request
What it does: Fast system scan returning categorized alerts and investigation guidance
Output:
{
"critical": ["β οΈ CPU critically high: 92%"],
"warning": ["Low disk space: 18% free"],
"systemHealthScore": { "score": 75, "status": "Fair" },
"nextStepsToCheck": ["get_performance_stats", "get_system_health"],
"actionableSummary": "π΄ CRITICAL: CPU high. Run: get_performance_stats"
}Performance: ~60ms (cached 3s)
When to use: After alerts show high CPU/memory, or for process analysis
What it does: Detailed resource usage + top 5 processes by CPU/memory
Output:
{
"severity": "warning",
"cpu": { "usagePercent": 85.5, "coreCount": 8 },
"memory": { "totalGB": 16, "usedGB": 14.5, "usagePercent": 90.6 },
"topProcesses": [
{ "Name": "chrome", "CPU": 45.2, "MemoryMB": 8192 }
],
"recommendations": ["Close unused Chrome tabs"],
"nextStepsToCheck": ["get_thermal_status"]
}Optional params:
// Skip process enumeration (40% faster)
getPerformanceStats({ includeProcesses: false })When to use: Battery alerts, power concerns, or charging issues
What it does: Battery charge, health %, power plan, chemistry type
Output:
{
"severity": "info",
"chargePercent": 85,
"status": "AC Power",
"healthPercent": "Unavailable (requires admin or battery report)",
"powerPlan": "Balanced",
"recommendations": ["Battery status normal"]
}Note: Desktop systems return "Desktop System" status automatically
When to use: Thermal alerts, performance issues, or overheating concerns
What it does: CPU/GPU temps, throttling detection, fan status
Output:
{
"severity": "warning",
"cpu": { "temperatureCelsius": 88.5, "unit": "Β°C" },
"thermalThrottling": false,
"recommendations": ["CPU temp elevated - monitor closely"],
"cacheInfo": { "staleAfter": 10000 }
}Performance: ~150ms (cached 10s) - expensive WMI queries
When to use: Connectivity issues or device enumeration
What it does: Network interfaces, internet check (ping 8.8.8.8), USB/Bluetooth counts
Output:
{
"severity": "info",
"internetConnectivity": { "connected": true },
"connectedDevices": { "usbDevices": 3, "bluetoothDevices": 2 },
"actionableSummary": "β
Internet connected (2 active interfaces). 5 devices"
}Performance: ~800ms (cached 30s) - includes network ping
When to use: Security alerts, stability issues, or disk space warnings
What it does: Defender/Firewall status, updates, event log errors, disk health
Output:
{
"severity": "critical",
"antivirus": { "active": false, "realTimeMonitoring": false },
"firewall": { "active": true, "enabledProfiles": 3 },
"disk": { "percentFree": 8.5, "critical": true },
"recommendations": ["β οΈ CRITICAL: Enable Windows Defender immediately"],
"nextStepsToCheck": []
}Scenario: User says "My laptop feels slow"
Step 1: Claude calls get_health_alerts
β Response: CPU 92% (critical), Memory 88% (warning)
β Next steps: ["get_performance_stats"]
Step 2: Claude calls get_performance_stats
β Response: Chrome using 8GB RAM (50%), Node.js using 28% CPU
β Recommendations: "Close 3-4 Chrome tabs"
Result: 2 tool calls (vs 4-5 without guidance)
Scenario: User asks "Why is my CPU usage high?"
Claude calls get_performance_stats (directly - no need for alerts)
β Response: Shows top 5 processes by CPU
β Top offender: "DiscordCanary.exe" (65% CPU)
β Recommendation: "Restart Discord or check for updates"
Scenario: User reports "Laptop is getting hot"
Step 1: get_health_alerts
β No critical alerts, but suggests checking thermal
Step 2: get_thermal_status
β CPU: 58Β°C (normal), no throttling
β Recommendation: "Thermal status normal"
Step 3: Claude explains
β "Heat is expected under load but system is not overheating"
| Operation | Before Optimization | After Optimization | Improvement |
|---|---|---|---|
Primary tool (get_health_alerts) |
~1500ms | ~60ms | 96% faster |
| Thermal check (cached) | 150ms | 0ms | Instant |
| Network check (cached) | 800ms | 0ms | Instant |
| Performance stats (no processes) | 500ms | 300ms | 40% faster |
| Tool | Cache TTL | Reason |
|---|---|---|
get_health_alerts |
3 seconds | Frequently called entrypoint |
get_thermal_status |
10 seconds | Expensive WMI queries, temps change slowly |
get_network_status |
30 seconds | Expensive ping, connectivity rarely changes |
Before: 3-4 speculative tool calls per vague request
After: 1-2 targeted calls guided by nextStepsToCheck
Savings: 40-50% reduction in token usage
npm install
npm startgit clone <repo-url>
cd health_check
npm install
node src/index.jsThe server runs on stdio transport by default. Add to your MCP client config:
{
"mcpServers": {
"system-health": {
"command": "node",
"args": ["path/to/health_check/src/index.js"]
}
}
}Symptom: All battery fields return N/A or "Desktop System"
Causes:
- Desktop computer (no battery) - this is normal
- Insufficient permissions to access ACPI battery interface
- Battery subsystem not exposed to process
Solutions:
- For desktops: This is expected - status shows "Desktop System"
- For laptops: Run PowerShell as Administrator
# Right-click PowerShell β Run as Administrator cd path/to/health_check npm start
- Alternative: Generate battery report manually
powercfg /batteryreport
Symptom: CPU temp shows "N/A"
Causes:
- WMI thermal sensors not exposed by hardware
- Requires elevated privileges
- Some systems don't expose thermal data via standard APIs
Solutions:
- Run as Administrator (grants WMI access)
- Check if hardware supports ACPI thermal zones:
Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace root/wmi
- Use third-party tools (HWMonitor, CoreTemp) for verification
Symptom: connectedDevices fields return "N/A"
Causes:
- Insufficient permissions to enumerate Plug-and-Play devices
- Device class filtering blocked
Solutions:
- Run PowerShell as Administrator
- Manually verify:
Get-PnpDevice -PresentOnly | Where-Object {$_.Class -eq "USB"}
Symptom: Internet connectivity check fails on corporate networks
Cause: Firewall blocks ICMP (ping) to 8.8.8.8
Solution: This is expected on restricted networks. The tool will cache the timeout and avoid repeated failed pings for 30s.
Contributions are welcome! This project follows the optimal MCP pattern - please maintain:
- Primary tool returns guidance (
nextStepsToCheck) - Deep tools return actionable outputs (
severity,recommendations) - Caching for expensive operations
- Graceful degradation with permission fallbacks
# Clone and install
git clone <repo-url>
cd health_check
npm install
# Run locally
npm start
# Test with Claude Desktop
# Add to claude_desktop_config.json and restart ClaudeMIT License - see LICENSE file for details
- Built with Model Context Protocol SDK
- Follows MCP best practices for optimal tool design
- Inspired by production MCP server patterns
Built with β€οΈ for the MCP ecosystem
Demonstrating optimal MCP patterns: Primary + Deep Tools architecture