关于 Hotkeyless Ahk Mcp
Hotkeyless Ahk Mcp 是 TypeScript MCP 服务及可复用的 Agent 技能文档,通过 Hotkeyless AHK HTTP API 控制计算机。项目还提供命令访问配置和桌面自动化示例。
主要功能
- 01封装 Hotkeyless AHK HTTP API
- 02可复用的 Agent 技能文档
- 03缓存命令列表
- 04可配置命令黑名单
- 05桌面自动化示例
适用场景
- 01让 Agent 调用配置好的热键
- 02阻止调用指定命令
- 03在 OpenCode 或 Claude 中使用技能指南
MCP 相关
MCP 服务将 Hotkeyless AHK API 命令提供给 MCP 客户端,通过 `/list` 获取命令,并经由 `/send` 触发命令。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
mcp.json · 通用配置
启动命令
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+)。各客户端的配置文件位置不同,请参考客户端文档。
工具
4收录的工具列表 · 更新于 3 周前
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| refresh | boolean | 否 | 设为 true 可绕过缓存并强制发起新的 /list 请求。 |
详细介绍
Hotkeyless AHK MCP 和技能
此仓库提供:
- 一个封装 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
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_URL | Hotkeyless AHK 服务的地址 | http://localhost:42800 |
| TIMEOUT_MS | 每个请求的超时时间(毫秒) | 4000 |
| BLACKLIST | 要避免调用的命令列表 | [] |
| CACHE_TTL_MS | 命令列表缓存时长(毫秒) | 5000 |
| ENDPOINT_LIST | 命令列表的端点地址 | /list |
| ENDPOINT_TRIGGER | 调用命令的端点地址 | /send |
Agent 技能
快速开始
OpenCode
- 将
./skills/.opencode/...文件夹复制到
.opencode/skills,用于项目专属技能配置%USERPROFILE%/.config/opencode/skills,用于全局配置
- 你可以调整 AGENTS.md、自定义子 Agent 或自定义命令,以引用这些技能
- 重启 OpenCode(CLI 或桌面版)
- 要求 Agent 使用“hotkeyless AHK skills”时,它现在应该会使用技能指南
ClaudeCode
- 将
./skills/.claude/...文件夹复制到
.claude/skills,用于项目专属技能配置%USERPROFILE%/.config/claude-code/skills,用于全局配置
- 你可以调整 CLAUDE.md、自定义子 Agent 或自定义命令,以引用这些技能
- 重启 Claude Code
- 要求 Agent 使用“hotkeyless AHK skills”时,它现在应该会使用技能指南
Github Copilot
- 将
./skills/.claude/...文件夹复制到
.claude/skills,用于项目专属技能配置%USERPROFILE%/.config/claude-code/skills,用于全局配置
- 你可以调整 AGENTS.md、自定义子 Agent 或自定义命令,以引用这些技能
- 重启 Claude Code
- 要求 Agent 使用“hotkeyless AHK skills”时,它现在应该会使用技能指南
许可证
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。