关于 Mcp Interactive
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
工具
1收录的工具列表 · 更新于 3 周前
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| projectName | string | 是 | 标识发起请求的上下文/项目 |
| message | string | 是 | 向用户提出的具体问题。支持 Markdown 格式。 |
| predefinedOptions | array | 否 | 供用户选择的预设选项(可选) |
详细介绍
MCP Interactive
一个带有 Electron 界面的交互式 MCP(Model Context Protocol)服务,用于与用户互动。
主要功能
此 MCP 服务可增强大模型的协作能力,提供更高的控制力和可预测性,并通过减少单个任务中的用户交互,显著降低计费请求数量。
如需了解详细的变更历史,请参阅更新日志。
演示

兼容性
- 已测试并确认:
- Trae IDE
- Claude for Mac
- augment code
- Cursor IDE
- 带有 Copilot 的 VSCode
可用工具
ask_user - 通过弹出式命令提示窗口向用户提问,并等待用户交互回复。
输入架构:
{
"type": "object",
"properties": {
"projectName": {
"type": "string",
"description": "Identifies the context/project making the request"
},
"message": {
"type": "string",
"description": "The specific question for the user. Supports Markdown formatting."
},
"predefinedOptions": {
"type": "array",
"items": {
"type": "string"
},
"description": "Predefined options for the user to choose from (optional)"
}
},
"required": [
"projectName",
"message"
]
}
安装
使用 npx
{
"mcpServers": {
"interactive": {
"command": "npx",
"args": [
"mcp-interactive",
"-t",
"300"
]
}
}
}
本地安装
安装依赖:
npm install
配置 MCP 服务:
{
"mcpServers": {
"interactive": {
"command": "node",
"args": [
"/path/to/project/mcp-interactive/index.js",
"-t",
"300"
]
}
}
}
Visual Studio Code、Cursor IDE 的系统提示词建议
## Decision Making
- **Ambiguous tasks**: ALWAYS clarify using `mcp_interactive_ask_user` tool
- **Requires decisions**: ALWAYS clarify using `mcp_interactive_ask_user` tool
## Code Development
- **Final confirmation**: MUST ask user if all requirements from specification are completed using `mcp_interactive_ask_user` tool with work report
## Final gate
- Before ANY final answer (after actions/edits/checks), it is **MANDATORY** to call `mcp_interactive_ask_user` with a report on the work done and the option ["Yes, everything is OK"].
- If the answer is not "Yes, everything is OK" — continue working until the comments are resolved and repeat every time `mcp_interactive_ask_user`.
- There are no exceptions (including minor edits).
Visual Studio Code 聊天中的“人在回路中”模式示例
Can you check the docs and explain how the project works? #interactive
Trae IDE 的系统提示词建议
本节介绍系统提示词或规则的推荐准则,以确保大模型实现最佳交互和任务执行效果。
## Decision Making
- **Ambiguous tasks**: ALWAYS clarify using `ask_user` tool via MCP
- **Requires decisions**: ALWAYS clarify using `ask_user` tool via MCP
## Code Development
- **Final confirmation**: MUST ask user if all requirements from specification are completed using `ask_user` tool via MCP with work report
## Final gate
- Before ANY final answer (after actions/edits/checks), it is **MANDATORY** to call `ask_user` with a report on the work done and the option ["Yes, everything is OK"].
- If the answer is not "Yes, everything is OK" — continue working until the comments are resolved and repeat every time `ask_user`.
- There are no exceptions (including minor edits).
命令行选项
--timeout或-t(秒):指定等待用户响应对话框的时间。如果在此期间没有收到响应,将发送回复“用户未回复:发生超时。”
故障排除
常见问题
Electron 未启动:
- 确保已安装当前版本的 Node.js
- 尝试运行
npm install重新安装依赖
答案超时问题(进度条):
- 使用
-t参数增大超时时间 - 默认超时时间为 60 秒,可按需调整
贡献
欢迎贡献!欢迎提交 Pull Request。对于重大变更,请先提出 issue,讨论你希望进行的更改。
请确保适当更新测试,并遵循现有代码风格。
支持
如果遇到问题或有疑问,请在 GitHub 上提出 issue。
依赖项
本项目包含一份本地的 marked.js 副本(marked.min.js),用于解析 Markdown。Marked 采用 MIT 许可证,并由 Marked.js 团队及贡献者维护。
许可证
MIT
第三方许可证
- marked.js:MIT 许可证 - 版权所有 (c) 2018+,MarkedJS 贡献者
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。