
Linux MCP
io.github.Mohabdo21由 GitHub 账号 Mohabdo21 发布v0.3.0更新于 Nov 6, 2026
Linux MCP server for real-time system monitoring - CPU, memory, disk, network, processes, Docker.
概览
本地运行的 Linux 监控 MCP 服务器,让助手实时查看 CPU、内存、磁盘、网络、进程、Docker、服务、安全与硬件信息。
- 可以做什么
- 读取系统、CPU、内存、磁盘、网络与硬件指标,并可一次调用获取系统快照
- 列出并按 CPU 或内存排序进程,查看打开的文件描述符、连接与监听端口
- 检查 Docker 容器、镜像、网络、卷与容器统计
- 查看 systemd 单元、定时器、crontab 与 cron 任务,以及已安装软件包和可用更新
- 审计安全状况:会话、失败登录、SELinux/AppArmor、防火墙、SSH、SUID 与世界可写文件
- 读取 /proc 诊断信息、man 手册、SMART 与 RAID 健康状态,并以 MCP 资源形式提供系统数据
- 适用场景
- 适合让助手诊断或汇报其所在的 Linux 主机:排查负载、磁盘压力、异常服务、容器状态、待更新项或安全问题,无需自己逐条输入命令。
- 运行要求
- 以本地进程方式在 Linux 上通过 STDIO 运行,由 MCP 客户端启动。可下载预编译二进制、用 go install 安装,或用 Go 1.27+ 从源码构建。Docker 为可选,仅 Docker 相关工具需要。可选配置文件位于 ~/.config/linux-mcp/config.json 或通过 LINUX_MCP_CONFIG 指定;ping 与 IP 地理位置查询需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Linux MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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.
[MCP Registry] [linux-mcp MCP server] [GitHub Downloads (all assets, all releases)] [Linux MCP on mcprush]
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, and container stats
- 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, rpm/dnf, apk)
- 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.27+ (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:
A fully static build (no libc dependency) is also available as linux-mcp_static.
Via go install
The binary is placed in $GOPATH/bin/ (typically ~/go/bin/).
Build from source
The binary is placed at bin/linux-mcp.
For a fully static binary (no libc dependency):
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, Claude Code, Codex, OpenCode, or any MCP host).
Running directly
This starts the server and listens for MCP requests on STDIN/STDOUT.
Integration
OpenCode
Add the following to your OpenCode configuration:
Claude Code
Add the server via the CLI:
To scope it to all your projects instead of just the current one:
Or create a .mcp.json file in your project root for team-shared configuration:
Verify the connection inside a Claude Code session with /mcp.
Codex
Add the server via the CLI:
Or add it manually to ~/.codex/config.toml (or .codex/config.toml for project-scoped config):
Verify the connection with codex mcp list.
Tools and resources
65 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.
Invalid configuration prevents startup. The server also handles SIGHUP to reload the configuration file at runtime without restarting; a failed reload retains the last valid configuration. Disabled collectors are skipped by aggregate tools and reported in their errors.
Docker diagnostic responses omit environment values and raw command arguments, including image-history commands. Other diagnostic content, such as logs and labels, can still contain sensitive data; grant access only to trusted clients.
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)
来源:README.md,提交 c802a4d
工具
0版本历史
4- v0.3.0最新Nov 6, 2026
- v0.2.18Oct 11, 2026
- v0.2.17Sep 29, 2026
- v0.2.15Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分