The Model Context Protocol (MCP) System Monitor allows Large Language Models (LLMs) to retrieve real-time system information through an MCP-compatible interface. This tool provides monitoring capabilities for CPU, memory, disk, network, host, and process information, making it easy for LLMs to access and analyze system metrics.
To install the MCP System Monitor, follow these steps:
git clone https://github.com/seekrays/mcp-monitor.git
cd mcp-monitor
make build
After installation, you can run the compiled binary using:
./mcp-monitor
The server will start in stdio mode, ready to communicate with an MCP-compatible LLM client.
The MCP System Monitor provides several tools for accessing different system metrics:
Tool: get_cpu_info
Description: Get CPU information and usage
Parameters:
- per_cpu (boolean, default: false): Whether to return data for each core
Tool: get_memory_info
Description: Get system memory usage information
Parameters: None
Tool: get_disk_info
Description: Get disk usage information
Parameters:
- path (string, default: "/"): Specify the disk path to query
- all_partitions (boolean, default: false): Whether to return information for all partitions
Tool: get_network_info
Description: Get network interface and traffic information
Parameters:
- interface (string, optional): Specify the network interface name to query
Tool: get_host_info
Description: Get host system information
Parameters: None
Tool: get_process_info
Description: Get process information
Parameters:
- pid (number, optional): Process ID to get detailed information for a specific process
- limit (number, default: 10): Limit the number of processes returned
- sort_by (string, default: "cpu"): Sort field (cpu, memory, pid, name)
Here are some example queries you might use with the MCP System Monitor:
To retrieve basic CPU information:
{
"tool": "get_cpu_info",
"parameters": {}
}
To get detailed information for each CPU core:
{
"tool": "get_cpu_info",
"parameters": {
"per_cpu": true
}
}
To check disk usage for a specific directory:
{
"tool": "get_disk_info",
"parameters": {
"path": "/home"
}
}
To retrieve the top 5 processes consuming the most memory:
{
"tool": "get_process_info",
"parameters": {
"limit": 5,
"sort_by": "memory"
}
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-monitor" '{"command":"./mcp-monitor","args":[]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-monitor": {
"command": "./mcp-monitor",
"args": []
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-monitor": {
"command": "./mcp-monitor",
"args": []
}
}
}
3. Restart Claude Desktop for the changes to take effect