mcpField
H
Hyprland MCP Server

Hyprland MCP Server

Local
github.com/stefanoamorelliOther35Updated 78w ago

About Hyprland MCP Server

Hyprland MCP Server is an unofficial, lightweight MCP server that exposes the hyprctl command line tool of the Hyprland Wayland compositor to language models. It suits Hyprland users who want to manage windows, workspaces and inputs in natural language. The project is experimental and in beta.

Key features

  1. 01Run arbitrary hyprctl commands
  2. 02Query monitors, workspaces, windows and input devices
  3. 03Switch workspaces and dispatch window actions
  4. 04Set configuration keywords and reload config
  5. 05Kill mode to close windows by clicking

Use cases

  1. 01Switching to a specific workspace by natural language request
  2. 02Checking details of the currently active window
  3. 03Adjusting Hyprland settings with help from a language model

MCP support

The server wraps hyprctl functions as MCP tools such as run_hyprctl_command and list_clients for MCP clients to call.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Hyprland MCP Server

License: MIT Python 3.10+ Platform Build Status MCP Server

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.

🚀 Quick Start

1. Clone the repository
git clone https://github.com/stefanoamorelli/hyprmcp.git
cd hyprmcp
2. Grab your HYPRLAND_INSTANCE_SIGNATURE
echo $HYPRLAND_INSTANCE_SIGNATURE
3. Install the server in your MCP client

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>"
  }
},

🧰 Available Tools

Tool NameDescription
run_hyprctl_commandExecutes arbitrary hyprctl commands.
get_versionRetrieves the Hyprland version and build info.
list_monitorsLists all connected monitors and properties.
list_workspacesLists all active workspaces.
list_clientsLists all windows and their properties.
list_devicesLists all connected input devices.
get_active_windowShows the currently active window details.
list_layersDisplays all layers in the compositor.
get_splashRetrieves the current random splash message.
dispatch_commandDispatches a command to Hyprland.
set_keywordDynamically sets a configuration keyword.
reload_configForces a reload of the Hyprland config file.
enter_kill_modeEnables kill mode to terminate windows by click.

These tools allow language models to interact with Hyprland's features seamlessly.

💡 Example Usage

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.

🛠️ Development

To run the server locally for development:

mcp dev server.py

Ensure that Hyprland is running and the necessary environment variables are set.

📚 References

📜 License

MIT License © 2025 Stefano Amorelli

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.