ask-user
An MCP App that enables AI agents to ask users multiple questions with tab-based navigation, multiple-choice options, multi-select support, and custom text input, all rendered inline in the conversation.
README
Ask User MCP App
An MCP App that enables AI agents to ask users multiple questions with tab-based navigation, multiple-choice options, multi-select support, and custom text input - all rendered inline in the conversation.
Features
- Multi-Question Tabs: Ask multiple questions at once, displayed as navigable tabs
- Keyboard Navigation: Tab/Shift+Tab to navigate tabs, Arrow keys for options, Enter to select/submit
- Next/Submit Button: Each question has a Next button to advance to the next tab (or "Review & Submit" on the last question)
- Multiple Choice Questions: Present 2-4 options per question
- Single & Multi-Select: Support both radio-button style (single) and checkbox style (multi) selection
- Custom "Other" Input: Optional text input for answers not covered by predefined options
- Skip Questions: Non-required questions can be skipped
- Theme Support: Automatically adapts to host's light/dark theme
- Dual Transport: Works with both HTTP (web clients) and stdio (desktop clients)
Installation in Claude.ai (Hosted)
Use the hosted MCP server directly with Claude's connector feature:
- Open Claude.ai and go to Settings → Connectors
- Click Add custom connector and enter:
- Remote MCP server URL:
https://ask-user-mcp-app-seven.vercel.app/mcp
- Remote MCP server URL:
Browse the hosted landing page at ask-user-mcp-app-seven.vercel.app for a quick overview of the tool schema and install steps. 3. Save and start a new conversation
The ask_user tool will now be available to Claude.
Installation
Or clone and build locally:
git clone https://github.com/anthropics/ask-user-mcp-app
cd ask-user-mcp-app
npm install
npm run build
Usage
Local Development (stdio)
Build and run locally with Claude Desktop:
# Clone and build
git clone https://github.com/anthropics/ask-user-mcp-app
cd ask-user-mcp-app
npm install
npm run build
Add to your claude_desktop_config.json (use the absolute path to your clone):
{
"mcpServers": {
"ask-user": {
"command": "node",
"args": ["/absolute/path/to/ask-user-mcp-app/dist/main.js", "--stdio"]
}
}
}
Tool Schema
The ask_user tool accepts a questions array containing one or more questions to display as tabs:
Top-Level Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
questions |
array | Yes | Array of question objects (minimum 1) |
Question Object Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
question |
string | Yes | The question to ask (also used as unique identifier) |
header |
string | Yes | Short label displayed as tab name (max 12 chars) |
options |
array | Yes | 2-4 choices, each with label, value, and optional description |
multiSelect |
boolean | No | Allow multiple selections (default: false) |
allowOther |
boolean | No | Include "Other" text input option (default: true) |
required |
boolean | No | Whether this question must be answered (default: false) |
Example Tool Call
{
"name": "ask_user",
"arguments": {
"questions": [
{
"question": "Which frontend framework would you like to use for this project?",
"header": "Framework",
"options": [
{ "label": "React", "value": "react", "description": "Popular library with component-based architecture" },
{ "label": "Vue", "value": "vue", "description": "Progressive framework for simplicity" },
{ "label": "Svelte", "value": "svelte", "description": "Compiler-based, highly optimized" }
],
"required": true
},
{
"question": "How should we handle authentication?",
"header": "Auth Method",
"options": [
{ "label": "OAuth 2.0", "value": "oauth", "description": "Industry standard, supports SSO" },
{ "label": "JWT", "value": "jwt", "description": "Stateless, good for APIs" },
{ "label": "Session-based", "value": "session", "description": "Traditional, server-side state" }
]
},
{
"question": "Which testing frameworks should we include?",
"header": "Testing",
"options": [
{ "label": "Jest", "value": "jest", "description": "Popular testing framework" },
{ "label": "Vitest", "value": "vitest", "description": "Fast, Vite-native testing" },
{ "label": "Playwright", "value": "playwright", "description": "E2E testing" }
],
"multiSelect": true
}
]
}
}
Response Format
When the user submits their answers, the response is formatted as:
Which frontend framework would you like to use for this project? -> React
How should we handle authentication? -> JWT
Which testing frameworks should we include? -> Vitest, Playwright
Keyboard Navigation
| Key | Action |
|---|---|
| Tab / Shift+Tab | Navigate between question tabs |
| Arrow Left / Right | Navigate between question tabs |
| Arrow Up / Down | Navigate between options in current question |
| Enter / Space | Select current option |
| Enter (on Submit tab) | Submit all answers |
Development
Commands
| Command | Description |
|---|---|
npm run build |
Build server and UI |
npm run build:server |
Build only server (TypeScript) |
npm run build:ui |
Build only UI (Vite + React) |
npm run serve |
Start HTTP server |
npm start |
Build and serve |
npm run dev |
Development mode with tsx |
Testing Locally
-
Start the server:
npm start -
Use the basic-host from the ext-apps repo:
cd ext-apps/examples/basic-host SERVERS='["http://localhost:3001/mcp"]' npm start -
Open http://localhost:8080 and test the
ask_usertool
Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Host Client │────▶│ MCP Server │────▶│ React UI │
│ (Claude, etc.) │ │ (server.ts) │ │ (mcp-app.tsx) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ Tool call with │ Serves bundled │
│ ui/resourceUri │ HTML via resource │
│ │ │
└───────────────────────┴───────────────────────┘
postMessage communication
Key Files
- server.ts: Registers the
ask_usertool andui://resource - main.ts: Entry point supporting HTTP and stdio transports
- mcp-app.tsx: React UI with multi-question state management
- vite.config.ts: Bundles UI into single HTML file via
vite-plugin-singlefile
UI Components
| Component | Purpose |
|---|---|
TabBar |
Pill-style tab navigation with progress indicator |
QuestionPanel |
Renders individual question with refined card styling |
SubmitTab |
Review page showing all answers with staggered animations |
OptionList / OptionButton |
Elegant option cards with smooth transitions |
OtherInput |
Custom text input with auto-focus behavior |
Design System
The UI uses a warm, Claude-native color palette for seamless integration:
- Surfaces: Warm cream backgrounds (
#faf8f5,#f5f1eb) - Accent: Terra cotta (
#c4704b) for selections and CTAs - Text: Warm gray hierarchy with subtle undertones
- Interactions: Smooth 150ms transitions, focus rings, hover states
- Dark mode: Full support with warm dark palette
Navigation Hooks
| Hook | Purpose |
|---|---|
useTabNavigation |
Handles Tab/Shift+Tab and arrow key navigation between tabs |
useOptionNavigation |
Handles arrow key navigation and Enter/Space selection within options |
Dependencies
@modelcontextprotocol/ext-apps- MCP Apps SDK@modelcontextprotocol/sdk- Core MCP SDKreact/react-dom- UI frameworkexpress/cors- HTTP serverzod- Schema validationtailwindcss- Styling
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。