
Hyprctl 社区 MCP 服务器
概览
https://github.com/user-attachments/assets/b4fc1d26-ec04-451a-b7c9-7f87b44d9c9e 一个轻量级、非官方的模型上下文协议(MCP)服务器,向语言模型展示了 hyprctl——Hyprland Wayland 合成器的命令行界面——的所有功能。 该服务器支持自然语言接口,查询和控制 Hyprland 的窗口管理、布局、输入等功能。 该项目处于实验阶段,处于测试阶段。 例如,在 Claude Desktop 中,修改 ~/.config/Claude/claude_desktop_config.json 文件如下: 这些工具使语言模型能够无缝地与Hyprland的功能交互。 执行 hyprctl activewindow -j 并返回详细信息。 要在本地运行服务器进行开发:
概述(AI 翻译)
https://github.com/user-attachments/assets/b4fc1d26-ec04-451a-b7c9-7f87b44d9c9e
一个轻量级、非官方的模型上下文协议(MCP)服务器,向语言模型展示了 hyprctl——Hyprland Wayland 合成器的命令行界面——的所有功能。
该服务器支持自然语言接口,查询和控制 Hyprland 的窗口管理、布局、输入等功能。
注: 该项目处于实验阶段,处于测试阶段。
🚀 快速启动
1.克隆仓库
2.拿起你的HYPRLAND_INSTANCE_SIGNATURE
3.把服务器安装在你的MCP客户端里
例如,在 Claude Desktop 中,修改 ~/.config/Claude/claude_desktop_config.json 文件如下:
🧰 可用工具
| 工具名称 | 说明 |
|---|---|
run_hyprctl_command |
执行任意的hyprctl命令。 |
get_version |
检索Hyprland版本及建造信息。 |
list_monitors |
列出所有连接的显示器和属性。 |
list_workspaces |
列出所有活跃的工作区。 |
list_clients |
列出所有窗口及其属性。 |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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",
"/hyprmcp/hyprmcp/server.py"
],
"env": {
"PYTHONPATH": "/hyprmcp",
"HYPRLAND_INSTANCE_SIGNATURE": ""
}
},
🧰 Available Tools
| 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.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →