Table of Contents

Class StdioClientTransportOptions

Namespace
ModelContextProtocol.Protocol.Transport
Assembly
ModelContextProtocol.dll

Provides options for configuring StdioClientTransport instances.

public record StdioClientTransportOptions : IEquatable<StdioClientTransportOptions>
Inheritance
StdioClientTransportOptions
Implements
Inherited Members

Properties

Arguments

Gets or sets the arguments to pass to the server process when it is started.

public IList<string>? Arguments { get; set; }

Property Value

IList<string>

Command

Gets or sets the command to execute to start the server process.

public required string Command { get; set; }

Property Value

string

EnvironmentVariables

Gets or sets environment variables to set for the server process.

public Dictionary<string, string>? EnvironmentVariables { get; set; }

Property Value

Dictionary<string, string>

Remarks

This property allows you to specify environment variables that will be set in the server process's environment. This is useful for passing configuration, authentication information, or runtime flags to the server without modifying its code.

Name

Gets or sets a transport identifier used for logging purposes.

public string? Name { get; set; }

Property Value

string

ShutdownTimeout

Gets or sets the timeout to wait for the server to shut down gracefully.

public TimeSpan ShutdownTimeout { get; set; }

Property Value

TimeSpan

Remarks

This property dictates how long the client should wait for the server process to exit cleanly during shutdown before forcibly terminating it. This balances between giving the server enough time to clean up resources and not hanging indefinitely if a server process becomes unresponsive.

The default is five seconds.

WorkingDirectory

Gets or sets the working directory for the server process.

public string? WorkingDirectory { get; set; }

Property Value

string