- Notifications
You must be signed in to change notification settings - Fork907
fix(cli): modifyexp mcp configure
to also read claude API key from CLAUDE_API_KEY env#17229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR updates the CLI configuration for Claude Code to support reading the API key from the canonical CLAUDE_API_KEY environment variable rather than only CODER_MCP_CLAUDE_API_KEY.
- Renames apiKey to claudeAPIKey and introduces a deprecated alias variable (claudeAPIKeyAlt) for backwards compatibility.
- Updates warning messages and command flag configurations to reflect the new canonical environment variable.
Comments suppressed due to low confidence (2)
cli/exp_mcp.go:144
- Consider implementing a fallback assignment where if claudeAPIKey is empty but claudeAPIKeyAlt is provided, claudeAPIKey is set to claudeAPIKeyAlt. This change would allow users to rely on the deprecated alias during the transition period.
if claudeAPIKey == "" && claudeAPIKeyAlt == "" {
cli/exp_mcp.go:114
- [nitpick] Consider renaming 'claudeAPIKeyAlt' to 'deprecatedClaudeAPIKey' to more clearly indicate that this alias is temporary and will be removed in a future version.
claudeAPIKeyAlt string
exp mcp configure
to also read claude API key from CLAUDE_API_KEY env4aa45a5
intomainUh oh!
There was an error while loading.Please reload this page.
Currently you have to set
CODER_MCP_CLAUDE_API_KEY
, which can be obnoxious.