SuperAPI AI Directory

mac-monitor-mcp

Identifies resource-intensive processes on macOS and suggests performance improvements.

Open website

About this tool

Purpose

mac-monitor-mcp is a Model Context Protocol (MCP) server running on macOS, used to monitor system resource usage. It analyzes CPU, memory, and network usage, identifies the most resource-consuming processes, and returns data in structured JSON format. The server can be invoked by large language models or other clients that support MCP, thereby providing intelligent system performance analysis.

Main Capabilities

The server exposes three tools:

  1. Get resource-intensive processes: Returns the top 5 most resource-consuming processes in each category of CPU, memory, and network.
  2. Get processes by category: Supports advanced filtering, pagination, and sorting. Parameters include:
    • process_type: "cpu", "memory", or "network"
    • page: page number (starting from 1, default 1)
    • page_size: number of processes per page (default 10, maximum 100)
    • sort_by: sort field, optional "auto" (default metric), "pid", "command", and category-specific fields: CPU supports "cpu_percent", "pid", "command"; memory supports "memory_percent", "resident_memory_kb", "pid", "command"; network supports "network_connections", "pid", "command"
    • sort_order: "desc" (default) or "asc"
  3. Get system overview: Provides aggregate statistics similar to Activity Monitor, including CPU, memory, disk, network statistics, and intelligent performance analysis to help identify bottlenecks and optimization opportunities. Specific metrics include: CPU usage percentage, load averages, core count; total/used/free memory and percentage; storage usage of all file systems; number of active connections, network interface statistics; intelligent bottleneck detection and recommendations; system information such as macOS version, uptime, and process count.

Usage

Installation

Global installation (recommended): Use uv to globally install the MCP server for system-wide access. After installation, the server can be run from any location.

Development installation:

  1. Clone the repository:
    git clone https://github.com/Pratyay/mac-monitor-mcp.git
    cd mac-monitor-mcp
    
  2. Create a virtual environment (recommended):
    python -m venv venv
    source venv/bin/activate
    
  3. Install dependencies:
    pip install mcp
    

Running

  • If installed globally with uv, the server can be run directly.
  • If running for development from the project directory, or use uv run. After running, the server will start and expose the MCP endpoint, which can be accessed by LLMs or other clients.

Management commands (for global installation)

  • List installed tools:uv tool list
  • Uninstall:uv tool uninstall mac-monitor
  • Upgrade: execute from the project directory uv tool install --force .
  • Install from Git:uv tool install git+https://github.com/Pratyay/mac-monitor-mcp.git

LLM integration

This MCP server is designed for large language models that support the Model Context Protocol. LLMs can use the get_resource_intensive_processes tool to access system resource information and provide intelligent analysis.

Applicable scenarios

  • System performance monitoring and analysis
  • Identify performance bottlenecks and causes of lag
  • Resource usage trends and capacity planning
  • Troubleshoot system performance issues
  • Quickly obtain a system health overview

Limitations

  • Only supports the macOS operating system, and depends on macOS built-in command-line tools:ps(identifies the processes with the highest CPU and memory consumption) and lsof(monitors network connections and identifies network-intensive processes).
  • Data is collected at tool invocation time, providing a real-time snapshot and does not include historical data tracking.
  • Network monitoring does not currently include bandwidth information.
  • There is currently no disk I/O monitoring, no visualization functionality, and it is not compatible with other operating systems.
  • Project version 0.2.0 (latest) includes the following improvements: newly added get_processes_by_category() Tools (support pagination and sorting), add comprehensive sorting options (CPU%, memory, PID, command name), add pyproject.toml packaging, support global installation via uv tool install, enhance error handling and input validation, add pagination metadata.
  • The project provides a hosted deployment at Fronteir AI.
  • Contributions are welcome; you can fork the repository, create a feature branch, commit, push, and open a Pull Request.