Model Context Protocol (MCP) applications are increasingly being deployed as HTTP services rather than local development tools.
That creates a familiar set of backend engineering questions:
Can the MCP server scale horizontally?
Does every request need to reach the same server instance?
How should load balancers route MCP traffic?
What happens when a tool needs multiple interactions with the client?
Should MCP servers maintain sessions?
How should state be handled when requests can reach different instances?
The MCP C# SDK 2.0 addresses several of these concerns by aligning with the MCP specification revision dated July 28, 2026.
The most important architectural change is that MCP over HTTP is now stateless by default for the new protocol revision. The SDK builds on ASP.NET Core, allowing MCP traffic to use conventional HTTP infrastructure such as load balancers, reverse proxies, gateways, and container orchestration platforms.
This changes how developers should think about scaling MCP servers.
Instead of designing around a persistent MCP session, applications can increasingly treat MCP requests like ordinary HTTP workloads.
What Changed in MCP C# SDK 2.0?
The MCP C# SDK 2.0 implements the July 28, 2026 protocol revision.
Several changes are particularly important for HTTP scalability:
| Area | Earlier Model | MCP C# SDK 2.0 |
|---|---|---|
| HTTP state | Session-oriented | Stateless by default |
| Session ID | Mcp-Session-Id | Removed for the new protocol revision |
| Initialization | initialize handshake | server/discover for the new revision |
| Load balancing | Sticky routing may be required | Any instance can process requests |
| Interactive requests | Stateful server-to-client flow | Multi Round-Trip Requests |
| HTTP infrastructure | MCP-specific considerations | Standard HTTP infrastructure |
The SDK also remains backward compatible with older protocol versions, allowing clients and servers to fall back to the previous initialization model when necessary.
Why Stateless MCP Matters for Scaling
Consider a traditional stateful MCP deployment:
Load Balancer
|
+-----------+-----------+
| |
v v
MCP Server A MCP Server B
| |
Session Store Session Store
If a client establishes a session with Server A, subsequent requests may need to return to Server A.
That creates operational complexity.
You may need:
Sticky sessions
Shared session storage
Session replication
More complicated failover
Additional memory per server instance
The stateless model changes the architecture:
Load Balancer
|
+--------------+--------------+
| | |
v v v
MCP Server A MCP Server B MCP Server C
| | |
+--------------+--------------+
|
Shared Services
Each request contains the information required for processing.
A load balancer can therefore distribute requests across available instances without maintaining MCP-specific session affinity.
Microsoft's SDK documentation explicitly describes stateless mode as the recommended model for HTTP-based MCP servers because it avoids session complexity, memory overhead, and deployment constraints.
Building a Stateless MCP Server
The MCP C# SDK integrates with ASP.NET Core.
A minimal HTTP server can be configured like this:
using ModelContextProtocol.Server;
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddMcpServer()
.WithHttpTransport(options =>
{
options.Stateless = true;
})
.WithToolsFromAssembly();
var app = builder.Build();
app.MapMcp();
app.Run();
In SDK 2.0, stateless HTTP transport is already the default, but explicitly setting it can make the deployment intention clear.
The important configuration is:
options.Stateless = true;
With stateless mode enabled, the server does not maintain MCP session state between HTTP requests. Each request is handled independently.
Adding an MCP Tool
A simple tool can be defined using the SDK attributes:
using System.ComponentModel;
using ModelContextProtocol.Server;
[McpServerToolType]
public static class OrderTools
{
[McpServerTool]
[Description("Gets the status of an order.")]
public static string GetOrderStatus(
string orderId)
{
return $"Order {orderId} is processing.";
}
}
The tool itself should not assume that the next request will arrive at the same server instance.
That is an important design constraint.
Avoid code such as:
private static Dictionary<string, object> Sessions = new();
when that dictionary represents business state that needs to survive across requests.
With multiple server instances, each instance would have its own copy.
Where Should Application State Go?
Stateless MCP does not mean that the entire application must be stateless.
It means that MCP transport state does not have to be maintained between requests.
Suppose a tool starts a shopping workflow.
Instead of storing the current basket inside an MCP session, return an explicit identifier:
basketId = "bsk_12345"
The client can then send the identifier to the next tool:
create_basket()
|
v
basketId
|
v
add_item(basketId, productId)
|
v
checkout(basketId)
The state can live in an external data store:
MCP Server
|
+---- Redis
|
+---- SQL Server
|
+---- Cosmos DB
|
+---- External API
This is a familiar distributed-system pattern.
The important difference is that the MCP server does not need to know which server instance handled the previous request.
Stateless Does Not Mean No State
This distinction is important.
A stateless MCP service can still use:
SQL Server
Redis
Azure Cosmos DB
Blob storage
External APIs
Message queues
The service simply avoids storing request continuity in process-local MCP session state.
For example:
public async Task<Order> GetOrderAsync(
string orderId,
CancellationToken cancellationToken)
{
return await orderRepository.GetAsync(
orderId,
cancellationToken);
}
The repository may access a database, but the MCP server itself does not need to remember which instance previously processed the client request.
Multi Round-Trip Requests
One challenge with stateless communication is interactive tools.
Suppose an MCP tool needs additional information from the client.
Previously, server-initiated interactions such as elicitation depended on session-oriented communication.
The July 28 protocol revision introduces Multi Round-Trip Requests (MRTR).
Instead of maintaining a persistent connection state, the server can return an input_required result containing the information required to continue. The client supplies the requested input and sends another request containing the relevant state.
Conceptually:
Client
|
| tools/call
v
Server
|
| input_required
v
Client
|
| inputResponses + requestState
v
Server
|
| final result
v
Client
The continuity is carried through the request payload instead of requiring a server-side transport session.
This is one of the changes that makes interactive workflows compatible with stateless HTTP.
Scaling Behind a Load Balancer
A major benefit of stateless MCP is simpler horizontal scaling.
Consider three containers:
Reverse Proxy
|
+-------------+-------------+
| | |
v v v
Container 1 Container 2 Container 3
| | |
+-------------+-------------+
|
Shared Database
A request sequence could look like:
Request 1 -> Container 1
Request 2 -> Container 3
Request 3 -> Container 2
Request 4 -> Container 1
The application should continue working because no MCP session is tied to a specific container.
This makes common deployment strategies easier to use:
Kubernetes
Azure Container Apps
Container Apps environments
VM scale sets
Containerized ASP.NET Core hosting
Cloud load balancers
Join the conversation! Your thoughts help the community grow.