# Screen MCP — screenshot + keyboard input for GUI agents. # # Auto-activated when `hyperhive.gui.enable = true`. Wires the # `hive-screen-mcp` stdio bridge as `extraMcpServers.screen` so claude # gets three tools: `screenshot`, `type_text`, and `key_press`. # # All tools use Wayland protocols mediated by the Weston compositor — # no `/dev/uinput` or kernel-level injection needed. `grim` takes # screenshots; `wtype` handles both text input and key/modifier combos # via the `zwp-virtual-keyboard-unstable-v1` protocol. { 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 ]; }; }