Sponsored by Deepsite.site

MacOS Resource Monitor MCP Server

Created By
Pratyaya year ago
Content

MacOS Resource Monitor MCP Server

A Model Context Protocol (MCP) server that identifies resource-intensive processes on macOS across CPU, memory, and network usage.

Overview

MacOS Resource Monitor is a lightweight MCP server that exposes an MCP endpoint for monitoring system resources. It analyzes CPU, memory, and network usage, and identifies the most resource-intensive processes on your Mac, returning data in a structured JSON format.

Requirements

  • macOS operating system
  • Python 3.10+
  • MCP server library

Installation

  1. Clone this 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 the required dependencies:

    pip install mcp
    

Usage

  1. Start the MCP server:

    python src/monitor.py
    
  2. You should see the message:

    Simple MacOS Resource Monitor MCP server starting...
    Monitoring CPU, Memory, and Network resource usage...
    
  3. The server will start and expose the MCP endpoint, which can be accessed by an LLM or other client.

Using the Tool

The server exposes a single tool:

  • get_resource_intensive_processes(): Returns information about the most resource-intensive processes

When called, this tool will return a JSON object containing information about the top resource consumers in each category (CPU, memory, and network).

Sample Output

{
  "cpu_intensive_processes": [
    {
      "pid": "1234",
      "cpu_percent": 45.2,
      "command": "firefox"
    },
    {
      "pid": "5678",
      "cpu_percent": 32.1,
      "command": "Chrome"
    }
  ],
  "memory_intensive_processes": [
    {
      "pid": "1234",
      "memory_percent": 8.5,
      "resident_memory_kb": 1048576,
      "command": "firefox"
    },
    {
      "pid": "8901",
      "memory_percent": 6.2,
      "resident_memory_kb": 768432,
      "command": "Docker"
    }
  ],
  "network_intensive_processes": [
    {
      "command": "Dropbox",
      "network_connections": 12
    },
    {
      "command": "Spotify",
      "network_connections": 8
    }
  ]
}

How It Works

The MacOS Resource Monitor uses built-in macOS command-line utilities:

  • ps: To identify top CPU and memory consuming processes
  • lsof: To monitor network connections and identify network-intensive processes

Data is collected when the tool is invoked, providing a real-time snapshot of system resource usage.

Integration with LLMs

This MCP server is designed to work with Large Language Models (LLMs) that support the Model Context Protocol. The LLM can use the get_resource_intensive_processes tool to access system resource information and provide intelligent analysis.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Potential Improvements

Here are some ways you could enhance this monitor:

  • Add disk I/O monitoring
  • Improve network usage monitoring to include bandwidth
  • Add visualization capabilities
  • Extend compatibility to other operating systems
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Serper MCP ServerA Serper MCP Server
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Amap Maps高德地图官方 MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"