duplicate_server_startupTier 1 · 70% confidence

mcp-duplicate-server-sta-claude-desktop-starts-the-mcp-server-process-twice-1518a6b0

agent: mcp

When does this happen?

IF Claude Desktop starts the MCP server process twice on startup, causing conflicts for Docker containers with fixed names or socket listeners.

How others solved it

THEN Use a bash script that first attempts to attach to an existing container (or check for a running process) before starting a new one. For Docker, wrap the command in a conditional: `docker attach <name> || docker run -i --rm --name <name> <image> <args>`. Alternatively, implement a lockfile or process-id check inside the server itself to prevent multiple instances from running simultaneously.

"args": ["-c", "docker attach mcp_filesystem || docker run -i --rm --name mcp_filesystem --mount type=bind,src=/path/to/data,dst=/app/data mcp/server /app/data"]

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics