
User Prompt MCP

2025.04.02
1
GoAI 交互开发工具开发效率
User Prompt MCP 是一个用于 Cursor 的 Model Context Protocol (MCP) 服务器,能够在模型生成过程中请求用户输入。它作为 AI 模型和用户之间的桥梁,提供更交互式的体验。
View on GitHub
Overview
基本能力
产品定位
User Prompt MCP 是一个用于增强 AI 模型交互性的工具,允许在生成过程中动态请求用户输入。
核心功能
- 用户输入提示:允许 AI 在生成过程中请求更多信息。
- 简单 GUI:通过对话框展示输入提示,支持文本换行。
- 跨平台支持:支持 Linux 和 macOS。
- Stdio 传输:通过 stdio 与 Cursor 集成。
适用场景
- 在 AI 生成内容时需要动态获取用户输入的交互式场景。
- 需要增强 AI 模型与用户之间沟通的开发环境。
工具列表
- user-prompt-mcp:主服务程序,提供用户输入提示功能。
常见问题解答
- 如何设置超时时间?
可以通过命令行参数
--timeout
或环境变量USER_PROMPT_TIMEOUT
设置超时时间。
使用教程
使用依赖
- Linux:需要安装
zenity
。 - macOS:内置
osascript
。
安装教程
快速安装(推荐)
# 安装最新版本
curl -sSL https://raw.githubusercontent.com/nazar256/user-prompt-mcp/main/install.sh | bash
# 安装特定版本
curl -sSL https://raw.githubusercontent.com/nazar256/user-prompt-mcp/main/install.sh | bash -s -- -v v1.0.0
从源码安装(需要 Go 1.18+)
go install github.com/nazar256/user-prompt-mcp/cmd/user-prompt-mcp@latest
手动安装
从 Releases 页面 下载预编译的二进制文件。
调试方式
- 在 Cursor 中打开设置。
- 导航到 MCP Servers 部分,通过编辑 JSON 添加新服务器:
{
"mcpServers": {
"prompt": {
"command": "user-prompt-mcp"
}
}
}
- 保存并刷新。
- 添加全局规则,例如:"Important - do not finish responding until explicitly told to do so, instead always use MCP
input_user_prompt
and wait for response in all cases, either you feel stuck, you have question or you finished work on a prompt - always communicate with the user using this MCP."
配置
- 超时配置:
- 命令行参数:
--timeout <seconds>
bash user-prompt-mcp --timeout 600 # 设置超时为 10 分钟
- 环境变量:
USER_PROMPT_TIMEOUT=<seconds>
bash export USER_PROMPT_TIMEOUT=1800 # 设置超时为 30 分钟 user-prompt-mcp