McpClient.spawn

Launch an MCP server as a subprocess and build a client over its stdin/stdout (stderr inherited for logging). command is the command line (command[0] is the executable). The returned client is NOT yet initialized — call initialize() (or ping() for a stateless probe). close() runs the MCP stdio shutdown sequence on the subprocess.

class McpClient
static @safe
spawn
(
string[] command
,
Implementation clientInfo = Implementation("dlang-mcp-client", "0.1.0")
)