docs/features/config-import.md
MCPProxy can import MCP server configurations from popular AI tools, making it easy to migrate your existing setups or consolidate servers from multiple sources.
| Source | Format | File Location |
|---|---|---|
| Claude Desktop | JSON | macOS: ~/Library/Application Support/Claude/claude_desktop_config.json |
Windows: %APPDATA%\Claude\claude_desktop_config.json | ||
Linux: ~/.config/Claude/claude_desktop_config.json | ||
| Claude Code | JSON | ~/.claude.json (all platforms) |
| Cursor IDE | JSON | ~/.cursor/mcp.json (all platforms) |
| Codex CLI | TOML | ~/.codex/config.toml (all platforms) |
| Gemini CLI | JSON | ~/.gemini/settings.json (all platforms) |
The Web UI provides a Quick Import panel that automatically detects installed AI tools on your system:
The panel shows:
You can also upload configuration files manually:
For quick imports without file access:
# Import from Claude Desktop config
mcpproxy upstream import ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Import from Claude Code config
mcpproxy upstream import ~/.claude.json
# Import with format hint (if auto-detect fails)
mcpproxy upstream import --format claude-desktop config.json
# Preview without importing
mcpproxy upstream import --dry-run config.json
# Import without quarantine (trusted configs)
mcpproxy upstream import --no-quarantine ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Import only a specific server by name
mcpproxy upstream import --server github-server config.json
Returns well-known configuration paths for the current OS with existence status:
curl -H "X-API-Key: your-key" \
http://127.0.0.1:8080/api/v1/servers/import/paths
Response:
{
"success": true,
"data": {
"os": "darwin",
"paths": [
{
"name": "Claude Desktop",
"format": "claude-desktop",
"path": "/Users/user/Library/Application Support/Claude/claude_desktop_config.json",
"exists": true,
"description": "Claude Desktop app configuration"
},
{
"name": "Claude Code (User)",
"format": "claude-code",
"path": "/Users/user/.claude.json",
"exists": true,
"description": "Claude Code user-level MCP servers"
}
]
}
}
Import servers by reading a file from the server's filesystem:
# Preview import
curl -X POST -H "X-API-Key: your-key" \
-H "Content-Type: application/json" \
-d '{"path": "/Users/user/.claude.json", "format": "claude-code"}' \
"http://127.0.0.1:8080/api/v1/servers/import/path?preview=true"
# Actual import
curl -X POST -H "X-API-Key: your-key" \
-H "Content-Type: application/json" \
-d '{"path": "/Users/user/.claude.json"}' \
http://127.0.0.1:8080/api/v1/servers/import/path
Import by posting configuration content directly:
curl -X POST -H "X-API-Key: your-key" \
-H "Content-Type: application/json" \
-d '{
"content": "{\"mcpServers\": {\"my-server\": {\"command\": \"npx\", \"args\": [\"-y\", \"@modelcontextprotocol/server-filesystem\"]}}}",
"format": "claude-desktop"
}' \
http://127.0.0.1:8080/api/v1/servers/import/json
Import by uploading a multipart form file:
curl -X POST -H "X-API-Key: your-key" \
-F "file=@/path/to/config.json" \
"http://127.0.0.1:8080/api/v1/servers/import?preview=true"
All import endpoints return a consistent response format:
{
"success": true,
"data": {
"format": "claude-desktop",
"format_name": "Claude Desktop",
"summary": {
"total": 5,
"imported": 3,
"skipped": 1,
"failed": 1
},
"imported": [
{
"name": "filesystem",
"protocol": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem"],
"source_format": "claude-desktop",
"original_name": "filesystem"
}
],
"skipped": [
{
"name": "existing-server",
"reason": "Server with this name already exists"
}
],
"failed": [
{
"name": "invalid-server",
"reason": "Missing required field: command",
"original_config": {}
}
],
"warnings": ["Server 'github' has no tools configured"]
}
}
MCPProxy auto-detects the configuration format by analyzing:
.toml → Codex CLI formatmcpServers object → Claude DesktopmcpServers with env at server level → Claude CodemcpServers in tools section → Gemini CLIYou can override auto-detection with the format parameter:
claude-desktopclaude-codecursorcodexgeminiWhen importing, MCPProxy checks for existing servers by name:
skipped array with reason