{"id":44448127,"url":"https://github.com/jojojotarou/askuserquestionplus","last_synced_at":"2026-02-12T16:04:26.102Z","repository":{"id":336669934,"uuid":"1126171306","full_name":"JoJoJotarou/AskUserQuestionPlus","owner":"JoJoJotarou","description":"A MCP server (Streamable HTTP) for asking user questions via a web interface, inspired by the Claude Code AskUserQuestion Tool.","archived":false,"fork":false,"pushed_at":"2026-02-05T15:13:50.000Z","size":464,"stargazers_count":31,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-06T01:42:20.439Z","etag":null,"topics":["ask-user-questions","claude-code","codex","gemini-cli","mcp","model-context-protocol"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoJoJotarou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-01T09:45:58.000Z","updated_at":"2026-02-05T15:17:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/JoJoJotarou/AskUserQuestionPlus","commit_stats":null,"previous_names":["jojojotarou/askuserquestionplus"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/JoJoJotarou/AskUserQuestionPlus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoJoJotarou%2FAskUserQuestionPlus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoJoJotarou%2FAskUserQuestionPlus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoJoJotarou%2FAskUserQuestionPlus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoJoJotarou%2FAskUserQuestionPlus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoJoJotarou","download_url":"https://codeload.github.com/JoJoJotarou/AskUserQuestionPlus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoJoJotarou%2FAskUserQuestionPlus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29371458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ask-user-questions","claude-code","codex","gemini-cli","mcp","model-context-protocol"],"created_at":"2026-02-12T16:04:23.996Z","updated_at":"2026-02-12T16:04:26.096Z","avatar_url":"https://github.com/JoJoJotarou.png","language":"HTML","readme":"# AskUserQuestionPlus\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![npm version](https://img.shields.io/npm/v/ask-user-question-plus.svg)](https://www.npmjs.com/package/ask-user-question-plus)\n\nA MCP server (Streamable HTTP) for asking user questions via a web interface, inspired by the Claude Code AskUserQuestion Tool.\n\n\u003e 🌟 Supports Claude Code, Codex, and Gemini CLI!\n\n![Interface Screenshot](./assets/screenshot.png)\n\n\u003cdiv align=\"center\"\u003e\n\n[**English**](#english) | [**中文**](#chinese)\n\n\u003c/div\u003e\n\n---\n\n\u003ca id=\"chinese\"\u003e\u003c/a\u003e\n\n## ✨ 特性\n\n- **🎨 精美界面**：Claude Code AskUserQuestions 风格样式，支持暗/浅色主题适配\n- **⌨️ 全键盘操作**：支持方向键、Tab、Space、Enter 快捷键，操作流畅\n- **📊 丰富交互**：支持单选、多选、推荐选项标记以及自定义输入（Other）\n- **🔄 实时通信**：基于 WebSocket 的实时消息传递，响应迅速\n- **⏱️ 超时保护**：可配置会话超时时间（默认 10 分钟）\n- **📈 高度可扩展**：支持 1-20 个问题，每个问题选项数量不限\n\n## 🚀 部署\n\n### 启动参数\n\n| 参数               | 说明         | 默认值           | 示例               |\n| :----------------- | :----------- | :--------------- | :----------------- |\n| `--timeout=\u003c毫秒\u003e` | 会话超时时间 | 600000 (10 分钟) | `--timeout=300000` |\n| `--port=\u003c端口\u003e`    | 监听端口     | 3456             | `--port=8080`      |\n\n### 前台运行\n\n```bash\nnpx ask-user-question-plus\n\n# 自定义端口和超时\nnpx ask-user-question-plus -- --port=3456 --timeout=600000\n```\n\n### 后台运行（推荐）\n\n#### 使用 pm2\n\n\u003e 需先安装 pm2: `npm install -g pm2`\n\n```bash\npm2 start \"npx ask-user-question-plus\" --name ask-user-question-plus-service\n\n# 带参数启动\npm2 start \"npx ask-user-question-plus -- --port=3456 --timeout=600000\" --name ask-user-question-plus-service\n\n# 停止服务\npm2 stop ask-user-question-plus-service\n\n# Windows\npm2 start cmd --name ask-user-question-plus-service -- /c npx ask-user-question-plus\n```\n\n#### 使用 Docker\n\n```bash\ndocker compose up -d\n```\n\n## ⚙️ 配置\n\n### Claude Code\n\n```bash\nclaude mcp add -s user -t http AskUserQuestionPlus http://localhost:3456/mcp\n```\n\n### Codex\n\n在 `~/.codex/config.toml` 中添加配置：\n\n```toml\n[mcp_servers.AskUserQuestionPlus]\nurl = \"http://localhost:3456/mcp/\"\n```\n\n或者使用命令行：\n\n```bash\ncodex mcp add AskUserQuestionsPlus --url http://localhost:3456/mcp/\n```\n\n\u003e - ~~[[MCP] Add support for streamable HTTP MCP servers](https://github.com/openai/codex/pull/4317)~~\n\u003e - ~~[Replace experimental_use_rmcp_client with [features].rmcp_client](https://github.com/openai/codex/issues/6995)~~\n\n### Gemini CLI\n\n```bash\ngemini mcp add AskUserQuestionPlus http://localhost:3456/mcp -s user --transport http\n```\n\n\u003e ~~**⚠️ 注意**：如果遇到 `[Error: Unrecognized key(s) in object: 'type']` 错误 (参见 [issue #15449](https://github.com/google-gemini/gemini-cli/issues/15449))：~~\n\u003e\n\u003e - ~~请在 `~/.gemini/settings.json` 中删除 `type` 字段~~\n\u003e - ~~或等待 gemini cli `v0.23.0` 发布~~\n\n## 🕹️ 使用方法\n\n### 基本流程\n\n1.  启动与 Claude Code/Codex/Gemini 的对话。\n2.  模型调用工具：例如 `使用 ask_user_question_plus 工具问我 3 个问题`。\n3.  浏览器自动打开问卷界面。\n4.  使用键盘（方向键、Space、Enter）或鼠标回答问题。\n5.  提交后浏览器标签页自动关闭，结果返回给模型。\n\n### 键盘快捷键\n\n| 快捷键             | 功能                      |\n| :----------------- | :------------------------ |\n| `↑` `↓`            | 在选项之间移动 / 滚动页面 |\n| `←` `→` / `Tab`    | 在不同问题标签页之间切换  |\n| `Space` / `Enter`  | 选中/取消选中当前选项     |\n| `Cmd/Ctrl + Enter` | 进入提交 Tab / 提交答案   |\n\n## 🔧 工具定义 (Tools)\n\n### `ask_user_question_plus`\n\n**输入 Schema (Input):**\n\n```typescript\n{\n  questions: [\n    {\n      id: string;              // 问题唯一标识\n      header: string;          // 标签标题（推荐 ≤12 字符）\n      text: string;            // 问题正文\n      type: \"single\" | \"multiple\";  // 问题类型：单选或多选\n      options: [\n        {\n          value: string;        // 选项值\n          label: string;        // 选项显示文本\n          description?: string; // 选项描述（可选）\n          recommended?: boolean;// 是否标记为推荐（可选）\n        }\n      ]\n    }\n  ]  // 限制：1-20 个问题\n}\n```\n\n**输出 Schema (Output):**\n\n```typescript\n{\n  \"answers\": {\n    \"questionId1\": {\"value\" : \"\", \"other\":\"\"},\n    \"questionId2\": {\"value\" : \"\", \"other\":\"\"},\n  }\n}\n```\n\n\u003e **💡 提示**：前端界面会自动为每个问题追加 \"Other (自定义输入)\" 选项。\n\n## 🛠️ 开发指南\n\n### 克隆项目\n\n```bash\ngit clone https://github.com/JoJoJotarou/AskUserQuestionPlus.git \u0026\u0026 cd AskUserQuestionPlus\n```\n\n### 安装依赖\n\n```bash\nnpm install\n```\n\n### 开发模式\n\n```bash\nnpm run dev\n```\n\n### 构建\n\n```bash\nnpm run build\n# npm start\n```\n\n### 目录结构\n\n```\nask-user-question-plus/\n├── src/\n│   ├── index.ts           # 主入口文件\n│   ├── ws-service.ts      # WebSocket 服务逻辑\n│   └── mcp-server.ts      # MCP 服务器定义\n├── public/\n│   └── index.html         # 前端 Web 界面\n├── dist/                  # 编译输出\n└── package.json\n```\n\n## 🤝 贡献\n\n欢迎提交 [Issues](https://github.com/JoJoJotarou/AskUserQuestionPlus/issues) 或 Pull Requests 来改进这个项目。\n\n## 📄 许可证\n\n[MIT License](LICENSE)\n\n## 🔗 相关链接\n\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [Codex Support for streamable HTTP MCP](https://github.com/openai/codex/pull/4317)\n\n---\n\n\u003ca id=\"english\"\u003e\u003c/a\u003e\n\n## ✨ Features\n\n- **🎨 Beautiful Interface**: Replicates the Claude Code AskUserQuestions style with support for Dark/Light themes.\n- **⌨️ Full Keyboard Control**: Seamless navigation using Arrow keys, Tab, Space, and Enter.\n- **📊 Rich Interactions**: Supports single choice, multiple choice, recommended options, and custom input (\"Other\").\n- **🔄 Real-time Communication**: WebSocket-based messaging for instant feedback.\n- **⏱️ Timeout Protection**: Configurable session timeout (Default: 10 minutes).\n- **📈 Scalable**: Supports 1 to 20 questions with unlimited options per question.\n\n## 🚀 Deployment\n\n### Startup Parameters\n\n| Argument         | Description                     | Default          | Example            |\n| :--------------- | :------------------------------ | :--------------- | :----------------- |\n| `--timeout=\u003cms\u003e` | Session timeout in milliseconds | 600000 (10 mins) | `--timeout=300000` |\n| `--port=\u003cport\u003e`  | Server port                     | 3456             | `--port=8080`      |\n\n### Foreground\n\n```bash\nnpx ask-user-question-plus\n\n# Custom port and timeout\nnpx ask-user-question-plus -- --port=3456 --timeout=600000\n```\n\n### Background (Recommended)\n\n#### Using pm2\n\n\u003e Install pm2 first: `npm install -g pm2`\n\n```bash\npm2 start \"npx ask-user-question-plus\" --name ask-user-question-plus-service\n\n# With arguments\npm2 start \"npx ask-user-question-plus -- --port=3456 --timeout=600000\" --name ask-user-question-plus-service\n\n# Stop service\npm2 stop ask-user-question-plus-service\n\n# Windows\npm2 start cmd --name ask-user-question-plus-service -- /c npx ask-user-question-plu\n```\n\n#### Using Docker\n\n```bash\ndocker compose up -d\n```\n\n## ⚙️ Configuration\n\n### Claude Code\n\n```bash\nclaude mcp add -s user -t http AskUserQuestionPlus http://localhost:3456/mcp\n```\n\n### Codex\n\nAdd to `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.AskUserQuestionPlus]\nurl = \"http://localhost:3456/mcp/\"\n```\n\nOr via CLI:\n\n```bash\ncodex mcp add AskUserQuestionsPlus --url http://localhost:3456/mcp/\n```\n\n\u003e - ~~[[MCP] Add support for streamable HTTP MCP servers](https://github.com/openai/codex/pull/4317)~~\n\u003e - ~~[Replace experimental_use_rmcp_client with [features].rmcp_client](https://github.com/openai/codex/issues/6995)~~\n\n### Gemini CLI\n\n```bash\ngemini mcp add AskUserQuestionPlus http://localhost:3456/mcp -s user --transport http\n```\n\n\u003e ~~**⚠️ Note**: If you encounter `[Error: Unrecognized key(s) in object: 'type']` ([Issue #15449](https://github.com/google-gemini/gemini-cli/issues/15449)):~~\n\u003e\n\u003e - ~~Remove the `type` field in `~/.gemini/settings.json`.~~\n\u003e - ~~Or wait for gemini cli `v0.23.0`.~~\n\n## 🕹️ Usage\n\n### Basic Workflow\n\n1.  Start a conversation with Claude, Codex, or Gemini.\n2.  Ask the model to use the tool: e.g., \"Use ask_user_question_plus to ask me 3 questions.\"\n3.  A browser tab will automatically open with the questionnaire.\n4.  Answer using your keyboard (Arrows, Space, Enter) or mouse.\n5.  Upon submission, the tab closes, and answers are sent back to the model.\n\n### Keyboard Shortcuts\n\n| Shortcut           | Function                      |\n| :----------------- | :---------------------------- |\n| `↑` `↓`            | Move between options / Scroll |\n| `←` `→` / `Tab`    | Switch between question tabs  |\n| `Space` / `Enter`  | Select/Deselect option        |\n| `Cmd/Ctrl + Enter` | Submit Tab / Submit answers   |\n\n## 🔧 Tools Definition\n\n### `ask_user_question_plus`\n\n**Input Schema:**\n\n```typescript\n{\n  questions: [\n    {\n      id: string;              // Unique identifier\n      header: string;          // Tab header (Rec. ≤12 chars)\n      text: string;            // Question text\n      type: \"single\" | \"multiple\";  // Question type\n      options: [\n        {\n          value: string;        // Option value\n          label: string;        // Option label\n          description?: string; // Option description (optional)\n          recommended?: boolean;// Recommended flag (optional)\n        }\n      ]\n    }\n  ]  // Limit: 1-20 questions\n}\n```\n\n**Output Schema:**\n\n```json\n{\n  \"answers\": {\n    \"questionId1\": { \"value\": \"\", \"other\": \"\" },\n    \"questionId2\": { \"value\": \"\", \"other\": \"\" }\n  }\n}\n```\n\n\u003e **💡 Tip**: The \"Other\" (custom input) option is automatically added by the frontend.\n\n## 🛠️ Development\n\n### Clone\n\n```bash\ngit clone https://github.com/JoJoJotarou/AskUserQuestionPlus.git \u0026\u0026 cd AskUserQuestionPlus\n```\n\n### Install Dependencies\n\n```bash\nnpm install\n```\n\n### Run Dev Mode\n\n```bash\nnpm run dev\n```\n\n### Build\n\n```bash\nnpm run build\n# npm start\n```\n\n## 🤝 Contribution\n\nContributions are welcome! Please submit [Issues](https://github.com/JoJoJotarou/AskUserQuestionPlus/issues) or Pull Requests.\n\n## 📄 License\n\n[MIT License](LICENSE)\n\n## 🔗 Related Links\n\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [Codex Support for streamable HTTP MCP](https://github.com/openai/codex/pull/4317)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjojojotarou%2Faskuserquestionplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjojojotarou%2Faskuserquestionplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjojojotarou%2Faskuserquestionplus/lists"}