system-metrtics-mcp
System Metrics MCP Server
Documentation
System Metrics MCP
System Metrics MCP is a Python-based Model Context Protocol server that exposes system health, process information, disk details, network statistics, battery status, temperature sensors, and secure log file access.
Installation
1. Install Python 3.11 or newer.
2. Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\activate3. Install dependencies:
pip install -r requirements.txtRunning the Server
From the project root:
python server.pyThis starts the MCP server using stdio transport, which is compatible with Claude Desktop and other MCP clients.
Claude Desktop Configuration
Use the following `claude.json` or equivalent configuration block:
{
"mcpServers": {
"system-metrics": {
"command": "python",
"args": ["server.py"]
}
}
}Available Tools
- `get_system_status()`
- `list_high_cpu_processes(limit=5)`
- `list_high_memory_processes(limit=5)`
- `get_disk_details()`
- `read_log_file(filename)`
- `get_network_stats()`
- `get_battery_status()`
- `get_top_process_details(pid)`
- `get_system_temperature()`
Important Security Notes
- `read_log_file` only allows files inside the local `./logs/` directory.
- Absolute paths and path traversal attempts are rejected.
- Log files larger than 1 MB are refused to prevent denial-of-service or memory exhaustion.
- MCP tool inputs are validated using FastMCP strict input validation.
Example Prompts
- "What is the current CPU and RAM usage on the system?"
- "List the top 5 processes by CPU usage."
- "Show the top 5 memory-hungry processes."
- "Return the current disk utilization details."
- "Read the contents of `app.log` from the logs directory."
- "Provide the system network statistics."
- "What is the battery charge percentage and is the system plugged in?"
- "Give me detailed metrics for PID 1234."
- "Do we have temperature sensors available and what are their readings?"
Security Design
- Log files can only be read from the local `./logs/` directory.
- Absolute file paths are rejected.
- Path traversal attempts such as `../` or `../../` are blocked using `pathlib.Path.resolve()` and strict directory validation.
- Invalid file access attempts are logged and returned as human-readable errors.
- Each tool implements exception handling for `FileNotFoundError`, `PermissionError`, `psutil.AccessDenied`, `psutil.NoSuchProcess`, and unexpected exceptions.
Logging
Application logging is written to `logs/server.log` and also streamed to the console. The server logs:
- tool invocations
- access errors
- unexpected failures
Notes
- The server is designed for production-quality usage with async support and modular implementation.
- The `logs/` directory is intentionally included as an empty folder for secure log access and server logging.
Frequently asked questions
What is system-metrtics-mcp?
system-metrtics-mcp is System Metrics MCP Server
How do I install system-metrtics-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is system-metrtics-mcp open source?
Yes — it is hosted on GitHub at https://github.com/ranvirw18/system-metrtics-mcp and has 1 stars.
Related MCP tools
Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory across sessions with a self-hosted knowledge graph engine.
Automate browser based workflows with AI
Hindsight: Agent Memory That Learns
A privacy-first app that strips AI watermarks from content you own.
Agent framework and applications built upon Qwen>=3.0, featuring Function Calling, MCP, Code Interpreter, RAG, Chrome extension, etc.
The power of Claude Code / GeminiCLI / CodexCLI + [Gemini / OpenAI / OpenRouter / Azure / Grok / Ollama / Custom Model / All Of The Above] working as one.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP