
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 分