About ahk-mcp
ahk-mcp is an MCP server that exposes AutoHotkey functions as tools for AI models to automate tasks on Windows. It is aimed at assistants that need to operate desktop applications, with screen OCR as a fallback when window text is not exposed.
Key features
- 01Enumerates windows and applications
- 02Controls keyboard and mouse input
- 03Reads window text and control positions via Windows APIs
- 04Screen capture with OCR
- 05Reports monitor and window position information
Use cases
- 01Letting an AI assistant read window text not exposed by standard controls
- 02Automating clicks and typing in Windows applications
- 03Locating and arranging windows across multiple monitors
MCP support
This project is an MCP server that exposes 33 tools to MCP clients, covering window management, input control, screen capture and OCR.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEahk-mcp
MCP server exposing AutoHotkey functionality, enabling model interfaces to automation tasks on Windows.
This server only works on Windows and provides the following tools to your AI:
- Ability to enumerate windows/applications
- Ability to control keyboard/mouse (typing, clicking, etc)
- Ability to interrogate Windows APIs (via AutoHotkey) about windows (e.g., to get the text of a window, the position of its GUI controls, etc.)
- Screen capture & OCR functionality (useful when text is not exposed properly by Windows APIs/controls)
- Ability to get accurate window positioning and contextual information about computer monitors (e.g., know what windows are on your primary/secondary monitors)
- Ability to manipulate windows and other actions via AutoHotkey
In total, there are 33 tools currently exposed by the server, the above is just a simple overview.
While we work on documentation, exploring the source code in main.py is encouraged!
Usage
This project makes use of the Python MCP SDK with FastMCP. Please see the Python MCP SDK repo and documentation for detailed information.
Assuming you've already setup mcp CLI, you can install this MCP service in Claude Desktop with a simple mcp command:
mcp install main.py
This project depends on ahk-binary to provide the required AutoHotkey executables and the ahk
project to interface with AutoHotkey. It uses mss, easyocr, and numpy
for OCR functionality.
Contributing
The best way to contribute is right here on GitHub. Please feel free to open an issue to get started. Pull requests are also welcome, but it is strongly recommended to open an issue first, especially for significant changes.
Comments
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.