Repository navigation
Conversation
Claude Code fetches the connectors on the signed-in claude.ai account (Gmail, Drive, ...) by default. A project container should get MCP from its plugins and the image's managed settings only, so both templates set ENABLE_CLAUDEAI_MCP_SERVERS=false in containerEnv. Template, not managed settings: disableClaudeAiConnectors is any-source-true, so a managed `true` would leave no project a way to turn connectors back on.
…alone The comment said a project container gets MCP from its plugins only, and the README from plugins and managed settings only; the project's .mcp.json loads too. Both now say the variable turns off every connector Claude Code fetches, Anthropic's own Claude Docs included. The README also says why the native disableClaudeAiConnectors setting, which the docs suggest per project, isn't used: a project .claude/settings.json follows the repo to the host.
# Conflicts: # claude-code/.devcontainer/claude-sandbox/devcontainer.json
gatezh
changed the base branch from
master
to
claude-code/firewall-claude-hosts
November 27, 2026 20:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Both
claude-codetemplates setENABLE_CLAUDEAI_MCP_SERVERS=falseincontainerEnv, so Claude Code in the container doesn't fetch the connectors on the signed-in claude.ai account.Why
For claude.ai-authenticated users, Claude Code fetches the account's connectors by default (Gmail, Drive and the rest, plus Anthropic's own such as Claude Docs) and routes them through
mcp-proxy.anthropic.com(network requirements). A project container should get MCP servers from its plugins, its.mcp.jsonand the image's managed settings. Personal mailbox and drive tools don't belong next to project code, and in the sandbox the agent runs with permission prompts skipped. A downstream project has run this setting in its default variant without problems.Mechanism
The docs say
ENABLE_CLAUDEAI_MCP_SERVERS=falseanddisableClaudeAiConnectors: truehave the same effect on the connectors Claude Code fetches itself, in terminal and VS Code sessions. Whichever one turns the connectors off, the other can't turn them back on.containerEnv. It reaches every process in the container, both the extension host and terminals. It stays inside the container, and a project that wants its connectors back deletes one line.disableClaudeAiConnectorsin the image'smanaged-settings.json. The setting is any-source-true, so no project could undo a managedtruewithout rebuilding the image.disableClaudeAiConnectorsin the template's.claude/settings.json. The env-vars docs recommend this for per-project use. But a project's settings file also applies to Claude Code on the host in the same repo, not just inside the container.Changes
claude-code/.devcontainer/devcontainer.jsonandclaude-code/.devcontainer/claude-sandbox/devcontainer.json: the env var, with a short why-comment.claude-code/README.md: a "claude.ai connectors are off" note under the MCP section. It covers what's turned off, what still loads, how to opt back in, and why this isn't the native setting.Notes
setup-tokentoken can't fetch connectors anyway (docs), so in the sandbox the variable matters only when someone signs in there instead. fix(claude-code, claude-bun): sync the firewall's Claude hosts with the network requirements #314 documents that sign-in works through the firewall, andmcp-proxy.anthropic.comsharesapi.anthropic.com's IP, so connectors would load there without this line.containerEnv.ENABLE_CLAUDEAI_MCP_SERVERSis"false"in each. The Claude Code 2.1.332 binary in the published image reads the variable. Nothing in the image changes, soverify-image.shand CI are unaffected.containerEnv, so nothing goes stale.devcontainer-upstream-syncaudit, which tracksdevcontainer.jsonas framework-track.