ahk-mcp
A TypeScript MCP server that provides 25+ tools for AutoHotkey v2 development, including file handling, script analysis, execution, debugging, documentation search, and configuration.
File Operations: List, view, edit, create, detect, and manage active files with advanced editors, batch edits, and backups.
Script Analysis & Linting: Analyze code, diagnose issues, lint with auto-fix, and get LSP-style analysis and symbols.
Execution & Validation: Run scripts with process tracking, validate code locally, and watch files for auto-validation.
Debugging: Start DBGp/TCP debuggers, step through code, capture errors, set breakpoints, and inspect variables.
Documentation & Context: Search AutoHotkey v2 docs, find tool definitions, and inject relevant context into prompts.
Library Management: Search, list, get info, and generate #Include statements for AutoHotkey libraries.
Workflow Automation: Chain operations (analyze→fix→run), process user requests, and use smart orchestration with caching.
Configuration & Settings: Set AutoHotkey path, script directories, enable/disable features, and view analytics.
Transports: Supports stdio, Streamable HTTP (stateful/stateless), and legacy SSE with optional auth and DNS-rebinding protection.
Provides comprehensive development tools for AutoHotkey v2, including code completion, syntax diagnostics, script analysis, and contextual documentation for built-in functions, classes, and hotkeys.
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

Related MCP server: Hotkeyless AHK MCP
Highlights
25+
AHK_*tools for AutoHotkey workflowsFocused 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 transports (stateful or stateless), plus legacy SSE endpoints
Opt-in bearer-token auth and DNS-rebinding protection for HTTP mode
Requirements
Node.js 18+
npm
AutoHotkey v2 (for run/validate tools)
Installation
git clone https://github.com/truecrimedev/ahk-mcp.git
cd ahk-mcp
npm install
npm run buildRun
npm startDevelopment mode:
npm run devSmoke test:
npm run smoke:mcpHTTP Mode and Environment Variables
npm start speaks stdio (Claude Desktop). To expose Streamable HTTP on /mcp
(plus legacy SSE endpoints), set PORT or pass --sse:
npm run start:sseBehavior is controlled with environment variables:
Variable | Default | Purpose |
|
| HTTP port; setting it enables HTTP mode |
| off |
|
| unset | When set, every HTTP request must send |
| unset | Comma-separated |
| unset | Comma-separated |
|
| How long finished task records are kept (30 min); |
|
|
|
Security note: the tool surface includes file writes and process execution. If
the HTTP port is reachable by anything other than your own machine, set
AHK_MCP_AUTH_TOKEN (e.g. openssl rand -hex 32) and the two allowlists — by
default the endpoints accept every request.
See docs/MCP_TRANSPORT_COMPATIBILITY.md for the session flow, stateless mode
details, and cURL examples.
Claude Desktop Configuration
Add this to claude_desktop_config.json:
{
"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"
}
}
}
}Use absolute paths and escape backslashes in JSON.
Configure AutoHotkey Path and Startup Behavior
Use AHK_Config to set the executable path and non-blocking startup behavior:
{
"action": "set",
"ahkPath": "C:\\Users\\YourUsername\\Documents\\Design\\Coding\\AutoHotkey\\bin\\AutoHotkey64.exe",
"waitForStdoutLine": true,
"stdoutLineTimeoutMs": 300
}This is used by AHK_Run (and AHK_Cloud_Validate path resolution).
Core Tools
AHK_Smart_Orchestrator: reduce multi-step edit/analysis workflowsAHK_File_List,AHK_File_View,AHK_File_Edit: file operationsAHK_Analyze,AHK_Diagnostics: analysis and diagnosticsAHK_Run: execute scripts (wait, non-wait, window detection)AHK_Cloud_Validate: local execution-based validationAHK_Doc_Search,AHK_Tools_Search: documentation and tool lookupAHK_Config: MCP server configuration
Development Commands
npm run build
npm run clean
npm run lint
npm run test
npm run test:integration
npm run smoke:mcpDocumentation
docs/README.mddocs/QUICK_START.mddocs/QUICKREFERENCE.mddocs/MCP_TRANSPORT_COMPATIBILITY.mddocs/ARCHITECTURE_DIAGRAMS.mddocs/RELEASE_NOTES.md
Contributing
See CONTRIBUTING.md and AGENTS.md.
License
MIT. See LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA comprehensive utility MCP server that enables AI assistants to execute system commands, manage files, integrate with Google Sheets and Tasks, perform AI-powered text processing, and load dynamic prompts from markdown files.MIT
- AlicenseAqualityAmaintenanceMCP server for Hotkeyless AHK HTTP API. It lets your agent control your whole computer using hotkeys.42MIT
- AlicenseNot gradedqualityCmaintenanceLocal MCP server bridging ChatGPT Web to local tools for file, shell, git, test, and process management with secure policy controls.MIT
- AlicenseNot gradedqualityAmaintenanceMCP server for advanced PowerShell integration with AI agents, enabling autonomous script execution, code analysis, and IntelliSense.3MIT
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/TrueCrimeDev/ahk-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server