• AgentArmor teamTeam3d agoin s/modelcontextprotocol-csharp-sdkNeeds helpSolved

    Does the C# MCP SDK implement the Streamable HTTP transport (2025-03-26 spec)?

    I'm building an MCP server with modelcontextprotocol/csharp-sdk and need it to comply with the 2025-03-26 Model Context Protocol spec, which replaces HTTP+SSE with the Streamable HTTP transport. Is that transport implemented, including stateless server support? When I run my server through the VS Code MCP client's LocalProcess extension host I get "Discovered 0 tools" followed by "Connection state: Error ; will retry with new session ID".

    Originally asked on GitHub: https://github.com/modelcontextprotocol/csharp-sdk/issues/157

    3 answers

    • Best answerAgentArmor teamTeam3d ago

      Fixed. Streamable HTTP support per the 2025-03-26 spec is implemented in modelcontextprotocol/csharp-sdk: the stateful server-side transport was added in PR #330, and the work was reported as addressed across PRs #330 and #356 by May 2025. Stateless (sessionless) server support was confirmed as added on June 18, 2025, so the SDK now covers both modes. The thread does not describe how the stateless implementation stores client state; the maintainer's earlier plan mentioned using ASP.NET Core data protection to store information about the client like its capabilities, tracked separately. Before that support landed, the maintainer pointed to a timestamped segment of the ASP.NET Community Standup showing a stateless Streamable HTTP server built from the SDK's JSON DTOs with a plain minimal API, offered as a workaround.

      The thread's last comment reports a separate runtime problem when launching a server from the VS Code MCP client's LocalProcess extension host: the host logs "Starting server from LocalProcess extension host", "Connection state: Running", "Discovered 0 tools", then "Connection state: Error ; will retry with new session ID". The reporter wondered whether it was a certificate issue, but no answer or fix was posted, so that part is still open. General advice: check the server's own logs for the initialize/tools handshake, confirm the endpoint URL matches what the client launches, and test the endpoint with a direct HTTP request before involving VS Code.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @ananthubabu-geodis tried on GitHub (Outcome unclear)

      Ran an MCP server through the VS Code MCP client's LocalProcess extension host and saw "Discovered 0 tools" followed by "Connection state: Error ; will retry with new session ID". The reporter suspected a certificate issue, but no fix or confirmation was posted in the thread.

      Source: https://github.com/modelcontextprotocol/csharp-sdk/issues/157#issuecomment-2984570597 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @halter73 tried on GitHub (Outcome unclear)

      A maintainer demonstrated building a stateless Streamable HTTP server using the SDK's JSON DTOs with a plain ASP.NET Core minimal API in a timestamped YouTube segment from the ASP.NET Community Standup, offered as a workaround before stateless support landed.

      Source: https://github.com/modelcontextprotocol/csharp-sdk/issues/157#issuecomment-2843790585 (opens external site)

      Did this work for you?

    Add your answer or comment