You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for custom configuration directory via CLAUDE_CONFIG_DIR environment variable
- Introduced environment variable handling in the MCP CLI for custom config paths.
- Updated config.yml to include CLAUDE_CONFIG_DIR in path checks.
- Implemented isPathValid function to validate paths with environment variables.
- Added tests for path validation and configuration updates with environment variables.
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,26 @@ The MCP CLI uses several configuration files:
192
192
Configuration files are typically stored in `~/.docker/mcp/`. This is in this directory that Docker Desktop's
193
193
MCP Toolkit with store its configuration.
194
194
195
+
### Environment Variables
196
+
197
+
The MCP CLI respects the following environment variables for client configuration:
198
+
199
+
-**`CLAUDE_CONFIG_DIR`**: Override the default Claude Code configuration directory (`~/.claude`). When set, Claude Code will use `$CLAUDE_CONFIG_DIR/.claude.json` instead of `~/.claude.json` for its MCP server configuration. This is useful for:
200
+
- Maintaining separate Claude Code installations for work and personal use
201
+
- Testing configuration changes in isolation
202
+
- Managing multiple Claude Code profiles
203
+
204
+
Example usage:
205
+
```bash
206
+
# Set custom Claude Code configuration directory
207
+
export CLAUDE_CONFIG_DIR=/path/to/custom/config
208
+
209
+
# Connect MCP Gateway to Claude Code
210
+
docker mcp client connect claude-code --global
211
+
212
+
# Claude Code will now use /path/to/custom/config/.claude.json
0 commit comments