What problem does it solve?
Provides clear, deterministic patterns for running and shutting down Docker-backed MCP servers so agents and tools do not leave orphaned containers, mis-detect transports, or collide when multiple agents run the same server.
Core Features & Use Cases
- Transport Auto-Detection: Races stdio connect and stderr URL detection to automatically switch between stdio and HTTP transports.
- Two-Phase Container Naming: Uses probe and managed container name phases to avoid naming collisions between concurrent agents.
- Deterministic Cleanup: Enforces docker rm -f as the only reliable way to stop and remove containers and documents calling cleanupMcpTransport(serverName) from agent lifecycle hooks.
- Use Case: Ideal for developers adding MCP client support to local tooling, Cortex server imports, or CI tests that mock Docker subprocesses.
Quick Start
Start the MCP server container with a standard MCPServerConfig, let the client auto-detect stdio or HTTP transport, and always call cleanupMcpTransport(serverName) when finished.