Table of Contents

Method ForStdio

Namespace
LMKit.Mcp.Client
Assembly
LM-Kit.NET.dll

ForStdio(string, string)

Creates a builder configured for stdio transport.

public static McpClientBuilder ForStdio(string command, string arguments = null)

Parameters

command string

The command to execute (e.g., "npx", "python", "uvx").

arguments string

Command-line arguments (optional).

Returns

McpClientBuilder

A new builder instance configured for stdio transport.

Examples

// Node.js MCP server
var builder = McpClientBuilder.ForStdio("npx", "@modelcontextprotocol/server-filesystem /tmp");

// Python MCP server
var builder = McpClientBuilder.ForStdio("python", "-m my_mcp_server");

// UV-based Python server
var builder = McpClientBuilder.ForStdio("uvx", "mcp-server-git");

// Native executable
var builder = McpClientBuilder.ForStdio("/path/to/mcp-server", "--verbose");

Exceptions

ArgumentException

Thrown when command is null or whitespace.

ForStdio(StdioTransportOptions)

Creates a builder configured for stdio transport with detailed options.

public static McpClientBuilder ForStdio(StdioTransportOptions options)

Parameters

options StdioTransportOptions

The stdio transport options.

Returns

McpClientBuilder

A new builder instance configured for stdio transport.

Exceptions

ArgumentNullException

Thrown when options is null.