An MCP (Model Context Protocol) server that enables AI agents to collect structured, validated user input through native UI forms using elicitation.
- 6 Question Types: text, number, boolean, radio, dropdown, checkbox (with true multi-select support!)
- Multi-Select Checkboxes: Native array support for selecting multiple options
- Comprehensive Validation: required fields, min/max values, patterns, email/URI formats
- Type-Safe: Built with TypeScript and Zod for runtime validation
- Native UI: Renders forms in the MCP client's native interface
- Zero Ambiguity: Eliminates conversational back-and-forth for data collection
- Node.js >= 20.0.0
- An MCP-compatible client (Cursor, Claude Desktop, VS Code, etc.)
First, install the render-question-mcp server with your client.
Standard config works in most tools:
{
"mcpServers": {
"render-question": {
"command": "npx",
"args": [
"render-question-mcp@latest"
]
}
}
}Claude Code
Use the Claude Code CLI to add the server:
claude mcp add render-question npx render-question-mcp@latestClaude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"render-question": {
"command": "npx",
"args": ["render-question-mcp@latest"]
}
}
}Cursor
Go to Cursor Settings → MCP → Add new MCP Server. Name to your liking, use command type with the command npx render-question-mcp@latest. You can also verify config or add command arguments via clicking Edit.
Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"render-question": {
"command": "npx",
"args": ["render-question-mcp@latest"]
}
}
}VS Code
Follow the MCP install guide, use the standard config above.
Alternatively, install using the VS Code CLI:
code --add-mcp '{"name":"render-question","command":"npx","args":["render-question-mcp@latest"]}'Cline
Add via the Cline VS Code extension settings or by updating your cline_mcp_settings.json file:
{
"mcpServers": {
"render-question": {
"command": "npx",
"args": [
"render-question-mcp@latest"
]
}
}
}Zed
Follow the MCP Servers documentation. Use the standard config above.
For local development and testing:
{
"mcpServers": {
"render-question": {
"command": "node",
"args": ["/absolute/path/to/render-question-mcp/dist/index.js"],
"env": {
"LOG_LEVEL": "debug"
}
}
}
}After installation, verify render-question-mcp is working:
- Restart your MCP client completely
- Check connection status:
- Cursor: Look for green dot in Settings → Tools & Integrations → MCP Tools
- Claude Desktop: Check for "render_question" in available tools
- VS Code: Verify in GitHub Copilot settings
- Test with a simple query:
Ask me for my name and email address
If you see the AI agent use the render_question tool and display a native form, you're all set! 🎉
The server provides a single tool: render_question
{
"questions": [
{
"id": "email",
"type": "text",
"label": "What is your email address?",
"validation": {
"required": true,
"format": "email"
},
"helpText": "We'll use this for project notifications",
"placeholder": "developer@example.com"
}
]
}{
"title": "Developer Onboarding",
"description": "Help us set up your development environment",
"questions": [
{
"id": "name",
"type": "text",
"label": "Your full name",
"validation": {
"required": true,
"minLength": 2
},
"placeholder": "Jane Doe"
},
{
"id": "experience",
"type": "number",
"label": "Years of experience with TypeScript",
"validation": {
"required": true,
"min": 0,
"max": 50
}
},
{
"id": "role",
"type": "dropdown",
"label": "What's your primary role?",
"options": [
{ "value": "frontend", "label": "Frontend Developer" },
{ "value": "backend", "label": "Backend Developer" },
{ "value": "fullstack", "label": "Full-Stack Developer" },
{ "value": "devops", "label": "DevOps Engineer" }
],
"validation": { "required": true }
},
{
"id": "remote",
"type": "boolean",
"label": "Are you working remotely?",
"default": true
}
]
}{
"id": "username",
"type": "text",
"label": "Username",
"validation": {
"required": true,
"minLength": 3,
"maxLength": 20,
"pattern": "^[a-zA-Z0-9_]+$"
},
"placeholder": "john_doe"
}{
"id": "port",
"type": "number",
"label": "Port Number",
"validation": {
"required": true,
"min": 1,
"max": 65535
},
"default": 3000
}{
"id": "agree",
"type": "boolean",
"label": "I agree to the terms and conditions",
"validation": {
"required": true
}
}{
"id": "theme",
"type": "radio",
"label": "Select a theme",
"options": [
{ "value": "light", "label": "Light Mode" },
{ "value": "dark", "label": "Dark Mode" },
{ "value": "auto", "label": "Auto (System)" }
],
"validation": {
"required": true
}
}{
"id": "framework",
"type": "dropdown",
"label": "Choose a framework",
"options": [
{ "value": "react", "label": "React" },
{ "value": "vue", "label": "Vue.js" },
{ "value": "angular", "label": "Angular" },
{ "value": "svelte", "label": "Svelte" }
]
}{
"id": "features",
"type": "checkbox",
"label": "Select features to enable",
"options": [
{ "value": "auth", "label": "Authentication" },
{ "value": "db", "label": "Database Integration" },
{ "value": "api", "label": "REST API" },
{ "value": "websocket", "label": "WebSocket Support" }
],
"validation": {
"min": 1, // Require at least 1 selection
"max": 3 // Allow maximum 3 selections
},
"helpText": "Choose all features you want to include"
}Response format for multi-select:
{
"features": ["auth", "db", "api"] // Array of selected values
}- required:
boolean- Field must be filled - min / max:
number- Min/max value for numbers, or min/max items for checkbox arrays - minLength / maxLength:
number- Min/max length for strings - pattern:
string- Regular expression pattern - format:
"email" | "uri" | "url" | "date" | "date-time"- Format validation - errorMessage:
string- Custom error message
The tool returns a structured response:
{
"answers": {
"name": "Jane Doe",
"experience": 5,
"role": "fullstack",
"remote": true,
"features": ["auth", "db", "api"]
},
"metadata": {
"completedAt": "2025-11-13T10:30:00Z",
"duration": 15000,
"action": "submit"
}
}Possible actions:
submit- User submitted the formcancel- User canceled the dialogdecline- User declined to answer
pnpm install
pnpm buildpnpm test
pnpm test:coverage-
Build the project:
pnpm build
-
Link locally:
npm link
-
Configure your MCP client to use the local build
-
Test with an MCP Inspector or client
See the examples directory for real-world use cases:
src/
├── index.ts # CLI entry point
├── server.ts # MCP server setup
├── stdio.ts # Stdio transport
├── types.ts # TypeScript type definitions
├── elicitation/
│ ├── core.ts # Core elicitation logic
│ └── schemas.ts # Schema builders
└── tools/
├── index.ts # Tool registry
└── render_question.ts # Main tool implementation
See AGENTS.md for detailed guidance on using this tool effectively in AI workflows.
MIT
Contributions welcome! Please read the contributing guidelines and submit a PR.
- MCP Specification
- MCP TypeScript SDK
- mcp-elicit - Reference implementation