Concurrent slicer mcp session

Sometimes I run two agents simultaneously for different tasks. these tasks are often executed in different Slicer sessions also running concurrently (e.g., stable vs a preview version, or different code branches being tested simultaneously).

The issue is my slicerrc.py calls the slicer-skill/slicer-mcp-server.py at main · pieper/slicer-skill · GitHub to auto start the mcp session. If I start two slicer sessions concurrently these mcp servers collide.

Did anyone have a robust solution on how to handle concurrency?

Yes, I do that often. I start the two servers on different ports in different instances or Slicer (look at the port it reports at startup or specify the port manually). You can tell the Claude which port to use via the .mcp.json (restart the window in vscode) or just tell Claude to use that port and it figures out to use curl to do it.