mcpField
H
Hotkeyless Ahk Mcp

Hotkeyless Ahk Mcp

本地服务
github.com/tim0-12432生产力211 周前更新

关于 Hotkeyless Ahk Mcp

Hotkeyless Ahk Mcp 是 TypeScript MCP 服务及可复用的 Agent 技能文档,通过 Hotkeyless AHK HTTP API 控制计算机。项目还提供命令访问配置和桌面自动化示例。

主要功能

  1. 01封装 Hotkeyless AHK HTTP API
  2. 02可复用的 Agent 技能文档
  3. 03缓存命令列表
  4. 04可配置命令黑名单
  5. 05桌面自动化示例

适用场景

  1. 01让 Agent 调用配置好的热键
  2. 02阻止调用指定命令
  3. 03在 OpenCode 或 Claude 中使用技能指南

MCP 相关

MCP 服务将 Hotkeyless AHK API 命令提供给 MCP 客户端,通过 `/list` 获取命令,并经由 `/send` 触发命令。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"HotkeylessAHK-mcp-skill": {
"command": "npx",
"args": [
"-y",
"@tim0_12432/hotkeyless-ahk-mcp-server"
],
"env": {
"BASE_URL": "<BASE_URL>",
"TIMEOUT_MS": "<TIMEOUT_MS>",
"BLACKLIST": "<BLACKLIST>",
"CACHE_TTL_MS": "<CACHE_TTL_MS>",
"ENDPOINT_LIST": "<ENDPOINT_LIST>",
"ENDPOINT_TRIGGER": "<ENDPOINT_TRIGGER>"
}
}
}
}
启动命令npx -y @tim0_12432/hotkeyless-ahk-mcp-server
需要配置的环境变量
BASE_URLThe base URL of the Hotkeyless AHK HTTP server.
TIMEOUT_MSThe timeout in milliseconds for requests to the server.
BLACKLISTA comma-separated list of blacklisted commands.
CACHE_TTL_MSThe time-to-live in milliseconds for cached responses.
ENDPOINT_LISTThe default endpoint path for listing commands.
ENDPOINT_TRIGGERThe default endpoint path for triggering commands.

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@tim0_12432/hotkeyless-ahk-mcp-server1.0.8

工具

4

收录的工具列表 · 更新于 3 周前

参数类型必填说明
refreshboolean否设为 true 可绕过缓存并强制发起新的 /list 请求。

详细介绍

Hotkeyless AHK MCP 和技能

License: MIT AHK Version MCP Claude Support OpenCode Support Github Copilot Support

此仓库提供:

  • 一个封装 Hotkeyless AHK HTTP API 的 TypeScript MCP 服务。
  • 适用于 OpenCode、Claude 和通用 Agent 运行时的可复用技能文档。
  • 桌面自动化场景的实用示例。

工作区布局

packages/
  mcp-server/   # Node MCP server package
  skills/       # Agent skill documents
examples/       # End-to-end usage examples

  1. MCP 服务
  1. Agent 技能

MCP 服务

快速开始
OpenCode

opencode.json:

{
  ...
  "mcp": {
    ...
    "hotkeyless-ahk": {
      "type": "local",
      "command": ["npx", "-y", "@tim0_12432/hotkeyless-ahk-mcp-server"],
      "enabled": true,
      "environment": {
          "BLACKLIST": "shutdown,restart,kill"
          ...
      }
    }
  },
  ...
}
ClaudeCode

.mcp.json:

{
  "mcpServers": {
    ...
    "hotkeyless-ahk": {
      "command": "npx",
      "args": ["-y", "@tim0_12432/hotkeyless-ahk-mcp-server"],
      "env": {
        "BLACKLIST": "shutdown,restart,kill"
        ...
      }
    }
  }
}
Github Copilot

mcp-config.json:

{
  ...
  "mcpServers": {
    ...
    "hotkeyless-ahk": {
      "type": "local",
      "command": "npx",
      "args": ["-y", "@tim0_12432/hotkeyless-ahk-mcp-server"],
      "env": {
        "BLACKLIST": "shutdown,restart,kill"
          ...
      },
      "tools": ["*"]
    }
  },
  ...
}
从源代码构建
请按照此处的说明操作。
1. 构建服务
bun install
bun run build

使用 npm 也应该没有问题!

2. 设置你的运行环境
OpenCode

opencode.json:

{
  ...
  "mcp": {
    ...
    "hotkeyless-ahk": {
      "type": "local",
      "command": ["node", "<absolute path to the built files>/mcp-server/dist/index.js"],
      "enabled": true,
      "environment": {
          "BLACKLIST": "shutdown,restart,kill"
          ...
      }
    }
  },
  ...
}
ClaudeCode

.mcp.json:

{
  "mcpServers": {
    ...
    "hotkeyless-ahk": {
      "command": "node",
      "args": ["<absolute path to the built files>/mcp-server/dist/index.js"],
      "env": {
        "BLACKLIST": "shutdown,restart,kill"
        ...
      }
    }
  }
}
Github Copilot

mcp-config.json:

{
  ...
  "mcpServers": {
    ...
    "hotkeyless-ahk": {
      "type": "local",
      "command": "node",
      "args": ["<absolute path to the built files>/mcp-server/dist/index.js"],
      "env": {
        "BLACKLIST": "shutdown,restart,kill"
          ...
      },
      "tools": ["*"]
    }
  },
  ...
}
Hotkeyless AHK API 契约
  • GET /list 返回 { command: string, note: string } 的 JSON 数组
  • GET /send/<command> 接受查询参数
配置

默认配置位于 mcp-server/dist/infrastructure/config/config.ts。

环境变量覆盖项:

参数覆盖项作用默认值
BASE_URLHotkeyless AHK 服务的地址http://localhost:42800
TIMEOUT_MS每个请求的超时时间(毫秒)4000
BLACKLIST要避免调用的命令列表[]
CACHE_TTL_MS命令列表缓存时长(毫秒)5000
ENDPOINT_LIST命令列表的端点地址/list
ENDPOINT_TRIGGER调用命令的端点地址/send

Agent 技能

快速开始
OpenCode
  1. 将 ./skills/.opencode/... 文件夹复制到
  • .opencode/skills,用于项目专属技能配置
  • %USERPROFILE%/.config/opencode/skills,用于全局配置
  1. 你可以调整 AGENTS.md、自定义子 Agent 或自定义命令,以引用这些技能
  2. 重启 OpenCode(CLI 或桌面版)
  3. 要求 Agent 使用“hotkeyless AHK skills”时,它现在应该会使用技能指南
ClaudeCode
  1. 将 ./skills/.claude/... 文件夹复制到
  • .claude/skills,用于项目专属技能配置
  • %USERPROFILE%/.config/claude-code/skills,用于全局配置
  1. 你可以调整 CLAUDE.md、自定义子 Agent 或自定义命令,以引用这些技能
  2. 重启 Claude Code
  3. 要求 Agent 使用“hotkeyless AHK skills”时,它现在应该会使用技能指南
Github Copilot
  1. 将 ./skills/.claude/... 文件夹复制到
  • .claude/skills,用于项目专属技能配置
  • %USERPROFILE%/.config/claude-code/skills,用于全局配置
  1. 你可以调整 AGENTS.md、自定义子 Agent 或自定义命令,以引用这些技能
  2. 重启 Claude Code
  3. 要求 Agent 使用“hotkeyless AHK skills”时,它现在应该会使用技能指南

许可证

MIT

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。