[BUG] StdioClientTransport fails to connect on Windows when used inside Visual Studio (VSIX) / WPF (.NET Framework 4.8)

Resolved 💬 3 comments Opened Dec 3, 2025 by neerajwadhwani12 Closed Dec 7, 2025

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When StdioClientTransport is used inside a .NET Framework 4.8 application — specifically a Visual Studio Extension (VSIX) or a WPF app — the MCP client consistently fails with:

IOException: Failed to connect transport.

The same code works correctly in:

  • .NET 6/7/8 console apps
  • .NET Core WPF
  • VS Code extensions
  • Windows Terminal

So the failure occurs only when the host process is .NET Framework + Visual Studio.

Environment

  • OS: Windows 11
  • Host: Visual Studio 2022, VSIX Extension
  • Framework: .NET Framework 4.8
  • MCP SDK Version: 0.4.0-preview.2 and 0.4.1-preview.1
  • Transport: StdioClientTransport

What Should Happen?

var transport = new StdioClientTransport(new StdioClientTransportOptions
{
Command = "docker",
Arguments = new[] { "run", "-i", "--rm", "mcp/time" }
});

var client = await McpClient.CreateAsync(transport);
var tools = await client.ListToolsAsync();

Expected
Should connect to the stdio MCP server and list tools.

Actual
IOException: Failed to connect transport.
---> Failed to start MCP server process.

Error Messages/Logs

IOException: Failed to connect transport.
   ---> Failed to start MCP server process.

Steps to Reproduce

var transport = new StdioClientTransport(new StdioClientTransportOptions
{
Command = "docker",
Arguments = new[] { "run", "-i", "--rm", "mcp/time" }
});

var client = await McpClient.CreateAsync(transport);
var tools = await client.ListToolsAsync();

Should connect to the stdio MCP server and list tools.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

0.3.x

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗