Skip to content

Commit 07ae135

Browse files
author
colinmcneil
committed
Fix bug with claude config
1 parent 1389cce commit 07ae135

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extension/ui/src/mcp-clients/ClaudeDesktop.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { getUser } from "../FileWatcher";
33
import { MCPClient } from ".";
44
import { DOCKER_MCP_COMMAND } from "../Constants";
55

6-
const DOCKER_MCP_CONFIG = {
6+
const SAMPLE_MCP_CONFIG = {
77
mcpServers: {
88
MCP_DOCKER: {
99
"command": DOCKER_MCP_COMMAND.split(' ')[0],
@@ -22,7 +22,7 @@ class ClaudeDesktopClient implements MCPClient {
2222
'Click on the <strong>Edit Config</strong> button',
2323
'Add MCP_DOCKER to <code>mcpServers</code> section:' +
2424
'<pre style="font-family: monospace; overflow: auto; width: 80%; background-color: grey.200; padding: 1; border-radius: 1; font-size: 12px;">' +
25-
JSON.stringify(DOCKER_MCP_CONFIG, null, 2) +
25+
JSON.stringify(SAMPLE_MCP_CONFIG, null, 2) +
2626
'</pre>'
2727
]
2828
expectedConfigPath = {
@@ -75,14 +75,14 @@ class ClaudeDesktopClient implements MCPClient {
7575
path = path.replace('$USER', user)
7676
let payload = {
7777
mcpServers: {
78-
mcp_docker: DOCKER_MCP_CONFIG
78+
mcp_docker: SAMPLE_MCP_CONFIG.mcpServers.MCP_DOCKER
7979
}
8080
}
8181
try {
8282
const result = await client.docker.cli.exec('run', ['--rm', '--mount', `type=bind,source="${path}",target=/claude_desktop_config`, 'alpine:latest', 'sh', '-c', `"cat /claude_desktop_config/claude_desktop_config.json"`])
8383
if (result.stdout) {
8484
payload = JSON.parse(result.stdout)
85-
payload.mcpServers.mcp_docker = DOCKER_MCP_CONFIG
85+
payload.mcpServers.mcp_docker = SAMPLE_MCP_CONFIG.mcpServers.MCP_DOCKER
8686
}
8787
} catch (e) {
8888
// No config or malformed config found, overwrite it

0 commit comments

Comments
 (0)