@@ -127,6 +127,7 @@ func (r *RootCmd) mcpConfigureClaudeCode() *serpent.Command {
127
127
appStatusSlug string
128
128
testBinaryName string
129
129
aiAgentAPIURL url.URL
130
+ claudeUseBedrock string
130
131
131
132
deprecatedCoderMCPClaudeAPIKey string
132
133
)
@@ -154,14 +155,15 @@ func (r *RootCmd) mcpConfigureClaudeCode() *serpent.Command {
154
155
configureClaudeEnv [envAgentURL ]= agentClient .SDK .URL .String ()
155
156
configureClaudeEnv [envAgentToken ]= agentClient .SDK .SessionToken ()
156
157
}
157
- if claudeAPIKey == "" {
158
- if deprecatedCoderMCPClaudeAPIKey = ="" {
159
- cliui .Warnf (inv .Stderr ,"CLAUDE_API_KEY isnot set. " )
160
- } else {
161
- cliui . Warnf ( inv . Stderr , "CODER_MCP_CLAUDE_API_KEY is deprecated, use CLAUDE_API_KEY instead" )
162
- claudeAPIKey = deprecatedCoderMCPClaudeAPIKey
163
- }
158
+
159
+ if deprecatedCoderMCPClaudeAPIKey ! ="" {
160
+ cliui .Warnf (inv .Stderr ,"CODER_MCP_CLAUDE_API_KEY isdeprecated, use CLAUDE_API_KEY instead " )
161
+ claudeAPIKey = deprecatedCoderMCPClaudeAPIKey
162
+ }
163
+ if claudeAPIKey == "" && claudeUseBedrock != "1" {
164
+ cliui . Warnf ( inv . Stderr , "CLAUDE_API_KEY is not set." )
164
165
}
166
+
165
167
if appStatusSlug != "" {
166
168
configureClaudeEnv [envAppStatusSlug ]= appStatusSlug
167
169
}
@@ -280,6 +282,14 @@ func (r *RootCmd) mcpConfigureClaudeCode() *serpent.Command {
280
282
Value :serpent .StringOf (& testBinaryName ),
281
283
Hidden :true ,
282
284
},
285
+ {
286
+ Name :"claude-code-use-bedrock" ,
287
+ Description :"Use Amazon Bedrock." ,
288
+ Env :"CLAUDE_CODE_USE_BEDROCK" ,
289
+ Flag :"claude-code-use-bedrock" ,
290
+ Value :serpent .StringOf (& claudeUseBedrock ),
291
+ Hidden :true ,
292
+ },
283
293
},
284
294
}
285
295
return cmd