hyprcu
Gives agents native hands and eyes on a Hyprland Wayland desktop: takes screenshots and zoomed crops of monitors/windows/regions, reads the AT-SPI accessibility tree as text and finds elements by role or name, and performs real input — clicking, dragging, scrolling, typing, key combos — through the compositor's virtual-pointer and virtual-keyboard protocols. Also exposes window/monitor queries, window focus and workspace management via hyprctl, waiting on UI text instead of screenshot polling, and an optional nested Hyprland instance that provides an isolated cursor, focus, and clipboard for the agent.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hyprcuopen the calculator and compute 78 times 6"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Anthropic's official computer use does not exist on Linux. Every cross-platform "desktop MCP" assumes X11 or macOS APIs and falls over on Wayland, where global input injection is forbidden by design. hyprcu takes the one route that actually works on Hyprland: speak the compositor's own protocols.
you: "open calculator and work out 78*6 using the accessibility tree"
claude: launch("gnome-calculator") → find(role="button", name="7") → a11y_click("e15")
→ type("8*6") → key(["Return"]) → wait_for(text="468") ✓ 468That whole loop ran as the first end-to-end test. No screenshot was needed.
What you get
Need | How hyprcu does it |
See |
|
Read UI as text | AT-SPI accessibility tree, Wayland's window-relative coords fixed via |
Click / scroll |
|
Position cursor |
|
Type / keys |
|
Wait |
|
Isolate | optional nested Hyprland: the agent gets its own cursor, focus and clipboard |
Audit | every input action journaled to |
Related MCP server: hypruse
Install
Ubuntu / Debian:
sudo apt install hyprland grim wtype wl-clipboard python3-gi gir1.2-atspi-2.0 at-spi2-core
git clone https://github.com/iamanishx/hyprcu && cd hyprcu
uv venv --python /usr/bin/python3 --system-site-packages # system python has the GObject bindings
uv pip install -e .
.venv/bin/hyprcu doctorArch:
sudo pacman -S grim wtype wl-clipboard python-gobject at-spi2-core
# then the same uv stepsdoctor checks the session, binaries, the virtual-pointer global, screencopy and
the AT-SPI bus, and tells you exactly what is missing.
The venv must be able to
import gi, hence--system-site-packages. Without it the accessibility tools switch off and everything else still works.
Attach to Claude Code
claude mcp add -s user hyprcu -- /abs/path/to/hyprcu/.venv/bin/hyprcu serve
# or simply
.venv/bin/hyprcu init --runLaunch Claude Code from inside your Hyprland session so the server inherits
WAYLAND_DISPLAY and HYPRLAND_INSTANCE_SIGNATURE.
Recommended permission split: auto-allow the read-only tools, keep the input
tools behind the approval prompt. hyprcu marks them with MCP readOnlyHint /
destructiveHint annotations so clients can do this automatically.
Tools
Observe (read-only)
Tool | What |
| focused monitor, a monitor by name, |
| 2x native crop around a point, for small targets |
| accessibility tree as indented text: |
| elements by role and/or name substring |
| full text of an element |
| |
| block until text appears in a window, or a window with a title exists |
Act
Tool | What |
| real pointer events at global coordinates |
| click the center of a tree element by ref |
| invoke an element's native action (works even when covered) |
| focus an element / replace an input's text with no keystrokes |
| literal text; combos like |
| window management via hyprctl |
| start a program on the current target desktop |
|
Agent desktop (experimental)
desktop_start spawns a nested Hyprland that appears as one window on your
host. The agent gets its own cursor, focus and clipboard; you keep working.
All tools target it until desktop_stop.
Coordinates
Everything is in Hyprland global logical coordinates, the same space as
hyprctl clients and cursorpos. A screenshot reports x, y, width, height
and scale (image pixels per logical unit):
global_x = x + px / scale
global_y = y + py / scaleThis is what makes fractional scaling and multi-monitor layouts work without guesswork.
How it works
Claude Code ──stdio──▶ hyprcu (python)
├─ hyprctl ─────────▶ windows, monitors, movecursor, focus
├─ pywayland ───────▶ zwlr_virtual_pointer_v1 (buttons, scroll)
├─ wtype ───────────▶ zwp_virtual_keyboard_v1 (text, combos)
├─ grim ────────────▶ wlr-screencopy (pixels)
├─ AT-SPI (gi) ─────▶ org.a11y.Bus (UI as text)
└─ Hyprland --config ▶ nested agent desktop (isolation)Why this combination and not uinput: Wayland deliberately forbids global
input injection. ydotool works around it with a root daemon and a fake
kernel device, which needs the input group, suffers pointer-acceleration
drift on long moves, and does not know where windows are. Hyprland exposes the
virtual-pointer and virtual-keyboard protocols, so a normal client can send
input with the compositor's blessing and still ask it where everything is.
Why the accessibility tree first: screenshots cost thousands of tokens per step and clicks on them are guesses. The tree gives named, sized elements and exact centers. Pixels are the fallback for apps that expose nothing.
Safety
HYPRCU_READONLY=1disables every input tool.HYPRCU_ALLOW_HOST_INPUT=0restricts input to the nested agent desktop.Window titles, tree text and screenshots are untrusted input. The server instructions tell the model so; the client's approval prompt is the real guard.
The journal in
$XDG_RUNTIME_DIR/hyprcu/journal.jsonlrecords every action.Screenshots live in
$XDG_RUNTIME_DIR/hyprcu/, a tmpfs cleared at logout.
Variable | Default | Meaning |
|
|
|
|
|
|
|
|
|
|
| longest screenshot side sent to the model |
|
| per-call AT-SPI timeout for frozen apps |
|
| Super+Return inside the agent desktop |
Known limits
Shared seat. On the host desktop you and the agent share one cursor and keyboard. If you click elsewhere mid-action, keystrokes follow your focus. Use
desktop_startfor a separate seat.Chromium / Electron expose a tree only with
--force-renderer-accessibility. Terminals, games and canvas apps expose nothing: screenshot + click.Hyprland only. Tested on 0.53. sway and niri speak the same protocols but the hyprctl layer is Hyprland-specific. X11 is out of scope.
Ubuntu's
grimhas no JPEG support; hyprcu captures PNG and re-encodes.
Why not …?
Project | Difference |
Anthropic computer use | macOS and Windows only |
Cua Driver | X11 / XWayland route; pure Wayland unsupported, Hyprland experimental |
computer-use-linux | portals + uinput + ydotool; validated on GNOME, not Hyprland |
hypruse | same input design, no isolated agent desktop |
hypr-computer | has the nested desktop, but host input goes through uinput |
hyprcu is the union: compositor-native input, tree-first observation, and an optional isolated seat, in one small Python package.
Development
.venv/bin/hyprcu doctor # environment check
.venv/bin/hyprcu shot active # quick capture
.venv/bin/hyprcu tree calculator # dump a window's treeThe virtual-pointer binding in src/hyprcu/protocols/gen/ is generated from the
vendored wlr-virtual-pointer-unstable-v1.xml with python -m pywayland.scanner.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted Screenshots MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Screenshot and HTML render MCP server for AI agents
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server for Hyprland desktop automation that allows AI assistants to see the screen, control mouse and keyboard, and manage windows using native Wayland tools. It integrates OCR for text-based interaction and supports complex multi-monitor setups with pixel-accurate coordinate mapping.276MIT
- AlicenseAqualityAmaintenanceAn MCP server for Hyprland that enables AI agents to control workspaces, windows, mouse, keyboard, and take screenshots on a Wayland desktop.14269 PyPI39MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that controls native Wayland windows on KDE Plasma from an AI agent, enabling window listing, screenshots, clicks, typing, and more.18 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceMCP server for controlling Hyprland Wayland compositor: screen capture, mouse/keyboard injection, and automation via native Hyprland IPC and wlr protocols.MIT