home / mcp / hyprland mcp server
Provides MCP access to Hyprland via an API that exposes hyprctl-like commands for querying and controlling windows, layouts, and inputs.
Configuration
View docs{
"mcpServers": {
"stefanoamorelli-hyprmcp": {
"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>"
}
}
}
}You can control Hyprland from language models via a lightweight MCP server that exposes the full functionality of the Hyprctl command-line interface. This lets you query window layouts, workspaces, inputs, and other Hyprland features through natural language interactions, enabling automation and smarter UI management.
You connect to the Hyprland MCP Server from your MCP client and use the available tools to query state, switch workspaces, list windows, or dispatch commands to Hyprland. Start by ensuring Hyprland is running and the server is accessible through your MCP client configuration. Then issue natural language prompts that map to the provided tools, such as asking for the current active window, switching to a specific workspace, or querying monitor layouts.
Prerequisites: Ensure you have a compatible MCP client and a Python environment ready. The server runs as a standalone Python process and relies on a local command interface to Hyprland.
"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>"
}
},The server exposes a set of tools that you can invoke from your MCP client to interact with Hyprland. Ensure you provide the HYPRLAND_INSTANCE_SIGNATURE environment variable so the server can communicate with your Hyprland instance. If you modify your local setup, update the PATH or PYTHONPATH accordingly to ensure the server can locate its Python modules.
Executes arbitrary hyprctl commands via the MCP server.
Retrieves Hyprland version and build info.
Lists all connected monitors and properties.
Lists all active workspaces.
Lists all windows and their properties.
Lists all connected input devices.
Shows details of the currently active window.
Displays all layers in the compositor.
Retrieves the current random splash message.
Dispatches a command to Hyprland.
Dynamically sets a configuration keyword.
Forces a reload of the Hyprland config file.
Enables kill mode to terminate windows by click.