VS Code extension silently declines MCP elicitation requests (onElicitation callback not implemented)

Resolved 💬 3 comments Opened Mar 31, 2026 by ken2025-art Closed Apr 3, 2026

Description

The Claude Code VS Code extension silently declines all MCP elicitation requests (elicitation/create). The user never sees any confirmation prompt — the SDK automatically returns {action: "decline"} because the extension does not register an onElicitation callback.

This affects any MCP server that uses elicitation for user confirmation, not just a specific server.

Root Cause

After inspecting the extension source code (extension.js):

  1. MCP server sends elicitation/create request via MCP protocol
  2. Claude Code SDK receives it and checks this.onElicitation
  3. The VS Code extension never passes an onElicitation callback in the options object to spawnClaude()
  4. Since this.onElicitation is undefined, the SDK immediately returns {action: "decline"}
  5. The MCP server receives the decline → operation fails

Reproduction

  1. Install any MCP server that uses elicitation (e.g., Power BI Modeling MCP v0.5.1+)
  2. Use Claude Code VS Code extension to invoke an operation that triggers elicitation
  3. No confirmation prompt appears to the user
  4. The operation fails with a "declined" error

Environment

  • OS: Windows 11
  • VS Code: 1.113.0 (latest)
  • Claude Code Extension: v2.1.87 / v2.1.88
  • Tested MCP server: Power BI Modeling MCP v0.5.1

Key Evidence: Works in Claude Desktop, fails in VS Code

| Environment | Elicitation | Result |
|---|---|---|
| Claude Desktop (CLI) | ✅ Prompt shown | Works |
| Claude Code (VS Code extension) | ❌ Auto-declined | Fails |
| GitHub Copilot (VS Code) | ❌ Similar failure | Fails |

Claude Desktop works because the CLI has its own terminal-based elicitation handling. The VS Code extension uses the SDK programmatically but hasn't implemented a UI-based elicitation handler.

Impact

This affects ALL MCP servers that use elicitation for user confirmation — not limited to a specific server. As MCP adoption grows and more servers implement elicitation for safety/security purposes, this will impact a wider range of users.

Current Workaround

Server-specific: some MCP servers offer a --skipconfirmation flag to bypass elicitation entirely. But this is not ideal as it removes the safety confirmation layer.

Expected Behavior

The VS Code extension should implement an onElicitation handler that displays a dialog/prompt to the user, allowing them to approve or decline the operation.

Related

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗