docs(claude): fix Docker install commands for claude mcp add - #3045
Draft
syf2211 wants to merge 1 commit into
Draft
docs(claude): fix Docker install commands for claude mcp add#3045syf2211 wants to merge 1 commit into
syf2211 wants to merge 1 commit into
Conversation
Remove unsupported -e flags from claude mcp add and pass environment variables through docker run instead. Fixes incorrect CLI usage that produced 'error: unknown option -e'. Fixes github#3032
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.
Summary
Fix incorrect
claude mcp addDocker install examples that pass-eflags to the Claude CLI, which fails witherror: unknown option '-e'. Environment variables are now passed throughdocker runafter--.Motivation
Fixes #3032. Users following the Claude Docker setup docs hit CLI errors because
claude mcp adddoes not accept-e; onlydocker runshould receive environment flags for containerized servers.Changes
-efromclaude mcp add; setGITHUB_OAUTH_CALLBACK_PORT=8085ondocker runGITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PATviadocker run -edocker run -e GITHUB_PERSONAL_ACCESS_TOKENpass-throughGITHUB_PAT→GITHUB_PERSONAL_ACCESS_TOKENbefore running DockerTests
Documentation-only change. Verified:
claude mcp add ... -epatterns in modified filesdocs/oauth-login.mdport/env conventionsNotes
Claude Desktop JSON configs in the same guide already pass env vars via
docker runargs and were left unchanged.Fixes #3032