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.

概覽

AI 產生的概覽

在本機執行的 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 地理位置查詢需要網路存取。
安裝前請注意
它會把主機診斷資訊暴露給已連線的用戶端,README 提醒日誌與標籤等診斷內容可能含敏感資料,因此只應授權給可信任的用戶端。部分工具會存取外部服務(ip-api.com 用於 IP 地理位置)並執行網路探測。Docker 回應會省略環境變數值與原始指令參數,但其他輸出仍可能洩漏系統細節。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Linux MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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]

[linux-mcp demo]

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:

bash
curl -LO https://github.com/Mohabdo21/linux-mcp/releases/latest/download/linux-mcpchmod +x linux-mcp

A fully static build (no libc dependency) is also available as linux-mcp_static.

Via go install

bash
go install github.com/Mohabdo21/linux-mcp@latest

The binary is placed in $GOPATH/bin/ (typically ~/go/bin/).

Build from source

bash
git clone https://github.com/Mohabdo21/linux-mcp.gitcd linux-mcpmake build

The binary is placed at bin/linux-mcp.

For a fully static binary (no libc dependency):

bash
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, Claude Code, Codex, OpenCode, or any MCP host).

Running directly

bash
./bin/linux-mcp

This starts the server and listens for MCP requests on STDIN/STDOUT.

Integration

OpenCode

Add the following to your OpenCode configuration:

json
{  "mcp": {    "linux-mcp": {      "type": "local",      "command": ["/path/to/linux-mcp"],      "enabled": true    }  }}
Claude Code

Add the server via the CLI:

bash
claude mcp add linux-mcp -- /path/to/linux-mcp

To scope it to all your projects instead of just the current one:

bash
claude mcp add linux-mcp --scope user -- /path/to/linux-mcp

Or create a .mcp.json file in your project root for team-shared configuration:

json
{  "mcpServers": {    "linux-mcp": {      "type": "stdio",      "command": "/path/to/linux-mcp"    }  }}

Verify the connection inside a Claude Code session with /mcp.

Codex

Add the server via the CLI:

bash
codex mcp add linux-mcp -- /path/to/linux-mcp

Or add it manually to ~/.codex/config.toml (or .codex/config.toml for project-scoped config):

toml
[mcp_servers.linux-mcp]command = "/path/to/linux-mcp"

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.

json
{  "log_level": "info",  "timeouts": {    "get_system_snapshot": "60s",    "ping_host": "5s"  },  "disabled": []}
FieldDescription
log_levelOne of debug, info, warn, error (default: info)
timeoutsPer-tool timeout overrides as Go duration strings
disabledTool names to disable, including their resource and aggregate collector paths

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

來源:README.md,提交 c802a4d

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

4
  1. v0.3.0最新Nov 6, 2026
  2. v0.2.18Oct 11, 2026
  3. v0.2.17Sep 29, 2026
  4. v0.2.15Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分