
truecrimedev/ahk-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
AutoHotkey v2 MCP Сервер с подсказками, завершением кода и диагностикой
Обзор
MCP-сервер TypeScript для разработки AutoHotkey v2. Он обеспечивает анализ сценариев, файловые операции, поиск документации и инструменты выполнения сценариев для клиентов MCP, таких как Claude Desktop. - 25+ инструментов AHK * для рабочих процессов AutoHotkey - Фокусированное обнаружение файлов и операции с активными файлами - выполнение сценариев с отслеживанием процессов и обнаружением окон - Местные инструменты проверки и диагностики AutoHotkey - Встроенные доки AutoHotkey и помощники по запросу / контексту - Stdio и потоковые HTTP-перевозки (состоятельные или без состояния), а также устаревшие конечные точки SSE - Opt-in bearer-token auth и DNS-защита для HTTP-режима - Node.js 18+ - npm - AutoHotkey v2 (для инструментов запуска / проверки) Начало npm говорит на stdio (Claude Desktop). Чтобы раскрыть потоковый HTTP на /mcp (плюс устаревшие конечные точки SSE), установите PORT или pass-sse: Поведение контролируется переменными окружающей среды: Примечание по безопасности: поверхность инструмента включает запись файлов и выполнение процесса.
Обзор (машинный перевод)
MCP-сервер TypeScript для разработки AutoHotkey v2. Предоставляет сценарий анализ, файловые операции, поиск документации и инструменты выполнения сценариев для Клиенты MCP, такие как Claude Desktop.
Архитектура
Основные моменты
- 12 основных инструментов по умолчанию, больше в наборах инструментов для выбора (см. Инструменты и наборы инструментов
AHK_Check: одна шашка, использующая собственный AutoHotkey/Validateпри наличииAHK_Navigate: определение, ссылки, переименование и символы через THQBY v2 Языковой сервер- Шесть инструментов только для чтения
uia_*, которые кормят живую истину UI Automation модель, поэтому она пишет правильные селекторы вместо того, чтобы угадывать их - Фокусированное обнаружение файлов и операции с активными файлами Выполнение сценариев с отслеживанием процессов и обнаружением окон
- Местные инструменты проверки и диагностики AutoHotkey Встроенные документы AutoHotkey и помощники по запросу/контексту
- Поддержка потокового HTTP-транспорта с опцией SSE совместимость
##Инспекция МАУ
Написание автоматики МАУ без проверки живого дерева означает угадывание Селекторы. Эти инструменты удаляют догадки:
Они находятся в uia наборе инструментов; включить его AHK_MCP_TOOLSETS=core,uia или
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
AutoHotkey v2 MCP Server
A TypeScript MCP server for AutoHotkey v2 development. It provides script analysis, file operations, documentation search, and script execution tools for MCP clients such as Claude Desktop.
Architecture
Highlights
- 12 core tools by default, more in opt-in toolsets (see Tools and toolsets)
AHK_Check: one checker that uses AutoHotkey’s own/Validatewhen availableAHK_Navigate: definition, references, rename and symbols through THQBY’s v2 language server- Six read-only
uia_*tools that feed live UI Automation ground truth to the model, so it writes correct selectors instead of guessing them - Focused file discovery and active-file aware operations
- Script execution with process tracking and window detection
- Local AutoHotkey validation and diagnostics tools
- Built-in AutoHotkey docs and prompt/context helpers
- Stdio and Streamable HTTP transport support, with opt-in legacy SSE compatibility
UIA inspection
Writing UIA automation without inspecting the live tree means guessing selectors. These tools remove the guesswork:
uia_windows -> uia_tree -> uia_find / uia_element -> paste snippet -> uia_highlight
which what's the exact control into your .ahk confirm it is
window in it + verified selector script the right one
They are in the uia toolset; enable it with AHK_MCP_TOOLSETS=core,uia or
AHK_Settings { "action": "enable_toolset", "toolset": "uia" }.
Every element result carries a paste-ready AHK v2 snippet that has been executed against the live tree and confirmed to resolve back to that exact element. Paths are property chains, not RuntimeIds, so they still work after the target app restarts.
All six tools are strictly read-only — they read properties and pattern availability but never invoke a control pattern, so none of them can press, toggle, select, or delete anything in the target app.
Full reference, including the selector-validation hook and Electron/WebView2
guidance: docs/UIA_INSPECTION.md.
Requirements
- Node.js 20+
- npm
- AutoHotkey v2 (for
AHK_Run,AHK_EvalandAHK_Check’s interpreter engine) - Optional: THQBY’s
AutoHotkey v2 Language Support
VS Code extension, for
AHK_NavigateandAHK_Check’s language-server engine. It is found automatically in the VS Code extensions folder, or setAHK_THQBY_LSP_SERVERto itsserver/dist/server.js
Installation
git clone https://github.com/truecrimedev/ahk-mcp.git
cd ahk-mcp
npm install
npm run build
Run
npm start
Development mode:
npm run dev
Smoke test:
npm run smoke:mcp
npm run smoke:http
npm run test:evals # eval grader tests
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"ahk": {
"command": "C:\\Program Files\\nodejs\\node.exe",
"args": ["C:\\Users\\YourUsername\\path\\to\\ahk-mcp\\dist\\index.js"],
"env": {
"NODE_ENV": "production",
"AHK_MCP_LOG_LEVEL": "warn",
"AHK_MCP_TOOLSETS": "core",
"AHK_MCP_SCRIPT_DIR": "C:\\Users\\YourUsername\\Documents\\AutoHotkey"
}
}
}
}