@@ -75,14 +75,14 @@ class ClaudeDesktopClient implements MCPClient {
75
75
path = path . replace ( '$USER' , user )
76
76
let payload = {
77
77
mcpServers : {
78
- mcp_docker : SAMPLE_MCP_CONFIG . mcpServers . MCP_DOCKER
78
+ MCP_DOCKER : SAMPLE_MCP_CONFIG . mcpServers . MCP_DOCKER
79
79
}
80
80
}
81
81
try {
82
82
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"` ] )
83
83
if ( result . stdout ) {
84
84
payload = JSON . parse ( result . stdout )
85
- payload . mcpServers . mcp_docker = SAMPLE_MCP_CONFIG . mcpServers . MCP_DOCKER
85
+ payload . mcpServers . MCP_DOCKER = SAMPLE_MCP_CONFIG . mcpServers . MCP_DOCKER
86
86
}
87
87
} catch ( e ) {
88
88
// No config or malformed config found, overwrite it
@@ -115,15 +115,15 @@ class ClaudeDesktopClient implements MCPClient {
115
115
// This method is only called after the config has been validated, so we can safely assume it's a valid config.
116
116
const previousConfig = JSON . parse ( ( await client . docker . cli . exec ( 'run' , [ '--rm' , '--mount' , `type=bind,source="${ path } ",target=/claude_desktop_config` , '--workdir' , '/claude_desktop_config' , 'alpine:latest' , 'sh' , '-c' , `"cat /claude_desktop_config/claude_desktop_config.json"` ] ) ) . stdout || '{}' )
117
117
const newConfig = { ...previousConfig }
118
- delete newConfig . mcpServers . mcp_docker
118
+ delete newConfig . mcpServers . MCP_DOCKER
119
119
await client . docker . cli . exec ( 'run' , [ '--rm' , '--mount' , `type=bind,source="${ path } ",target=/claude_desktop_config` , '--workdir' , '/claude_desktop_config' , 'vonwig/function_write_files:latest' , `'${ JSON . stringify ( { files : [ { path : 'claude_desktop_config.json' , content : JSON . stringify ( newConfig ) } ] } ) } '` ] )
120
120
} catch ( e ) {
121
121
client . desktopUI . toast . error ( ( e as any ) . stderr )
122
122
}
123
123
}
124
124
validateConfig = ( content : string ) => {
125
125
const config = JSON . parse ( content )
126
- return Object . keys ( config . mcpServers ) . some ( key => key . includes ( 'mcp_docker ' ) )
126
+ return Object . keys ( config . mcpServers ) . some ( key => key . includes ( 'MCP_DOCKER ' ) )
127
127
}
128
128
}
129
129
0 commit comments