Description
When using the same account VS Code will always reuse a running Shell process, however when running the shell for multiple accounts, it will run a new shell for each account. This is expected behaviour because of authentication complexity (depending on the account we need to use ENV vars - for security reasons - which can not be injected into a running process).
Problem
The problem is MCP in this constellation: MCP will be only enabled for the first Shell process, so in order to switch MCP to another account one either needs Copilot to take care of authentication (it might or might not work, depends on the configuration and operating system) or the user needs to shot down all shell processes and start a new shell that becomes the MCP host.
Easiest solution
When starting a new Shell process we already know that/if another Shell is running and turn off MCP for the new instance. We should show a warning notification (and also maybe dump a warning log entry) if MCP is enabled in settings and this collision occurs saying something like:
New CosmosDBShell process started for {endpoint} with MCP support disabled. Stop other CosmosDBShell processes and restart to enable MCP for this account".
Description
When using the same account VS Code will always reuse a running Shell process, however when running the shell for multiple accounts, it will run a new shell for each account. This is expected behaviour because of authentication complexity (depending on the account we need to use ENV vars - for security reasons - which can not be injected into a running process).
Problem
The problem is MCP in this constellation: MCP will be only enabled for the first Shell process, so in order to switch MCP to another account one either needs Copilot to take care of authentication (it might or might not work, depends on the configuration and operating system) or the user needs to shot down all shell processes and start a new shell that becomes the MCP host.
Easiest solution
When starting a new Shell process we already know that/if another Shell is running and turn off MCP for the new instance. We should show a warning notification (and also maybe dump a warning log entry) if MCP is enabled in settings and this collision occurs saying something like: