Content
# Elicitation Demo — Test MCP Elicitation Support
<p>
<a href="https://github.com/mcp-use/mcp-use">Built with <b>mcp-use</b></a>
<a href="https://github.com/mcp-use/mcp-use">
<img src="https://img.shields.io/github/stars/mcp-use/mcp-use?style=social" alt="mcp-use stars">
</a>
</p>
A minimal MCP server that exercises every elicitation feature from the [MCP specification](https://modelcontextprotocol.io/specification/draft/client/elicitation). Use it to verify that your MCP client correctly supports **form mode** and **URL mode** elicitation — with just three focused tools, one per orthogonal feature.
## Try it now
Connect to the hosted instance:
```
https://df04urycxwzh.deploy.mcp-use.com/mcp
```
Or open the [Inspector](https://inspector.manufact.com/inspector?autoConnect=https%3A%2F%2Fdf04urycxwzh.deploy.mcp-use.com%2Fmcp) to test it interactively.
## What is Elicitation?
[Elicitation](https://modelcontextprotocol.io/specification/draft/client/elicitation) lets MCP servers request additional information from users _during_ tool execution. Instead of requiring all inputs upfront as tool parameters, a tool can pause, ask the user a question, and continue with their answer. The spec defines two modes:
- **Form mode** — the server sends a JSON Schema describing the fields it needs, the client renders a form, and the user's response is returned as structured data.
- **URL mode** — the server sends a URL that the client opens in a browser. The interaction happens entirely out-of-band: credentials and sensitive data never pass through the MCP client.
## The three orthogonal features
This server has exactly three tools — one per distinct elicitation capability:
### 1. `form-demo` — Form mode with every primitive type
Tests the core form mode by collecting **all supported primitive types in a single form**:
| Field | Type | Constraints |
|-------|------|-------------|
| `name` | `string` | minLength: 1, maxLength: 50 |
| `email` | `string` | format: `email` |
| `website` | `string` | format: `uri`, default provided |
| `username` | `string` | min/maxLength, regex pattern, default provided |
| `age` | `number` | min: 0, max: 150 |
| `quantity` | `integer` | min: 1, max: 100, default: 1 |
| `subscribe` | `boolean` | default: false |
| `role` | `enum` | untitled single-select (simple `enum` array) |
This single tool covers: strings (plain, email-formatted, url-formatted, pattern-constrained), numbers, integers, booleans, untitled enums, and default values.
### 2. `enum-demo` — Titled enums (SEP-1330)
The MCP spec supports advanced enum variants beyond simple string arrays. This tool tests the [SEP-1330](https://github.com/modelcontextprotocol/specification/discussions/1330) patterns using the verbose `enumSchema` API:
- **Titled single-select** (`oneOf`) — each option has a machine value _and_ a human-readable display label (e.g. value `"p0"`, title `"Critical (P0)"`)
- **Untitled multi-select** — user can select multiple items from a plain string array
- **Titled multi-select** (`anyOf`) — multi-select where each option has a value/title pair
These are distinct from the basic `z.enum()` tested in `form-demo` because they require a different JSON Schema shape (`oneOf`/`anyOf` with `const`+`title` instead of a flat `enum` array).
### 3. `url-demo` — URL mode
Tests URL mode elicitation, where the server directs the user to an external URL for an out-of-band interaction. Per the spec, this mode **must** be used for sensitive operations:
- OAuth authorization flows
- API key / credential entry
- Payment processing
The client's only job is to show the URL, get consent, and open a browser. The sensitive data never transits through the MCP client or LLM context.
## Tools
| Tool | Mode | What it tests |
|------|------|---------------|
| `form-demo` | Form | Every primitive type in one form: string (plain, email, url, pattern), number, integer, boolean, untitled enum — plus defaults and constraints |
| `enum-demo` | Form (SEP-1330) | Titled single-select (oneOf), untitled multi-select, titled multi-select (anyOf) |
| `url-demo` | URL | Out-of-band URL elicitation for sensitive data |
## Local development
```bash
git clone https://github.com/mcp-use/mcp-elicitation-demo.git
cd mcp-elicitation-demo
npm install
npm run dev
```
The server starts at `http://localhost:3000/mcp` with the Inspector at `http://localhost:3000/inspector`.
## Deploy
```bash
npx mcp-use deploy
```
## Built with
- [mcp-use](https://github.com/mcp-use/mcp-use) — MCP server framework
## License
MIT