
User Prompt
io.github.Jacob-J-Thomas由 GitHub 账号 Jacob-J-Thomas 发布v1.0.2更新于 Oct 24, 2026
An MCP server that enables AI agents to ask users clarifying questions via pop-up terminal windows.
概览
让 AI 代理在任务中途通过弹出的终端窗口向用户提出澄清问题,并取回用户输入的答案。
- 可以做什么
- 只暴露一个工具 user_prompt,代理可在执行过程中随时调用。服务器会打开一个新的终端窗口,显示代理给出的提问原因和编号问题列表,然后把用户输入的答案以问答对形式返回给代理。支持一次提出多个问题、10 分钟应答时限,以及用户未作答就关闭窗口的检测,此时代理会收到一条回退提示。
- 适用场景
- 适合长时间运行或代理式的工作流:当遇到需求含糊、意外错误或存在多种可行方案的设计决策时,代理原本只能猜测或停下等待。它让代理无需离开自身的输入输出通道就能请求人工输入。
- 运行要求
- 通过 stdio 在本地运行,由 MCP 客户端启动该进程。Windows 需要 PowerShell 5.1+(Windows 10/11 自带);macOS 和 Linux 未经测试,需要安装 PowerShell Core(pwsh)。预编译版本没有其他依赖;.NET 全局工具和源码构建需要 .NET 8.0 SDK 或更高版本。未声明任何账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 User Prompt,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
User Prompt MCP Server
mcp-name: io.github.Jacob-J-Thomas/user-prompt
A Model Context Protocol (MCP) server that gives AI agents the ability to ask users clarifying questions mid-task via a pop-up terminal window. Built with .NET 8 and C#.
The Problem
Long-running AI agents (like Claude Code, IDE copilots, or custom agentic workflows) often encounter situations where they need human input — ambiguous requirements, unexpected errors, or design decisions that could go multiple ways. Without a mechanism to ask, the agent either guesses (often incorrectly) or stops entirely and waits for the user to notice.
The Solution
This MCP server exposes a single tool, user_prompt, that an AI agent can call at any point during execution. When invoked, a new terminal window opens on the user's machine displaying the agent's questions. The user types their answers and the responses are returned directly to the agent, allowing it to continue working with the additional context.
Features
- Pop-up terminal prompt — questions appear in a dedicated window, separate from the agent's own I/O
- Multi-question support — the agent can ask multiple questions in a single call; all are displayed upfront as a numbered list
- Structured responses — answers are returned as clearly formatted Q&A pairs the agent can parse
- Timeout handling — 10-minute response window with graceful fallback messaging
- Window-closed detection — if the user closes the prompt without answering, the agent receives a clear notification
- Stdio transport — communicates over stdin/stdout per the MCP specification, compatible with any MCP client
Prerequisites
- Windows: PowerShell 5.1+ (included with Windows 10/11)
- macOS/Linux (untested): PowerShell Core (
pwsh) must be installed
Note: Pre-built releases have no other dependencies. The .NET Global Tool and Build from Source options require the .NET 8.0 SDK or later.
Quick Start
Pick one of the three install options below. Each option walks you through installation, client configuration, and updates end-to-end.
Option A: GitHub Releases
Self-contained executables — no .NET SDK required.
1. Download
Grab the zip for your platform from the latest release:
2. Extract
Unzip to a permanent location, for example:
- Windows:
C:\Tools\UserPromptMcpServer\ - macOS / Linux:
~/tools/UserPromptMcpServer/
3. Configure your MCP client
Claude Code (CLI):
Other clients — point the command at the executable (see Client Configuration Reference for full examples):
Updating: download the new release and replace the files in the same folder.
Option B: .NET Global Tool
Requires the .NET 8.0 SDK or later. The tool is added to your PATH automatically.
1. Install
2. Configure your MCP client
Claude Code (CLI):
Other clients — the command name is user-prompt (see Client Configuration Reference for full examples):
Updating:
Option C: Build from Source
Requires the .NET 8.0 SDK or later.
Replace
win-x64with your platform's runtime identifier (e.g.osx-arm64,linux-x64).
Then configure your client the same way as Option A, pointing at the executable inside ./publish/.
Client Configuration Reference
This server uses the stdio transport — it does not listen on a port. The MCP client launches the server process and communicates with it over stdin/stdout. Replace the command/path below with the value from whichever install option you chose.
Claude Desktop
Add the following to your claude_desktop_config.json:
Config file location:
Cursor
Add the following to .cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global):
OpenAI Codex CLI
Add the following to ~/.codex/config.toml (global) or .codex/config.toml (project-level):
Or via the CLI:
Other MCP Clients
Any MCP client that supports the stdio transport can launch this server. Point it at the executable (or the user-prompt command name if using the .NET Global Tool).
Usage
Once configured, the user_prompt tool is available to the AI agent automatically. The agent decides when to invoke it based on its own judgment — no manual triggering is required.
Tool Reference
Tool name: user_prompt
Example Tool Call
Example Response
Terminal Window Behavior
When the tool is invoked, a new PowerShell window opens displaying:
- A header indicating an AI agent needs input
- The agent's stated reason for asking
- All questions as a numbered list
- Numbered input prompts (
1>,2>, etc.) — one Enter per answer - A confirmation message before the window auto-closes
If the user does not respond within 10 minutes, or closes the window without answering, the agent receives a descriptive fallback message and can decide how to proceed.
Architecture
How It Works Internally
- The MCP client sends a
tools/callJSON-RPC request over stdin - The server writes the questions to a temporary JSON file
- A PowerShell script is generated and launched in a new terminal window
- The user sees the questions and types answers sequentially
- Answers are written to a response JSON file; the terminal closes
- The server reads the response file, formats it, cleans up temp files, and returns the result over stdout
All temporary files are created under %TEMP%/UserPromptMcpServer/<session-guid>/ and are cleaned up after each invocation regardless of outcome.
Contributing
Contributions are welcome! To make sure your change gets merged, please open an issue first to discuss the proposed change and get approval before starting work.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes and ensure the project builds cleanly (
dotnet build) - Commit with a clear, descriptive message
- Open a pull request against
develop
Development Setup
Areas for Contribution
- Cross-platform support — the macOS and Linux terminal launching is currently stubbed out and untested
- Test coverage — no test project exists yet
- Additional MCP tools — if the project scope expands beyond a single tool
License
This project is licensed under the Apache License 2.0. See LICENSE for details.
Author
Jacob Thomas — @Jacob-J-Thomas
来源:README.md,提交 94897c8
工具
0版本历史
1- v1.0.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。