
ultranix-mcp
io.github.jxoesneon由 GitHub 帳號 jxoesneon 發布v1.4.0更新於 Oct 24, 2026
Secure Linux desktop automation - input, screen/OCR/vision, AT-SPI2 UI tree, window, clipboard
概覽
Linux 桌面自動化 MCP 伺服器,讓助理在 Wayland 或 X11 工作階段中查看畫面、點擊、輸入並管理視窗,並具備稽核日誌與政策控管。
- 可以做什麼
- 控制滑鼠與鍵盤:點擊、雙擊、拖曳、捲動、移動、輸入文字與按鍵狀態。
- 擷取與檢視畫面:螢幕截圖、區域擷取、取色、OCR 文字尋找、圖示尋找、螢幕錄製與即時畫面串流。
- 透過 AT-SPI2 無障礙樹檢視並操作介面元素,包括等待元素出現與叫用元素。
- 管理視窗:在多種合成器下列出、聚焦、移動、調整大小、關閉視窗並查詢目前作用中的視窗。
- 讀取、寫入與清除剪貼簿,並執行宣告式外掛工具巨集。
- 執行系統指令、網頁查詢,以及動作歷史、重播與指標工具。
- 適用情境
- 適合需要助理直接操作 Linux 桌面的情境:填寫圖形介面應用程式、點擊完成流程、讀取畫面上的文字或自動調整視窗版面。最適合 Hyprland、sway、Wayfire、river 等 wlroots 合成器上的 Wayland 工作階段,並對 KDE、GNOME 與 X11 提供備援方案。
- 執行需求
- 以 Rust 二進位檔或 OCI 映像在本機 Linux 桌面工作階段執行;已在 CachyOS + Hyprland(Wayland)上驗證。依工作階段需要 hyprctl、grim、slurp、wl-clipboard、xclip、kdotool 或 wmctrl 等執行期輔助工具,介面檢視需要 AT-SPI2 匯流排,瀏覽器工具需要開啟 9222 遠端偵錯埠的 Chromium。HTTP 傳輸需要 ULTRANIX_MCP_API_KEY;可選用 ULTRANIX_MCP_API_KEY_FILE、ULTRANIX_MCP_API_KEY_EXPIRES、ULTRANIX_MCP_AUDIT_SECRET、ULTRANIX_MCP_HISTORY_SECRET 與 ULTRANIX_MCP_SENTRY_DSN。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ultranix-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
ultranix-mcp
[Version] [License: ISC] [Platform] [Rust] [MCP SDK] [Status]
**ultranix-mcp is the enterprise-grade, secure Linux desktop-automation layer for AI agents.**It gives Model Context Protocol (MCP) clients - Claude Desktop, Claude Code, Cursor, Windsurf, and any MCP-enabled assistant - the ability to see, click, type, and drive a Wayland desktop: mouse, keyboard, screenshots, OCR, icon finding, window management, and accessibility-tree inspection.
ultranix-mcp is Wayland-native by design: compositor protocols first,
uinput/evdev second, XDG Desktop Portals last - behind the same
governance-and-trust surface as its siblings (ultramac on macOS, ultrawin on
Windows): audit logging, rate limiting, input sanitization, and
AES-256-GCM-encrypted action history. It is the first Linux desktop MCP to
combine a cross-compositor fallback ladder, a full governance surface, and a
tri-OS sibling contract - organisations can let agents control a Linux
desktop without giving up control themselves.
**Status:**v1.4.0 implemented. Phases 0-5 of ROADMAP.md have shipped, plus the v1.1.0 wave (layer-shell overlay, X11-native providers, PipeWire portal capture, opt-in Sentry, OCR cache, additional metrics), the v1.2.0 breadth wave (clipboard tools, plugin tool-macros,
screen_record, sway/Wayfire/river/KDE/GNOME session detection, per-backend cargo features, framed history v2), the v1.3.0 policy wave (runtime access-control policy with per-key roles,--readonly/--allow-tools/--deny-tools, per-backend invocation metrics, optional HMAC-signed audit lines), and the v1.4.0 reach wave (Wayfire/river/GNOME window rungs, livescreen_streamcapture, plugin-exposed dynamic tools, OCI image +-binpackage) - see CHANGELOG.md for per-release notes. The verified target environment is CachyOS (Arch) + Hyprland on Wayland, PipeWire,xdg-desktop-portal-hyprland, and a live AT-SPI2 bus, on Rust 1.98.1.
Features
- Precision Mouse Control- click, double-click, drag, scroll,
button-state control, position queries, and smooth path movement via the
zwlr_virtual_pointer_v1protocol. No root, no helper daemons. - Advanced Keyboard Input- type text and drive key states through
virtual-keyboard-unstable-v1, with full modifier and keymap handling. - Intelligent Vision- in-process
wlr-screencopy-unstable-v1capture, ONNX Runtime OCR (ortcrate), and OWL-ViT icon finding. Region screenshots, color sampling (color_at), and session spatial focus (set_spatial_focusscopesscreenshot/find_text_on_screen/find_icon), and realscreen_highlightoverlays viazwlr_layer_shell_v1(translucent, click-through;-32010 ProviderUnavailableon compositors/sessions without layer-shell - see docs/TOOLS.md). - Window Management- list, focus, move, resize, close, and inspect
windows through Hyprland's
hyprctlIPC socket (hyprctl -jJSON:clients,activewindow,dispatch,workspaces), sway's own IPC protocol on$SWAYSOCK, Wayfire'sipc/ipc-rulesplugins on$WAYFIRE_SOCKET, the pinnedriverctlsubprocess + wlroots foreign-toplevel composite on river (riverctlkeeps focused-viewcloseand relativemove/resizedeltas; the toplevel protocol supplies enumeration and per-windowfocus/close/min/max/fullscreen),wlr-toplevelas the shared wlroots fallback rung and the sole rung on unknown wlroots sessions,kdotoolon KDE, the "Window Calls" Shell extension on GNOME (when installed), orwmctrlon X11 sessions. - UI Inspection- full accessibility-tree access over AT-SPI2
(
atspicrate): UI-tree dumps, focused-element queries, element search, and wait-for-element synchronization. - Clipboard & Plugins-
clipboard_get/clipboard_set/clipboard_clearoverwl-clipboard(Wayland) orxclip/xsel(X11), writes consent-gated; and declarative plugin tool-macros -~/.ultranix-mcp/plugins/*.jsonmanifests of catalog-tool steps run viaplugin_list/plugin_run/plugin_reload, each step re-entering the secured dispatch path. A manifesttoolsection (v1.4.0) registers the plugin as a first-classtools/listentry with a generatedinputSchema, dispatched through the same securedplugin_runpipeline. - Screen Recording & Live Capture-
screen_recordcaptures a frame everyinterval_msfor up toduration_msinto a freshrec-<ulid>dir plus amanifest.json(hard caps: 600 frames, 512 MiB);screen_stream(v1.4.0) runs a continuousstart/status/latest/stoprolling-window capture understream-<ulid>(≤1800 frames, ≤512 MiB, oldest evicted) withlatestreturning the newest frame inscreenshot's image shape -since/wait_msturn it into a long-poll (park up to 30 s for a frame newer than the watermark) instead of busy-polling. - Enterprise Security-
uxcp_*API-key auth on HTTP, 10 req/s token bucket, input sanitization, command/path whitelists, AES-256-GCM-encrypted action history, and JSONL audit logging. See SECURITY.md.
Architecture
ultranix-mcp is a single Rust 2024 binary on the tokio runtime, built on
rmcp - the official
Model Context Protocol Rust SDK - with native stdioand streamable-HTTP
(:3010) transports.
The desktop-automation layer is organised as provider traits behind
dependency injection(the pattern proven in ultrawin's src/traits.rs):
every capability is an Option<Arc<dyn Trait>>, so missing compositor
features, absent portals, or headless CI degrade gracefully instead of
failing hard. Mock providers implement the same traits, which keeps the full
tool surface testable without a Wayland session.
- wlroots-native- in-process Wayland protocols (Hyprland, sway, Wayfire, river, and most unknown wlroots compositors; no root)
grim/slurp(capture) +uinput/evdev(input)- whitelisted helper binaries and kernel-level input for non-wlroots sessions- XDG Desktop Portal-
ScreenshotandRemoteDesktopoverzbus(universal fallback, subject to portal consent; the only route on KDE/GNOME Wayland, which implement neither wlr-screencopy nor the wlr virtual-input protocols)
Window management rides compositor IPC where it exists: hyprctl on
Hyprland, sway's i3-flavoured IPC ($SWAYSOCK, shipped at v1.2.0) on
sway, Wayfire's ipc/ipc-rules plugins ($WAYFIRE_SOCKET, v1.4.0) on
Wayfire, riverctl + zwlr_foreign_toplevel_manager_v1 on river
(riverctl drives focused-view close and relative-delta
move/resize; foreign-toplevel enumerates windows and addresses them
as wlr-toplevel-N for focus/close/min/max/fullscreen), and
wlr-toplevel as the shared wlroots fallback rung - the sole window
rung on unknown wlroots sessions (niri, labwc, ...),
kdotool (KWin
scripting - Wayland and X11
alike) on KDE, the "Window Calls" Shell extension over D-Bus on GNOME
(v1.4.0, extension required - org.gnome.Shell.Eval is deliberately
unused), and wmctrl on other X11 sessions.
On X11 sessions the X11-native rungs shipped at v1.1.0 resolve instead:
scrot capture, xdotool input (both still ahead of portal/uinput), and
wmctrl window management on non-Hyprland X11.
**Token efficiency.**Tool definitions cost context window. ultranix-mcp
supports --category= filtering so you expose only the tools you need:
Categories: mouse, keyboard, vision (capture/OCR/UI-tree/recording),
automation (misc), admin (window/history/metrics/plugins), clipboard.
Default: all.
Why ultranix-mcp?
Installation
Option 1: AUR (packaging shipped, submission pending)
Arch-family PKGBUILDs (ultranix-mcp, ultranix-mcp-git, and the
prebuilt-binary ultranix-mcp-bin) ship in
packaging/ - AUR submission is tracked on
ROADMAP.md. A
cargo install ultranix-mcp path is supported once the crate is
published; see docs/PACKAGING.md §2 for the
build-time ort network-fetch caveat.
Option 1b: OCI image (v1.4.0)
ghcr.io/jxoesneon/ultranix-mcp is published on every v* tag by
.github/workflows/oci.yml - intended for headless/CI use (bind-mount
$XDG_RUNTIME_DIR, the session bus, and /dev/uinput to reach real
providers; see docs/HEADLESS.md).
Option 2: Build from source
Prerequisites:
- Linux with a Wayland session - verified on CachyOS (Arch) + Hyprland
- Rust 1.98+ (2024 edition; verified on 1.98.1)
- Session tools used at runtime:
hyprctl,grim,slurp - Optional:
xdg-desktop-portal-hyprland(portal fallback path), an AT-SPI2 accessibility bus (UI inspection), Chromium/Chrome with--remote-debugging-port=9222(browser tools),wl-clipboard(wl-copy/wl-paste- clipboard tools on Wayland),xclip+xsel(clipboard tools on X11/XWayland),kdotool(window tools on KDE),riverctl(river focused-view geometry; enumeration and per-window control come from wlroots foreign-toplevel when advertised), the GNOME "Window Calls" Shell extension (window tools on GNOME)
Steps:
-
Clone the repository:
-
Build the project:
-
Start the server:
-
Run tests(mock providers - no Wayland session required):
**Cargo features (v1.2.0).**Every backend group is a feature, all on by
default so cargo install is unchanged:
Option 3: Nix flake (unverified)
A flake.nix ships at the repo root: nix build produces the package,
nix develop enters a devShell with the Rust toolchain and native deps
(pipewire, libxkbcommon, libclang for bindgen, session helper binaries),
and nix run launches the server. **Note:**the flake was written by
review and has not been evaluated in our toolchain - treat it as
unverified; fixes and confirmations welcome.
MCP client configuration
Point your MCP client at the binary over stdio. Example for Claude
Desktop / Cursor (claude_desktop_config.json / mcp.json):
(--stdio is accepted as a shorthand alias for --transport stdio.)
Token-efficient variant - expose only the mouse, keyboard, and vision categories:
Configuration
ultranix-mcp works out of the box over stdio (which never requires authentication). For the HTTP transport and production environments, the following variables are supported:
**Data directory.**Runtime state lives under ~/.ultranix-mcp/:
Session Requirements & Security
Wayland automation replaces macOS-style permission prompts with compositor capabilities. ultranix-mcp selects the least-privileged backend that works:
- wlroots-native (Hyprland)-
zwlr_virtual_pointer_v1,virtual-keyboard-unstable-v1, andwlr-screencopy-unstable-v1are exposed to regular clients. No root, no udev rules, no consent dialogs. - uinput/evdev- requires write access to
/dev/uinputvia the packaged udev rule (GROUP="ultranix-input"- a dedicated group holding only the service user; never the broadinputgroup, which grants keylogger-level read access to every evdev node). Setup is opt-in and documented in packaging/README-uinput.md. - XDG Desktop Portal-
Screenshot/RemoteDesktopviazbus; the portal mediates a per-app consent dialog throughxdg-desktop-portal-hyprland.
**Security Note:**ultranix-mcp ships with built-in safeguards against injection attacks - an arg-constrained, absolute-path-pinned command whitelist (
grim,slurp,scrot,hyprctlwithoutdispatch exec/exec-once;xdotool/wmctrlon X11 sessions only), a path whitelist ($XDG_RUNTIME_DIR,/tmp,~/.ultranix-mcp/**), strict input validation, rate limiting, fail-closed API-key auth on HTTP, a consent gate on destructive tools (-32015 ConsentRequired-> retry withconsent_token;--allow-destructivebypass), and encrypted action history. Read the full SECURITY.md and threat model.
Tool Reference
Summary mirror - docs/TOOLS.md is the canonical tool catalog (full schemas, per-tool errors, and consent semantics).
Mouse (--category=mouse)
mouse_click, mouse_double_click, mouse_move, mouse_get_position,
mouse_scroll, mouse_drag, mouse_button_control
Keyboard (--category=keyboard)
type_text, key_control
Vision (--category=vision)
screenshot, screen_info, screen_highlight, color_at,
set_spatial_focus, get_ui_tree, get_focused_element, find_element,
find_text_on_screen, find_icon, wait_for_ui_element, invoke_element,
screen_record, screen_stream
Automation (--category=automation)
sleep, mouse_move_path, system_command, web_query
Admin (--category=admin)
window_control, get_windows, get_active_window, metrics,
get_action_history, replay_action, clear_action_history,
plugin_list, plugin_run, plugin_reload
Clipboard (--category=clipboard)
clipboard_get, clipboard_set, clipboard_clear
Roadmap
See ROADMAP.md for the delivery plan - all of Phases 0-5
(scaffold -> Hyprland I/O -> AT-SPI2 -> vision/CDP -> enterprise ->
portability/packaging) shipped as of v1.0.0, the v1.1.0 wave added the
layer-shell screen_highlight overlay, X11-native providers, PipeWire
portal capture, opt-in Sentry, the OCR result cache, and four more
Prometheus metrics, and the v1.2.0 wave added clipboard tools, plugin
tool-macros, bounded screen_record, sway/Wayfire/river/KDE/GNOME session
detection with a sway window provider, per-backend cargo features, and the
framed v2 action-history format, and the v1.3.0 wave added the runtime
policy layer (TOML roles, per-key scoping, --readonly and tool
allow/deny flags), per-backend invocation metrics, and optional
HMAC-signed audit records, and the v1.4.0 wave closed the window-provider
coverage (Wayfire IPC, river riverctl, GNOME Window Calls), shipped
live screen_stream rolling capture and plugin-exposed dynamic tools,
and added the OCI image and ultranix-mcp-bin distribution artifacts -
see CHANGELOG.md for release
notes.
Documentation
Design and governance documents live in docs/, including
architecture decision records under docs/adr/. Start with
CONTRIBUTING.md for the development workflow.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for the mock-provider testing pattern, the ADR process, and pull-request conventions, and CODE_OF_CONDUCT.md for community expectations.
License
This project is licensed under the ISC License.
© 2026 ultranix-mcp authors.
來源:README.md,提交 48d5530
工具
0版本歷史
1- v1.4.0最新Sep 17, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分