linux-mcp
A Linux system monitoring MCP server that provides real-time information on CPU, memory, disk, network, processes, Docker, security, and more via MCP tools.
README
linux-mcp - Linux MCP Server
A Linux system monitoring server built on the Model Context Protocol (MCP). Provides real-time system information - CPU, memory, disk, network, processes, Docker, and more - via MCP tools over STDIO transport.
<p align="center"> <img src="assets/demo.gif" alt="linux-mcp demo" width="100%"> </p>
Features
- System - hostname, OS, kernel, architecture, uptime, load averages
- CPU - usage, model, frequency, core counts, temperature sensors
- Memory - RAM and swap usage with percentages
- Disk - per-partition usage, inodes, mount options, largest files, block devices
- Network - interface stats, active connections, listening ports, DNS, ping, IP geolocation & ASN lookup
- Processes - running processes sorted by CPU or memory, open file descriptors per process
- Docker - containers, images, networks, volumes, disk usage, system info, stats for all containers, system snapshot
- Services & automation - systemd units, service status, user timers, crontab, system cron jobs
- Security - active user sessions, failed login detection, SELinux/AppArmor status, firewall/SSH/SUID/world-writable audit with security score
- Packages - installed packages and available updates (pacman, dpkg)
- Hardware - GPU info, PCI/USB bus devices, power/battery analytics
- Desktop session - Wayland/X11 protocol, DE identifiers, runtime config
- Storage health - RAID status, logrotate configuration, time synchronization, SMART disk health, per-device I/O metrics
- System health - comprehensive health assessment with memory, disk, load, and systemd checks
- /proc diagnostics - deep /proc inspection: interrupts, softirqs, vmstat, diskstats, filesystems, kernel version, slabinfo
- Man pages - system manual pages for any installed command
- Snapshot - comprehensive system overview in a single call
- MCP Resources - system data also accessible as readable resources
Prerequisites
- Go 1.26+ (to build from source)
- Linux (the server targets Linux; some tools use Linux-specific paths)
- Docker (optional - only needed for Docker tools)
Installation
Via MCP Registry
Discover the server on the MCP Registry and install via your MCP client (VS Code one-click install, or manual config).
Download pre-built binary
Download the latest binary from the GitHub Releases page:
curl -LO https://github.com/Mohabdo21/linux-mcp/releases/latest/download/linux-mcp
chmod +x linux-mcp
A fully static build (no libc dependency) is also available as linux-mcp_static.
Build from source
git clone https://github.com/Mohabdo21/linux-mcp.git
cd linux-mcp
make build
The binary is placed at bin/linux-mcp.
For a fully static binary (no libc dependency):
make build-static
Usage
The server communicates over STDIO transport, following the MCP standard. It is designed to be launched by an MCP client (e.g., Claude Desktop, OpenCode, or any MCP host).
Running directly
./bin/linux-mcp
This starts the server and listens for MCP requests on STDIN/STDOUT.
Integration with OpenCode
Add the following to your OpenCode configuration:
{
"mcp": {
"linux-mcp": {
"type": "local",
"command": ["/path/to/linux-mcp"],
"enabled": true
}
}
}
Tools and resources
62 tools and 19 resources covering system, CPU, memory, disk, network, processes, Docker, security, packages, hardware, and more.
Full tool and resource reference
Configuration
The server can be configured via a JSON file loaded from ~/.config/linux-mcp/config.json or the LINUX_MCP_CONFIG environment variable.
{
"log_level": "info",
"timeouts": {
"get_system_snapshot": "60s",
"ping_host": "5s"
},
"disabled": []
}
| Field | Description |
|---|---|
log_level |
One of debug, info, warn, error (default: info) |
timeouts |
Per-tool timeout overrides as Go duration strings |
disabled |
List of tool names to disable at startup |
The server also handles SIGHUP to reload the configuration file at runtime without restarting.
MCP Registry
Published on the MCP Registry as io.github.Mohabdo21/linux-mcp.
License
Dependencies
- modelcontextprotocol/go-sdk - MCP SDK for Go
- shirou/gopsutil/v4 - System metrics (CPU, memory, disk, network, processes, sensors)
- docker/go-sdk - Docker Engine API client
- moby/moby/client - Docker client library
- ip-api.com - Free IP geolocation API (used by
get_ip_info)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。