Support for await using pattern (automatic close).
Set of connected clients tracked by this registry. Automatically populated when using registry.connect().
Close all clients and servers gracefully. Stops new connections, waits for in-flight connections, closes tracked clients, and then stops only processes owned by this registry. Stdio children receive stdin EOF first and the requested signal on POSIX if they remain open; owned HTTP children may use their configured application-specific stop command. POSIX cleanup tracks the detached process group; Windows can terminate only the direct child and cannot verify descendants. Cleanup failures are reported after every owned resource has been attempted.
Optionalsignal: Signals
Signal to send to processes (default: SIGINT)
Optionalopts: { timeoutMs?: number }
Options including timeout
Promise resolving to whether any process timed out and how many required emergency force termination
The resolved servers configuration that was used. Useful for debugging and understanding what was started.
Connect to a server by name. The connected client is automatically tracked for close.
Server name from configuration
Optionaloptions: {Authentication, logging, and protocol negotiation options
Connected MCP SDK Client
Search indexed capabilities across all currently connected clients. Requires at least one connected client; respects SearchOptions filters.
A registry of spawned MCP servers with connection management. Provides access to individual server handles, connection management, and collection-wide close.