Add InheritEnvironmentVariables to StdioClientTransportOptions (#1563)

This commit is contained in:
Stephen Halter 2026-05-08 10:38:48 -07:00 • committed by GitHub
commit 3686a4af75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,8 @@ var mcpClient = await McpClient.CreateAsync(
Command = "npx",
Arguments = ["-y", "--verbose", "@modelcontextprotocol/server-everything"],
Name = "Everything",
InheritEnvironmentVariables = false,
EnvironmentVariables = StdioClientTransportOptions.GetDefaultEnvironmentVariables(),
}),
clientOptions: new()
{
@ -82,4 +84,4 @@ while (true)
Console.WriteLine();
messages.AddMessages(updates);
}
}