[BUG] VS Code extension hardcodes CLAUDE_CODE_ENTRYPOINT=claude-vscode, which suppresses all local stdio MCP servers

Status Open
Reported on v2.1.233
Maintainer reply None cached
Activity 0 comments · opened Aug 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The VS Code extension unconditionally sets CLAUDE_CODE_ENTRYPOINT=claude-vscode in the environment it passes to the spawned CLI process. With that value set, all local stdio
MCP servers are silently suppressed: they are never spawned, never connected, and no mcp__* tools are exposed to the model. /mcp reports "No MCP servers configured".

The exact same configuration works correctly in the standalone CLI.

Root cause, from extension.js (2.1.233). The function that builds the child-process environment sets the variable AFTER the loop that applies the user's claudeCode.environmentVariables setting, so it cannot be overridden from settings:

function Dm(e) {
let t = getEnvVarsSetting(), r = { ...process.env };
r.MCP_CONNECTION_NONBLOCKING = "true";
r.CLAUDE_CODE_ENABLE_TASKS = "0";
for (let n of t) if (n.name) r[n.name] = n.value || ""; // user vars applied here
return r.CLAUDE_CODE_ENTRYPOINT = "claude-vscode", // <-- set after; not overridable
delete r.CLAUDECODE, delete r.CLAUDE_CODE_CHILD_SESSION, r;
}

The variable is the sole cause. I isolated it by running the CLI from a plain terminal and varying only CLAUDE_CODE_ENTRYPOINT:

CLAUDE_CODE_ENTRYPOINT=claude-vscode claude mcp list -> server absent
CLAUDE_CODE_ENTRYPOINT=cli claude mcp list -> server "Connected"
CLAUDE_CODE_ENTRYPOINT=vscode claude mcp list -> server "Connected"
CLAUDE_CODE_ENTRYPOINT=sdk-py claude mcp list -> server "Connected"
(unset) claude mcp list -> server "Connected"

MCP_CONNECTION_NONBLOCKING was ruled out: setting it to "true" in a terminal session does not reproduce the suppression.

Notably, the extension's "Claude Code: Open in Terminal" path does NOT go through this function. It calls vscode.window.createTerminal with env: { NoDefaultCurrentDirectoryInExePath: "1" } only, so CLAUDE_CODE_ENTRYPOINT is never set and MCP servers load normally there. This asymmetry is what makes the workaround below viable and further confirms the diagnosis.

What Should Happen?

MCP servers configured in .mcp.json / ~/.claude.json should connect in extension sessions exactly as they do in the CLI, and their mcp__* tools should be available to the model. The entrypoint identifier is telemetry/UX metadata and should not gate MCP transport initialization.

Error Messages/Logs

No error is emitted anywhere. That is a significant part of the problem: the failure is
completely silent. There is no message in the Claude Code output channel, no MCP
connection error, no warning that servers were skipped. /mcp simply reports:

  No MCP servers configured. Please run /doctor if this is unexpected.

/doctor reports no issues. The server itself never receives a spawn attempt (verified:
the Python process never starts).

Steps to Reproduce

  1. Configure any local stdio MCP server in the project's .mcp.json, e.g.:

{
"mcpServers": {
"assessment-ai": {
"command": "C:\\path\\to\\.venv\\Scripts\\python.exe",
"args": ["-m", "mcp_server"]
}
}
}

  1. Approve it so trust is not a factor. Confirm in ~/.claude.json that the project entry has "hasTrustDialogAccepted": true and "enabledMcpjsonServers": ["assessment-ai"].
  1. From a normal terminal, run: claude mcp list

-> "assessment-ai: ... - Connected" (works)

  1. In the same terminal, run: CLAUDE_CODE_ENTRYPOINT=claude-vscode claude mcp list

-> the server is absent from the output (reproduces the bug outside the extension)

  1. Open a new session in the VS Code extension's native panel/sidebar UI.
  1. Run /mcp

-> "No MCP servers configured."

  1. In the same session, send the prompt:

"What tools do you have available whose names start with mcp__? List them exactly."
-> "None. No MCP server tools are currently connected." (This rules out the possibility that /mcp is merely a display bug: the tools genuinely are not present in the model's tool set.)

  1. Ctrl+Shift+P -> "Claude Code: Open in Terminal", then run /mcp in that session

-> the server connects normally.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

CLI: 2.1.233 VS Code extension: 2.1.233 (anthropic.claude-code-2.1.233-win32-x64) Also reproduced on extension 2.1.232.

Platform

Other

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

Workaround
----------
Use Ctrl+Shift+P -> "Claude Code: Open in Terminal" instead of the native panel UI.
That code path does not set CLAUDE_CODE_ENTRYPOINT, so MCP servers load correctly.
Note that the "claudeCode.useTerminal": true setting alone is not sufficient if you open Claude from the sidebar icon, which always renders the native webview; the command palette command must be used.

Things I ruled out during investigation, to save reviewer time
--------------------------------------------------------------

  • --strict-mcp-config: the extension never passes it.
  • Trust / approval state: hasTrustDialogAccepted and enabledMcpjsonServers are correct in ~/.claude.json, under BOTH the backslash and forward-slash forms of the project path (Windows stores both).
  • settingSources: confirmed ["user","project","local"] in the extension.
  • Managed/enterprise settings: none present.
  • An invalid "mcpServers" key in settings.json files: removed; not the cause.
  • MCP_CONNECTION_NONBLOCKING=true: not the cause (tested in isolation).
  • getAdditionalMcpServers() returns {} in the VS Code subclass, so the extension is not injecting or replacing the server list; it relies on the CLI's normal discovery.

Suggested fixes, in order of preference
---------------------------------------

  1. Decouple MCP initialization from the entrypoint identifier entirely. Whatever behavior "claude-vscode" is meant to select should not include disabling stdio MCP.
  2. If some MCP behavior genuinely must differ for the extension, gate it behind an explicit, documented variable rather than overloading the entrypoint name.
  3. At minimum, move the CLAUDE_CODE_ENTRYPOINT assignment BEFORE the claudeCode.environmentVariables loop so users can override it as an escape hatch, and emit a warning when configured MCP servers are skipped instead of failing silently.

Related issues
--------------
#19054 and #24770 describe the same user-visible symptom (MCP works in the CLI, invisible in the VS Code extension) without identifying a cause. I believe this is the underlying mechanism for at least a subset of those reports. Note that some commenters there suggest the servers are actually running and only /mcp's display is broken; step 7 above shows that is not the case here -- the tools are genuinely absent from the model's tool set.

View original on GitHub ↗