by stefanoamorelli
hyprmcp is a lightweight, unofficial Model Context Protocol (MCP) server that exposes the full functionality of hyprctl to large language models. It enables natural language interfaces to interact with and control Hyprland's window management, layouts, and inputs.
hyprmcp is a lightweight, unofficial Model Context Protocol (MCP) server designed to expose the full functionality of hyprctl
(the command-line interface for the Hyprland Wayland compositor) to large language models. This enables natural language interfaces to interact with and control Hyprland's window management, layouts, inputs, and more.
To use hyprmcp, you first need to clone the repository and obtain your HYPRLAND_INSTANCE_SIGNATURE
. Then, you install the server within your MCP client (e.g., Claude Desktop) by modifying its configuration file to include the hyprmcp
server with the correct command, arguments, and environment variables, including the PYTHONPATH
and your HYPRLAND_INSTANCE_SIGNATURE
.
hyprctl
Integration: Exposes all hyprctl
functionalities to language models.run_hyprctl_command
: Executes arbitrary hyprctl
commands.get_version
: Retrieves Hyprland version and build info.list_monitors
: Lists connected monitors.list_workspaces
: Lists active workspaces.list_clients
: Lists windows and their properties.list_devices
: Lists connected input devices.get_active_window
: Shows active window details.list_layers
: Displays compositor layers.get_splash
: Retrieves the current random splash message.dispatch_command
: Dispatches commands 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 for terminating windows by click.Q: Is hyprmcp stable? A: The project is currently experimental and in beta.
Q: What are the prerequisites for running hyprmcp?
A: You need Hyprland running and the necessary environment variables set, including HYPRLAND_INSTANCE_SIGNATURE
.
Q: Can I use hyprmcp with any MCP client? A: While the example shows Claude Desktop, it is designed to work with any MCP client that can integrate with external servers and set environment variables.
Q: How do I develop for hyprmcp?
A: You can run the server locally for development using mcp dev server.py
.
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
Reviews feature coming soon
Stay tuned for community discussions and feedback