by stefanoamorelli
Provides a lightweight Model Context Protocol server that exposes all hyprctl commands, enabling language models to query and control the Hyprland Wayland compositor through natural language interactions.
Hyprland MCP Server offers a Model Context Protocol interface to the Hyprland compositor. By wrapping the hyprctl
command‑line tool, it allows AI agents to retrieve information about monitors, workspaces, windows, input devices, and to dispatch actions such as switching workspaces, killing windows, or reloading the configuration.
HYPRLAND_INSTANCE_SIGNATURE
environment variable (e.g., echo $HYPRLAND_INSTANCE_SIGNATURE
).uv
command with the appropriate arguments and environment variables.mcp dev server.py
while Hyprland is running.hyprctl
commands.Q: Do I need to run this on a specific OS? A: It is designed for Linux systems where Hyprland is installed.
Q: Which Python versions are supported? A: Python 3.10 or newer.
Q: Is the server stable for production use? A: The project is in beta and labeled experimental; it is suitable for testing and personal automation.
Q: How do I add new tools?
A: Extend server.py
by defining additional MCP tool functions that wrap the desired hyprctl
commands.
Q: Can I run multiple instances?
A: Each instance must be pointed at a distinct Hyprland instance via its HYPRLAND_INSTANCE_SIGNATURE
.
https://github.com/user-attachments/assets/b4fc1d26-ec04-451a-b7c9-7f87b44d9c9e
A lightweight, unofficial Model Context Protocol (MCP) server that exposes all the functionality of hyprctl
—the command-line interface for the Hyprland Wayland compositor—to language models.
This server enables natural language interfaces to query and control Hyprland's window management, layouts, inputs, and more.
Note: This project is experimental and in beta.
git clone https://github.com/stefanoamorelli/hyprmcp.git
cd hyprmcp
HYPRLAND_INSTANCE_SIGNATURE
echo $HYPRLAND_INSTANCE_SIGNATURE
For example, in Claude Desktop, modify the ~/.config/Claude/claude_desktop_config.json
file as follows:
"Hyperland MCP Server": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"--with",
"subprocess",
"mcp",
"run",
"<global path of the repo>/hyprmcp/hyprmcp/server.py"
],
"env": {
"PYTHONPATH": "<global path of the repo>/hyprmcp",
"HYPRLAND_INSTANCE_SIGNATURE": "<your-hyprland-instance-signature>"
}
},
Tool Name | Description |
---|---|
run_hyprctl_command |
Executes arbitrary hyprctl commands. |
get_version |
Retrieves the Hyprland version and build info. |
list_monitors |
Lists all connected monitors and properties. |
list_workspaces |
Lists all active workspaces. |
list_clients |
Lists all windows and their properties. |
list_devices |
Lists all connected input devices. |
get_active_window |
Shows the currently active window details. |
list_layers |
Displays all layers in the compositor. |
get_splash |
Retrieves the current random splash message. |
dispatch_command |
Dispatches a command to Hyprland. |
set_keyword |
Dynamically sets a configuration keyword. |
reload_config |
Forces a reload of the Hyprland config file. |
enter_kill_mode |
Enables kill mode to terminate windows by click. |
These tools allow language models to interact with Hyprland's features seamlessly.
User Prompt: "Switch to workspace 2."
MCP Server Action: Executes hyprctl dispatch workspace 2
.
User Prompt: "What is the current active window?"
MCP Server Action: Executes hyprctl activewindow -j
and returns the details.
To run the server locally for development:
mcp dev server.py
Ensure that Hyprland is running and the necessary environment variables are set.
MIT License © 2025 Stefano Amorelli
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "hyprland-mcp": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "--with", "subprocess", "mcp", "run", "<global path of the repo>/hyprmcp/hyprmcp/server.py" ], "env": { "PYTHONPATH": "<global path of the repo>/hyprmcp", "HYPRLAND_INSTANCE_SIGNATURE": "<your-hyprland-instance-signature>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.