microsoft / microsoft/vscode

Agent sessions: MCP servers requiring promptString inputs or OAuth fail silently — tools absent with no surfaced error or support documentation

Open
#334,271 1 comment 0 reactions 2 assignees Claimed by @roblourens View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

### Summary

MCP servers whose activation requires something interactive — `${input:...}` promptString variables or first-use OAuth — fail **silently** in Copilot **agent sessions** (Agents surface / background sessions): the server never starts, none of its tools are registered, and no error is surfaced anywhere. The agent simply runs without those tools. In interactive editor chat the same config works because VS Code prompts for the input / completes OAuth.

Beyond the interactive-activation cases, the reporter's observation is that **MCP tools are absent in agent sessions generally** (including plain HTTP servers with static auth headers that need no interaction) — so this may be either a silent-activation bug or a broader "MCP not supported yet in agent sessions" gap. Either way there is currently **no surfaced signal and no documentation** of what MCP support exists on that surface, which makes it indistinguishable from a config error.

### Steps to Reproduce

1. Configure an MCP server that needs an interactive input on start, e.g. a stdio server with `env: { API_KEY: "${input:apiKey}" }` (promptString), or an HTTP server requiring OAuth authorization on first use.
2. Use it in **editor chat** — VS Code prompts for the input / OAuth; server starts; tools appear.
3. Start a **Copilot agent session** (Agents surface) on the same workspace with the same user `mcp.json`.
4. Observe: server never activates, its tools are absent from the agent's toolset, and no error/warning is shown in the session UI.

### Expected

One of:
- The activation failure is surfaced in the agent-session UI ("MCP server X pending input / unauthorized"), ideally with a deeplink to resolve the input or complete OAuth, after which tools become available mid-session.
- Inputs pre-resolved from secret storage so agent sessions can start servers non-interactively.
- At minimum: the agent is told the server is unavailable and why, and the docs state which MCP features agent sessions support.

### Actual

Silent absence. User discovers the gap only by noticing the agent lacks capabilities it has in editor chat on the identical config.

### Environment

- VS Code 1.136.0, macOS arm64
- Repro'd with: (a) stdio server (`npx @z_ai/mcp-server`) gated on a `${input:promptString}` API key; (b) HTTP server behind OAuth (`https://mcp.firecrawl.dev`); (c) workspace-level `.vscode/mcp.json` server gated on a promptString password input.
- Same workspace, same config: tools present in editor chat, absent in agent sessions.

Filed from real usage comparison. Happy to provide session IDs / tool dumps if useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.