CC 2.1.76 ยท NEW FEATURE

MCP Elicitation Explorer

Structured user input mid-task. No more guessing โ€” MCP servers ask for exactly what they need via form dialogs or secure browser flows.

How Elicitation Works

MCP servers request structured input from users at runtime โ€” no more parsing free-text prompts for configuration.

๐Ÿ–ฅ
MCP Server
Needs user input
โ†’
๐Ÿ›ก
Elicitation Hook
Guard / intercept
โ†’
๐Ÿ“‹
User Dialog
Form or URL
โ†’
๐Ÿ“Š
Result Hook
Log / modify
โ†’
โœ…
MCP Server
Receives response

FORM Form Mode

JSON Schema-driven dialog for collecting non-sensitive structured data.

  • Flat schemas only โ€” primitive properties
  • Supports string, number, integer, boolean, enum
  • Schema validation catches errors at input time
  • Data stays in the LLM context
Best for

Search preferences, config options, project metadata, display names

URL URL Mode

Opens a browser URL for secure external flows.

  • OAuth authorization, API key entry
  • Credentials never touch the LLM context
  • accept = user consented to open URL
  • Server must verify user identity
Best for

API keys, passwords, tokens, payments, OAuth flows

Form vs. URL โ€” Decision Matrix

Criteria Form Mode URL Mode
Data sensitivityNon-sensitive onlySecrets, credentials, tokens
Schema typeFlat JSON Schema, primitivesN/A (browser handles)
ValidationClient-side via schemaServer-side
Data exposureVisible in LLM contextNever enters LLM context
Completion signalUser submits formnotifications/elicitation/complete
User experienceInline CLI dialogBrowser redirect

Schema โ†’ Form Preview

Edit the JSON Schema on the left and see the rendered elicitation dialog on the right.

requestedSchema (JSON Schema) FORM MODE
Elicitation Dialog Preview

Click "Render Form" to generate the dialog preview.

Elicitation Guard Simulator

Test OrchestKit's elicitation-guard hook โ€” paste a schema and see if it would be blocked.

Secret Patterns Checked

The guard scans all property names against these patterns:

const SECRET_PATTERNS = [
  /api[_-]?key/i,
  /secret/i,
  /password/i,
  /passwd/i,
  /token/i,
  /credential/i,
  /private[_-]?key/i,
  /auth[_-]?code/i,
  /client[_-]?secret/i,
  /access[_-]?key/i,
];

Test Field Names

Enter comma-separated field names to test against the guard:

Quick Test Scenarios

What Happens When Blocked?

// Hook returns exit code 2 with message:
"Blocked: MCP server \"my-server\" attempted
to collect \"api_key\" via form mode.
Secrets must use URL mode (browser-based
flow) to avoid exposing credentials to
the LLM context."

The elicitation dialog is never shown. The MCP server receives a decline action.

Elicitation Hook Flow

Watch the complete lifecycle of an MCP elicitation request through OrchestKit's hooks.

1
MCP server sends elicitation request
2
Elicitation event fires
3
elicitation-guard checks schema fields
4
Dialog shown to user
5
User responds (accept/decline/cancel)
6
ElicitationResult event fires
7
elicitation-result-logger records outcome
8
Response sent to MCP server

Step 8

Response {action: "accept", content: {query: "auth middleware", category: "code"}} sent to server

PASS

Real-World Use Cases

How I use MCP elicitation in my day-to-day development with Claude Code.

Project Configuration

MCP server asks for DB type, API style, and auth method instead of guessing from project files.

FORM 3 fields ยท enum + string

Service Authorization

Connect to GitHub, Linear, or Slack via OAuth without exposing tokens to the LLM context.

URL Browser redirect

Deployment Confirmation

Before deploying to production, the server asks you to type the environment name as confirmation.

FORM 1 field ยท string match

Search Preferences

Configure search scope, result limits, and category filters before running a knowledge base query.

FORM 3 fields ยท enum + integer

Secret Field Guard

OrchestKit blocks form-mode elicitations requesting passwords or API keys โ€” forces URL mode.

BLOCKED Security hook

Decline Analytics

Track when users decline elicitations and inject context suggesting alternative approaches.

HOOK ElicitationResult logger

Post Content & Prompts

Ready-to-use sections for your post about CC 2.1.76 elicitation. Click any block to copy.

Hook (Opening)

Every AI coding assistant has the same problem: mid-task, the tool needs information from you, but the only way to ask is through the chat. Free-text in, free-text out. You type "postgres", it parses "post gres" and picks MongoDB. Claude Code 2.1.76 fixes this with MCP Elicitation โ€” structured input dialogs that MCP servers can trigger mid-task. Form fields for configuration, browser redirects for secrets. No more guessing.

What It Is (Technical)

MCP Elicitation adds two new primitives to the Model Context Protocol: **Form mode**: The server sends a JSON Schema, Claude Code renders a native form dialog. The user fills in validated fields โ€” strings, numbers, enums, booleans. Data goes back to the server, typed and validated. No parsing ambiguity. **URL mode**: For sensitive data (API keys, OAuth tokens), the server provides a URL. Claude Code opens the user's browser. Credentials never touch the LLM context. The server gets a `notifications/elicitation/complete` callback when the flow finishes. Both modes support three user actions: accept, decline, cancel. Every server must handle all three.

The Hooks (OrchestKit Angle)

CC 2.1.76 also ships Elicitation and ElicitationResult hook events. This is where it gets interesting for plugin developers. We built two hooks in OrchestKit: **elicitation-guard** โ€” Intercepts form-mode requests before the dialog is shown. Scans every field name against 10 secret patterns (api_key, password, token, etc). If a match is found, the elicitation is blocked and the user never sees the dialog. The MCP server gets a decline with a message: "Secrets must use URL mode." **elicitation-result-logger** โ€” Fires after the user responds. Tracks accept/decline/cancel for analytics. On decline, it injects context into the conversation suggesting alternatives: proceed without the input, offer CLI args, or use defaults. The result: you can enforce security policies on third-party MCP servers without modifying their code.

Why It Matters (Opinion)

Elicitation solves the "configuration by conversation" anti-pattern. Before this, MCP servers had two choices: 1. Guess from context (wrong half the time) 2. Ask via the LLM chat (unstructured, no validation, credentials in context) Form mode gives you schema validation at input time. URL mode keeps secrets out of the LLM context entirely. The hook system lets you build guardrails without forking every MCP server you use. This is the kind of infrastructure primitive that makes the MCP ecosystem actually trustworthy for production use.

Code Example (Server-Side)

```python @mcp.tool() async def configure_search(ctx: Context) -> str: result = await ctx.session.create_elicitation( mode="form", message="Configure your search preferences", requestedSchema={ "type": "object", "properties": { "query": {"type": "string", "minLength": 1}, "category": { "type": "string", "enum": ["docs", "code", "issues"], "default": "docs", }, "max_results": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10, }, }, "required": ["query"], }, ) if result.action == "accept": return search(result.content) elif result.action == "decline": return "Search cancelled." else: return "Search dismissed. Using defaults." ```

Thread / Short-Form Version

Claude Code 2.1.76 shipped MCP Elicitation and it changes how MCP servers collect user input. Before: servers guess config from context or ask through chat. Unstructured, unvalidated, credentials floating in the LLM window. After: servers send a JSON Schema, CC renders a form dialog. Users fill validated fields. Secrets go through the browser instead. We built two hooks in OrchestKit to enforce this: - elicitation-guard: blocks form-mode requests for passwords, API keys, tokens - elicitation-result-logger: tracks outcomes, suggests alternatives on decline The key insight: you can enforce security policies on any MCP server without modifying its code. Hook into the elicitation event, inspect the schema, block if needed. This is what makes MCP production-ready.