Skip to main content
Glama
alderban107

hyprland-mcp

by alderban107

mouse_move

Move the mouse cursor to precise screen coordinates using Hyprland's native movecursor for pixel-accurate positioning without acceleration issues.

Instructions

Move the mouse cursor to absolute layout coordinates.

Uses Hyprland's native movecursor — pixel-accurate, no acceleration issues.

Args: x: Target X coordinate y: Target Y coordinate

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYes
yYes

Implementation Reference

  • The MCP tool definition for `mouse_move` in `server.py`, which calls the helper function.
    @mcp.tool()
    async def mouse_move(x: int, y: int) -> str:
        """Move the mouse cursor to absolute layout coordinates.
    
        Uses Hyprland's native movecursor — pixel-accurate, no acceleration issues.
    
        Args:
            x: Target X coordinate
            y: Target Y coordinate
        """
        from . import input as inp
        await inp.move_cursor(x, y)
        return f"Moved cursor to ({x}, {y})"
  • The helper function `move_cursor` in `input.py` that executes the `movecursor` dispatch command via `hyprctl`.
    async def move_cursor(x: int, y: int) -> None:
        """Move cursor to absolute coordinates using Hyprland's native movecursor."""
        await hyprctl.dispatch("movecursor", f"{x} {y}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alderban107/hyprland-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server