Skip to content

Commit a3b3292

Browse files
Merge branch 'main' into fix-amp-module-1
2 parents b1315f4 + dd412fb commit a3b3292

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

registry/coder/modules/claude-code/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run the [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude
1313
```tf
1414
module "claude-code" {
1515
source = "registry.coder.com/coder/claude-code/coder"
16-
version = "4.2.1"
16+
version = "4.2.2"
1717
agent_id = coder_agent.example.id
1818
workdir = "/home/coder/project"
1919
claude_api_key = "xxxx-xxxxx-xxxx"
@@ -51,7 +51,7 @@ module "claude-code" {
5151
boundary_log_level = "WARN"
5252
boundary_additional_allowed_urls = ["GET *google.com"]
5353
boundary_proxy_port = "8087"
54-
version = "4.2.1"
54+
version = "4.2.2"
5555
}
5656
```
5757

@@ -70,7 +70,7 @@ data "coder_parameter" "ai_prompt" {
7070
7171
module "claude-code" {
7272
source = "registry.coder.com/coder/claude-code/coder"
73-
version = "4.2.1"
73+
version = "4.2.2"
7474
agent_id = coder_agent.example.id
7575
workdir = "/home/coder/project"
7676
@@ -89,9 +89,11 @@ module "claude-code" {
8989
mcp = <<-EOF
9090
{
9191
"mcpServers": {
92-
"my-custom-tool": {
93-
"command": "my-tool-server"
94-
"args": ["--port", "8080"]
92+
"memory": {
93+
"type": "stdio",
94+
"command": "npx",
95+
"args": ["-y", "@modelcontextprotocol/server-memory"],
96+
"env": {}
9597
}
9698
}
9799
}
@@ -106,7 +108,7 @@ Run and configure Claude Code as a standalone CLI in your workspace.
106108
```tf
107109
module "claude-code" {
108110
source = "registry.coder.com/coder/claude-code/coder"
109-
version = "4.2.1"
111+
version = "4.2.2"
110112
agent_id = coder_agent.example.id
111113
workdir = "/home/coder"
112114
install_claude_code = true
@@ -129,7 +131,7 @@ variable "claude_code_oauth_token" {
129131
130132
module "claude-code" {
131133
source = "registry.coder.com/coder/claude-code/coder"
132-
version = "4.2.1"
134+
version = "4.2.2"
133135
agent_id = coder_agent.example.id
134136
workdir = "/home/coder/project"
135137
claude_code_oauth_token = var.claude_code_oauth_token
@@ -202,7 +204,7 @@ resource "coder_env" "bedrock_api_key" {
202204
203205
module "claude-code" {
204206
source = "registry.coder.com/coder/claude-code/coder"
205-
version = "4.2.1"
207+
version = "4.2.2"
206208
agent_id = coder_agent.example.id
207209
workdir = "/home/coder/project"
208210
model = "global.anthropic.claude-sonnet-4-5-20250929-v1:0"
@@ -259,7 +261,7 @@ resource "coder_env" "google_application_credentials" {
259261
260262
module "claude-code" {
261263
source = "registry.coder.com/coder/claude-code/coder"
262-
version = "4.2.1"
264+
version = "4.2.2"
263265
agent_id = coder_agent.example.id
264266
workdir = "/home/coder/project"
265267
model = "claude-sonnet-4@20250514"

registry/coder/modules/claude-code/scripts/install.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,16 @@ function setup_claude_configurations() {
6868
mkdir -p "$module_path"
6969

7070
if [ "$ARG_MCP" != "" ]; then
71-
while IFS= read -r server_name && IFS= read -r server_json; do
72-
echo "------------------------"
73-
echo "Executing: claude mcp add \"$server_name\" '$server_json'"
74-
claude mcp add "$server_name" "$server_json"
75-
echo "------------------------"
76-
echo ""
77-
done < <(echo "$ARG_MCP" | jq -r '.mcpServers | to_entries[] | .key, (.value | @json)')
71+
(
72+
cd "$ARG_WORKDIR"
73+
while IFS= read -r server_name && IFS= read -r server_json; do
74+
echo "------------------------"
75+
echo "Executing: claude mcp add-json \"$server_name\" '$server_json' (in $ARG_WORKDIR)"
76+
claude mcp add-json "$server_name" "$server_json"
77+
echo "------------------------"
78+
echo ""
79+
done < <(echo "$ARG_MCP" | jq -r '.mcpServers | to_entries[] | .key, (.value | @json)')
80+
)
7881
fi
7982

8083
if [ -n "$ARG_ALLOWED_TOOLS" ]; then

0 commit comments

Comments
 (0)