Describe the Bug
Environment collision when adding 2 or more instances of the same MCP server with different configs
See example: cursor correctly sees 2 mcp servers, but when interacting with them, they actually connect to the same clickhouse machine (both connect to HOST_A)
I suspect this is not a clickouse bug, but rather a bug in how cursor spins up multiple instances of MCP clients
Steps to Reproduce
Add these to your config:
// mcp.json
{
"mcpServers": {
"mcp-clickhouse-A": {
"comment": "Clickhouse MCP server for the A region",
"command": "uv",
"args": [ "run", "--with", "mcp-clickhouse", "--python", "3.13", "mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<HOST_A>",
"CLICKHOUSE_PORT": "<PORT_A>",
"CLICKHOUSE_USER": "<USER_A>",
"CLICKHOUSE_PASSWORD": "<PASSWORD_A>"
}
},
"mcp-clickhouse-B": {
"comment": "Clickhouse MCP server for the B region",
"command": "uv",
"args": [ "run", "--with", "mcp-clickhouse", "--python", "3.13", "mcp-clickhouse"
],
"env": {
"CLICKHOUSE_HOST": "<HOST_B>",
"CLICKHOUSE_PORT": "<PORT_B>",
"CLICKHOUSE_USER": "<USER_B>",
"CLICKHOUSE_PASSWORD": "<PASSWORD_B>"
}
}
}
}
Expected Behavior
I expect mcp-clickhouse-A and mcp-clickhouse-B to connect to different servers
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.1.5
VSCode Version: 1.96.2
Commit: ef5eeb47a684b4c217dfaf0463aa7ea952f8ab90
Date: 2025-06-21T05:23:57.743Z (4 days ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0
Does this stop you from using Cursor
No - Cursor works, but with this issue