This script will install the server to ~/.local/share/mcp-servers/ and configure opencode if available.
curl -fsSL https://raw.githubusercontent.com/DarkPhilosophy/mcp-system-monitor-js/main/install.sh | bash
Clone the repository:
git clone https://github.com/DarkPhilosophy/mcp-system-monitor-js.git
cd mcp-system-monitor-js
Install dependencies:
npm install
3/1. Link to MCP servers location (optional):
bash ln -s $(pwd) ~/.local/share/mcp-servers/mcp-system-monitor-js
3/2. Or copy files
bash cp $(pwd) ~/.local/share/mcp-servers/mcp-system-monitor-js
~/.config/opencode/opencode.json):"mcp-system-monitor": {
"type": "local",
"command": [
"node",
"/home/YOUR_USER/.local/share/mcp-servers/mcp-system-monitor-js/src/index.js"
],
"enabled": true
}
A Model Context Protocol (MCP) server implementation in JavaScript, designed for AI agents to monitor and interact with Linux systems. This server provides comprehensive metrics including CPU, memory, disk, network, and process data through both Stdio and secured HTTP/SSE transports.
--http).history.json with a rolling 24-hour window.When running in HTTP mode (--http), you can secure the endpoint using an API key.
Set the MCP_API_KEY environment variable:
export MCP_API_KEY="your-secure-token-here"
node src/index.js --http
Clients must then provide the key in the x-api-key header or as a query parameter:
x-api-key: your-secure-token-herehttp://localhost:57996/sse?apiKey=your-secure-token-hereNote: If MCP_API_KEY is not set, the HTTP server will default to public access (local network only recommended).
Used by MCP-compatible clients like Claude Desktop or OpenCode.
node src/index.js
OpenCode Configuration (~/.config/opencode/opencode.json):
"system-monitor": {
"type": "local",
"command": [
"node",
"/var/home/alexa/.gemini/extensions/system-monitor-js/src/index.js"
],
"enabled": true
}
node src/index.js --http
The server listens on port 57996 by default.
get_system_info: General OS/Kernel details.get_cpu_info: Load, specs, and temperature.get_memory_info: RAM/Swap metrics.get_disk_info: Partition usage. Parameters: mountPoint (optional).get_network_info: Traffic and interface stats.get_processes: Active processes. Parameters: limit (number), name (filter), sortBy (cpu_usage, memory_usage, priority).get_system_metrics: Consolidated system health snapshot.get_metrics_history: Retrieve historical performance trends. Parameters: limit (number of minutes).get_battery_info: Power status and battery health.get_usb_devices: Connected hardware list.Status: ✅ Passing
Last Updated: 2026-01-25 12:03:39 UTC
Summary: 0 errors, 0 warnings
MCP_API_KEY environment variable to secure the SSE/HTTP endpoint.mcp_server.js into index.js for a cleaner, unified codebase using the official MCP SDK for both transport modes.Promise.all for parallel hardware sensor queries.mcp-system-monitor-js to a simpler system-monitor.history.json with a rolling 24-hour window.get_metrics_history tool to retrieve performance history.get_processes: Added support for limit, name filtering, and sortBy (cpu_usage, memory_usage, priority).get_disk_info: Added mountPoint filtering support.get_system_metrics tool to return a consolidated, prioritized snapshot of system health.Sign in to leave a comment.