mcp-system-monitor

mcp-system-monitor

Enables Claude to monitor CPU, memory, disk, processes, network connections, Docker containers, and system logs for system diagnostics and troubleshooting.

Category
访问服务器

README

MCP System Monitor

A production-grade Model Context Protocol (MCP) server that provides Claude with comprehensive system monitoring and diagnostics capabilities.

What It Does

This MCP server gives Claude direct access to system metrics and diagnostics, enabling it to:

  • Monitor CPU, memory, and disk usage in real-time
  • Analyze running processes and resource consumption
  • Inspect network connections and listening ports
  • Monitor Docker containers and images
  • Access system logs via journalctl (Linux)

Perfect for system diagnostics, performance troubleshooting, DevOps automation, and infrastructure monitoring.

Features

Available Tools

  1. get_system_resources - Real-time system resource monitoring

    • CPU usage, cores, and load
    • Memory usage and swap statistics
    • Disk usage and filesystem info
    • System uptime and OS details
  2. list_processes - Process monitoring and analysis

    • Top processes by CPU or memory usage
    • Process state and resource consumption
    • Command line and user information
    • Sortable and filterable results
  3. get_network_connections - Network connection analysis

    • Active network connections
    • Listening ports and services
    • Connection states (ESTABLISHED, LISTEN, etc.)
    • Process-to-port mapping
  4. get_docker_status - Docker container monitoring

    • Running and stopped containers
    • Container status and health
    • Image inventory
    • Port mappings and resource usage
  5. get_system_logs - System log analysis (Linux only)

    • Recent journalctl entries
    • Filterable by priority level
    • Filterable by systemd unit
    • Structured log output

Installation

cd mcp-system-monitor
npm install
npm run build

Configuration

Claude Code Configuration

Add to your Claude Code MCP settings (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "system-monitor": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-system-monitor/dist/index.js"]
    }
  }
}

Permissions

Some features require elevated permissions:

  • Docker status: User must be in the docker group
  • System logs: May require sudo access to journalctl (depending on system configuration)
  • Process details: Full process info may require elevated privileges

Example Usage with Claude Code

Once configured, you can ask Claude:

"What's my current CPU and memory usage?"

"Show me the top 10 processes by CPU usage"

"List all listening ports and which processes are using them"

"What Docker containers are running right now?"

"Show me the last 100 error-level system logs"

"Which process is using port 8080?"

"Is my disk usage getting high?"

Platform Support

  • CPU/Memory/Disk/Processes: All platforms (Linux, macOS, Windows)
  • Network connections: All platforms
  • Docker status: Requires Docker installation
  • System logs: Linux only (requires systemd/journalctl)

Gracefully degrades on platforms where features aren't available.

Development

# Watch mode for development
npm run dev

# Build for production
npm run build

# Start the server
npm start

Security Considerations

This server provides read-only access to system information. It does not:

  • Modify system configuration
  • Kill or start processes
  • Change permissions
  • Execute arbitrary commands

However, it does expose system information including:

  • Running processes and their arguments
  • Network connections
  • System logs

Only use in trusted environments and be mindful of what information you share.

Error Handling

The server includes comprehensive error handling for:

  • Missing system utilities (docker, journalctl)
  • Permission denied errors
  • Platform-specific features
  • Malformed data
  • Schema validation errors

Features that aren't available will return clear messages instead of errors.

Tech Stack

  • TypeScript for type safety
  • @modelcontextprotocol/sdk for MCP protocol
  • systeminformation for cross-platform system metrics
  • Zod for runtime schema validation
  • Native child_process for Docker and journalctl integration

Use Cases

  • DevOps: Automated system health checks
  • Troubleshooting: Quick diagnostics without leaving Claude
  • Monitoring: Resource usage tracking and alerting
  • Documentation: Generate system reports and inventories
  • Development: Debug resource leaks and performance issues

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选