咨询用户MCP
MCP(模型上下文协议)服务器的本地对话系统。 macOS和Windows。
在您的AI代理自主运行时继续工作。当它需要您的输入时,会出现一个本地对话框——回答问题,代理继续。不需要看终端。如果你很忙,请暂停,或者发送反馈以重定向代理。
快速安装
macOS:
curl -sSL https://raw.githubusercontent.com/doublej/consult-user-mcp/main/install.sh | bash窗户: 从下载安装程序 发布 并运行它。首次运行向导会自动配置Claude代码。
目录
- macOS卸载程序 - Windows卸载程序
安装
macOS
快速安装:
curl -sSL https://raw.githubusercontent.com/doublej/consult-user-mcp/main/install.sh | bash手动安装:
- 下载 咨询用户MCP.app.zip 从 发布 (寻找
macos/vX.Y.Z) - 解压缩并拖动到
/Applications - 删除隔离标志(非公证应用程序需要):
xattr -cr "/Applications/Consult User MCP.app"- 启动应用程序-出现菜单栏图标
- 单击菜单栏图标并使用 安装Claude代码 自动配置MCP服务器
视窗
- 从下载安装程序 发布 (寻找
windows/vX.Y.Z) - 运行安装程序-它会自动配置所有内容
- 系统托盘应用程序在启动时启动
第一次运行向导会自动配置Claude Code。设置、贪睡状态和历史记录存储在 %APPDATA%\ConsultUserMCP\.
仅限MCP服务器
如果你不想要托盘应用程序,你可以独立运行MCP服务器:
git clone https://github.com/doublej/consult-user-mcp.git
cd consult-user-mcp/mcp-server
bun install && bun run build添加到MCP配置中:
{
"mcpServers": {
"consult-user-mcp": {
"command": "node",
"args": ["/path/to/consult-user-mcp/mcp-server/dist/index.js"]
}
}
}卸载
macOS卸载程序
curl -sSL https://raw.githubusercontent.com/doublej/consult-user-mcp/main/uninstall.sh | bash可选标志:
--keep-data保持~/Library/Application Support/ConsultUserMCP和~/.config/consult-user-mcp/projects.json--dry-run打印计划更改而不修改文件
Windows卸载程序
您可以从以下位置卸载 已安装的应用程序 在Windows设置中。
要进行完全清理(MCP条目+基本提示块+应用程序文件),请运行:
powershell -ExecutionPolicy Bypass -File .\uninstall.ps1可选标志:
-KeepData保持%APPDATA%\ConsultUserMCP和%USERPROFILE%\.config\consult-user-mcp\projects.json-DryRun打印计划更改而不修改文件
从源代码构建
macOS:
bun install
bun run build:bundle # Builds and installs to /Applications窗户: 看 CLAUDE.md Windows构建说明(需要.NET SDK 8.0和Velopack)。
结构
consult-user-mcp/
├── mcp-server/ # MCP server (TypeScript, cross-platform)
├── dialog-cli/ # macOS: Swift CLI for dialogs
├── sketch-cli/ # macOS: Swift CLI for layout editor
├── macos-app/ # macOS: SwiftUI menu bar app
├── dialog-cli-windows/ # Windows: WPF CLI for dialogs
├── windows-app/ # Windows: WPF system tray app
├── docs/ # Documentation site (SvelteKit)
└── scripts/ # Build and release scriptsMCP工具
| 工具 | 目的 |
|---|---|
ask | 交互式对话(type: confirm, pick, text,或 form) |
notify | 即发即弃通知 |
tweak | 通过实时文件写入进行实时数值调整 |
超时和Snooze
所有交互式对话框(ask, tweak有一个...,有... 10分钟超时.
打盹: 用户可以暂停对话框1-60分钟。打盹时:
- 退货
{ snoozed: true, remainingSeconds: S } - 所有后续呼叫都会返回相同的结果,直到贪睡结束
- 代理人应
sleep为了remainingSeconds,然后重试
反馈: 用户可以发送文本反馈而不是回答。返回 { feedbackText: "..." } 以便代理调整其方法。
建筑
flowchart TB
subgraph Agent["AI Agent (Claude Code, etc.)"]
A[Tool Call]
end
subgraph MCP["MCP Server (Node.js)"]
B[index.ts]
C{Platform?}
D[SwiftDialogProvider]
E[WindowsDialogProvider]
end
subgraph macOS["macOS"]
F[dialog-cli Swift]
G[SwiftUI Window]
end
subgraph Windows["Windows"]
H[dialog-cli.exe WPF]
I[WPF Window]
end
subgraph User["User Response"]
J[Answer]
K[Snooze]
L[Feedback]
end
A -->|"stdio (JSON-RPC)"| B
B --> C
C -->|"darwin"| D
C -->|"win32"| E
D -->|"execFile"| F
E -->|"execFile"| H
F --> G
H --> I
G --> J & K & L
I --> J & K & L
J & K & L -->|"JSON stdout"| B
B -->|"stdio"| A
style Agent fill:#e1f5fe
style MCP fill:#fff3e0
style macOS fill:#f3e5f5
style Windows fill:#e3f2fd
style User fill:#e8f5e9流动
- 代理呼叫工具 -Claude Code(或任何MCP客户端)调用
ask,notify,或tweak - MCP服务器接收 -TypeScript服务器使用Zod模式验证输入
- 平台调度 -服务器为当前平台生成本机CLI
- 显示对话框 -出现本机窗口(macOS上的SwiftUI,Windows上的WPF)
- 用户响应 -回答、打盹或反馈
- 返回结果 -JSON通过CLI返回→ MCP服务器→ Agent
