MCP ExplorerExplorer

Ahk Mcp

@TrueCrimeAuditon 10 months ago
1 MIT
FreeCommunity
AI Systems
AutoHotkey MCP Server for code analysis and documentation tools.

Overview

What is Ahk Mcp

ahk-mcp is an AutoHotkey MCP Server designed for code analysis and documentation tools, specifically tailored for use with Claude AI.

Use cases

Use cases for ahk-mcp include analyzing AutoHotkey scripts for errors, improving code quality, finding relevant built-in variables, and obtaining detailed information about functions and classes.

How to use

To use ahk-mcp, clone the repository, install dependencies with ‘npm install’, build the server using ‘npm run build’, and start the server with ‘npm start’ or the batch file. Configure Claude to point to the server by editing the appropriate settings files.

Key features

Key features of ahk-mcp include code analysis for AutoHotkey scripts, variable discovery based on user prompts, and retrieval of function and class information.

Where to use

ahk-mcp can be used in software development environments where AutoHotkey is utilized, particularly for automating tasks and scripting.

Content

AutoHotkey MCP Server

This Model Context Protocol (MCP) server provides AutoHotkey v2 code analysis and documentation tools for Claude AI.

Getting Started

Prerequisites

  • Node.js (v16 or newer)
  • npm

Installation

  1. Clone this repository
  2. Install dependencies:
npm install

Building the Server

Build the TypeScript sources:

npm run build

This will:

  • Compile TypeScript to JavaScript
  • Copy required data files to the output directory

Starting the Server

You can start the server using one of the following methods:

Using npm script:

npm start

Using the batch file:

start-mcp-server.bat

Configuring Claude to Use This Server

To use this MCP server with Claude:

  1. Ensure the MCP settings file points to the correct location:

    • For Claude Desktop: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
    • For Claude VS Code Extension: Edit %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  2. Add the server configuration:

{
  "mcpServers": {
    "ahk-server": {
      "autoApprove": [
        "analyze_code",
        "find_variables",
        "get_function_info",
        "get_class_info"
      ],
      "disabled": false,
      "timeout": 60,
      "command": "node",
      "args": [
        "C:\\Users\\USERNAME\\OneDrive\\Documents\\Cline\\MCP\\ahk-server\\dist\\index.js"
      ],
      "transportType": "stdio"
    }
  }
}

Available Tools

The ahk-server provides the following tools:

1. analyze_code

Analyzes AutoHotkey code for issues and suggests improvements.

Parameters:
- code: The AutoHotkey code to analyze
- fix (optional, boolean): Whether to automatically fix issues when possible

2. find_variables

Finds relevant built-in variables based on a prompt.

Parameters:
- prompt: User prompt to analyze for relevant variables

3. get_function_info

Gets information about AutoHotkey functions.

Parameters:
- name: Exact function name to look up, OR
- search: Search term to find relevant functions

4. get_class_info

Gets information about AutoHotkey classes and methods.

Parameters:
- name: Exact class name to look up (e.g. "Gui"), OR
- method: Specific method to look up within a class, OR
- search: Search term to find relevant classes or methods

Troubleshooting

If the server fails to start:

  1. Ensure all dependencies are installed
  2. Run npm run build to compile TypeScript and copy data files
  3. Check that the data directory is properly copied to dist/data
  4. Verify the MCP settings file points to the correct path

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers