# Screen MCP — screenshot, keyboard, and mouse for GUI agents. # # Auto-activated when `hyperhive.gui.enable = true`. Wires the # `hive-screen-mcp` stdio bridge as `extraMcpServers.screen` so claude # gets five tools: `screenshot`, `type_text`, `key_press`, # `mouse_move`, and `mouse_click`. # # All tools operate in userspace without `/dev/uinput`: # - `grim` takes screenshots via Wayland screencopy # - `wtype` handles text + key combos via `zwp-virtual-keyboard-unstable-v1` # - mouse tools speak RFB `PointerEvent` directly to the local neatvnc # server (port `HIVE_GUI_VNC_PORT`) — the VNC backend's native input path { pkgs, lib, config, ... }: { config = lib.mkIf config.hyperhive.gui.enable { # Register the screen MCP bridge so claude gets the screen tools. hyperhive.extraMcpServers.screen = { command = "${config.hyperhive.packages.hive-screen-mcp}/bin/hive-screen-mcp"; args = [ ]; }; # grim: Wayland screenshot; wtype: text + key input via virtual-keyboard # protocol (compositor-mediated, no /dev/uinput required). environment.systemPackages = [ pkgs.grim pkgs.wtype ]; }; }