hypr-mcp
# hypr-mcp
Let MCP clients drive Hyprland: screenshots, mouse, keyboard, windows,
workspaces, clipboard, launching apps, OCR.
Needs Hyprland 0.55 or newer. Older versions get a clear error instead of
weird behavior. Made for OpenCode; anything else speaking MCP might work
but hasn't been tested.
## Needs
Hyprland, Python 3.10+, pipx, plus (Arch names, adapt to your distro):
| Tool | For |
| --- | --- |
| `grim` | screenshots, OCR |
| `ydotool` (+ `ydotoold` running) | clicking, scroll, drag |
| `wtype` | typing, single keys |
| `wl-clipboard` | clipboard, pasting |
| `tesseract` + `tesseract-data-eng` | finding text on screen |
No `wtype`? `paste_text` (clipboard + ctrl+v) covers most typing.
No `tesseract`? Models with vision just look at screenshots directly.
## Install
```bash
curl -sSL https://raw.githubusercontent.com/tuan-cre/hypr-mcp/main/install.sh | bash
```
That handles system deps and `pipx install`.
Then add to `~/.config/opencode/opencode.jsonc`:
```jsonc
{
"mcp": {
"servers": {
"hypr": {
"type": "local",
"command": ["hypr-mcp"],
},
},
},
}
```
Or manually: `pipx install git+https://github.com/tuan-cre/hypr-mcp.git`
## Tools (27)
Seeing — `screenshot` (inline JPEG + mapping, or `path` for full-res PNG
to disk), `find_text_on_screen`, `click_text`, `wait_text`.
Mouse — `mouse_move`, `mouse_click`, `mouse_scroll`, `mouse_drag`.
Keyboard — `type_text`, `key_press`, `paste_text`.
Windows — `list_windows` (`[focused]`/`[floating]` flags), `focus_window`,
`close_window`, `move_window`, `resize_window`, `toggle_fullscreen`,
`toggle_floating`.
Workspaces — `list_workspaces` (`[focused]` flag), `switch_workspace`,
`toggle_special` (move via `move_window` + `"special:name"`).
Misc — `list_monitors`, `get_cursor_position`, `clipboard_read`,
`clipboard_write`, `launch_app`, `wait_window`.
Actions confirm themselves where possible (launch/focus/close wait for the
real event, not a sleep). No force-kill, no shell in `launch_app`,
clipboard reads are capped.
## Config
Env vars, all optional: `HYPR_MCP_MAX_WIDTH` (1440),
`HYPR_MCP_JPEG_QUALITY` (75), `HYPR_MCP_OCR_MIN_CONF` (30),
`HYPR_MCP_EVENT_TIMEOUT` (10s), `HYPR_MCP_LAUNCH_TIMEOUT` (30s).
## License
MIT
TDQS
Scored across 27 tools
Each tool targets a distinct resource or action. Overlapping categories (type_text, key_press, paste_text) are clearly differentiated by use case, and OCR tools (find_text_on_screen, wait_text, click_text) have precise roles. No ambiguity that would cause an agent to select the wrong tool.
All tools follow a consistent snake_case verb_noun pattern (list_monitors, switch_workspace, mouse_click, clipboard_write). The verbs are predictable and the naming is uniform, making the set highly readable and navigable.
With 27 tools, the count exceeds the 25+ threshold for 'too many'. While the domain is broad (window management, input, OCR, clipboard), the tool surface feels heavy and could potentially be consolidated. The scope justifies many tools, but the sheer number edges into over-provisioning.
The toolset covers window lifecycle, workspace switching, input control, OCR, clipboard, and screenshots. Minor gaps exist (e.g., no minimize or workspace creation), but core automation workflows are fully supported, and agents can accomplish most tasks without dead ends.