Model Context Protocol has moved from a developer experiment into an important integration layer for AI applications. As MCP servers begin handling more simultaneous tool calls, performance questions become more important than simply asking whether a server works.
For .NET developers, the release of MCP C# SDK 2.0 is especially significant. The official C# SDK is maintained in collaboration with Microsoft, and version 2.0 aligns with the MCP 2026-07-28 protocol revision. The stable ModelContextProtocol 2.0.0 package is available on NuGet.
But SDK version changes should not be evaluated only by API differences. A production MCP server also needs to be evaluated under concurrent tool workloads.
This article presents a practical benchmark methodology for measuring latency, throughput, concurrency, failures, and resource usage in an MCP C# server. The examples are designed so developers can run the tests against their own environment instead of relying on fabricated benchmark numbers.
Why Benchmark MCP Tool Workloads?
A simple MCP test usually looks like this:
Client
|
v
MCP Server
|
v
Tool
|
v
Response
That tells you whether the integration works.
Production traffic looks different:
+--> Tool A
|
Client --> MCP Server --> Tool B
|
+--> Tool C
|
+--> Tool D
Several clients may call tools at the same time. Some tools may perform CPU-intensive work, while others wait on databases or HTTP APIs.
The resulting performance depends on more than the SDK itself.
Important variables include:
Number of concurrent requests
Tool execution time
JSON serialization and deserialization
HTTP transport behavior
Connection reuse
Server CPU and memory
Downstream service latency
Payload size
Client-side concurrency
Application-level locking
Therefore, an honest benchmark should measure the complete workload and clearly document the environment.
What Changed in MCP C# SDK 2.0?
The C# SDK 2.0 release aligns with the 2026-07-28 MCP specification. Among the major changes are discovery-first negotiation, stateless-by-default HTTP, multi-round-trip requests, caching hints, standardized headers, and dedicated extension packages for MCP Apps and Tasks. The SDK also maintains interoperability with earlier protocol versions through negotiation.
The architectural change that matters particularly for concurrent HTTP workloads is the move toward stateless servers.
The .NET blog demonstrates the new configuration:
builder.Services
.AddMcpServer()
.WithHttpTransport()
.WithToolsFromAssembly();
The SDK's HTTP transport is now stateless by default. A stateless server can be placed behind a load balancer without requiring transport-session synchronization between instances.
That makes concurrency testing especially relevant.
Building a Benchmark MCP Server
Start with the main package:
dotnet add package ModelContextProtocol --version 2.0.0
dotnet add package ModelContextProtocol.AspNetCore --version 2.0.0
The SDK separates functionality into packages. ModelContextProtocol.Core provides lower-level APIs, ModelContextProtocol provides hosting and discovery functionality, and ModelContextProtocol.AspNetCore adds HTTP server support.
Create a minimal ASP.NET Core MCP server:
using ModelContextProtocol.Server;
using System.ComponentModel;
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddMcpServer()
.WithHttpTransport(options =>
{
options.Stateless = true;
})
.WithToolsFromAssembly();
var app = builder.Build();
app.MapMcp();
app.Run("http://localhost:3001");
[McpServerToolType]
public static class BenchmarkTools
{
[McpServerTool]
[Description("Returns a small response for latency testing.")]
public static string Ping(string value)
{
return $"pong:{value}";
}
}
The tool is intentionally simple.
That is important because a benchmark should isolate the component being measured. If Ping performs a database query, an HTTP request, and JSON transformation, the benchmark becomes primarily a test of those dependencies.
Designing Useful Benchmark Workloads
One workload is not enough.
A practical benchmark should contain several scenarios.
| Workload | Purpose | Main Metrics |
|---|---|---|
| Sequential calls | Establish baseline | Average latency |
| Low concurrency | Normal application traffic | p50/p95 latency |
| Medium concurrency | Typical scaling test | Throughput and latency |
| High concurrency | Saturation testing | p95/p99 and errors |
| Large payload | Serialization behavior | Latency and memory |
| Slow tool | Async behavior | Concurrency efficiency |
| Mixed tools | Realistic workload | Overall throughput |
For example, start with:
Concurrency: 1
Concurrency: 10
Concurrency: 50
Concurrency: 100
Concurrency: 250
The exact values should be adapted to the environment being tested.
Do not describe these levels as production capacity. They are experimental workload levels.
Measuring Latency Correctly
Average latency is useful, but it should not be your only metric.
Suppose 99 requests complete quickly and one request takes several seconds. The average may hide that outlier.
At minimum, record:
p50 latency
p95 latency
p99 latency
Minimum latency
Maximum latency
Requests per second
Failed requests
A simple benchmark client can invoke the MCP tool concurrently using CallToolAsync. The SDK exposes CallToolAsync as an asynchronous API on McpClient.
A simplified benchmark loop looks like this:
var stopwatch = Stopwatch.StartNew();
var tasks = Enumerable.Range(0, concurrency)
.Select(async i =>
{
var start = Stopwatch.GetTimestamp();
try
{
await client.CallToolAsync(
"Ping",
new Dictionary<string, object?>
{
["value"] = i.ToString()
});
var elapsed = Stopwatch.GetElapsedTime(start);
return new BenchmarkResult(
elapsed.TotalMilliseconds,
true);
}
catch
{
var elapsed = Stopwatch.GetElapsedTime(start);
return new BenchmarkResult(
elapsed.TotalMilliseconds,
false);
}
});
var results = await Task.WhenAll(tasks);
stopwatch.Stop();
The important part is that all requests are issued asynchronously.
Using:
await CallToolAsync(...);
await CallToolAsync(...);
await CallToolAsync(...);
measures sequential behavior.
Using Task.WhenAll measures concurrent client demand.
Measuring Percentiles
Once the requests complete, sort successful latency measurements:
var latencies = results
.Where(x => x.Success)
.Select(x => x.LatencyMs)
.OrderBy(x => x)
.ToArray();
double Percentile(double[] values, double percentile)
{
if (values.Length == 0)
return double.NaN;
var index = (int)Math.Ceiling(
percentile / 100.0 * values.Length) - 1;
index = Math.Clamp(index, 0, values.Length - 1);
return values[index];
}
Console.WriteLine($"p50: {Percentile(latencies, 50):F2} ms");
Console.WriteLine($"p95: {Percentile(latencies, 95):F2} ms");
Console.WriteLine($"p99: {Percentile(latencies, 99):F2} ms");
This gives you a much more useful picture of tail latency.
In production MCP systems, tail latency matters because one slow tool invocation can delay an agent workflow even when most other requests are fast.
Measuring Throughput
Throughput can be calculated as:
Requests Per Second =
Successful Requests / Total Benchmark Duration
For example:
var requestsPerSecond =
results.Length / stopwatch.Elapsed.TotalSeconds;
Console.WriteLine(
$"Throughput: {requestsPerSecond:F2} requests/sec");
Do not compare throughput numbers between two SDK versions unless the test environment is identical.
The following should remain constant:
Machine or container resources
.NET runtime
Tool implementation
Payload
Transport
Network conditions
Client configuration
Concurrency level
Benchmark duration
Otherwise, the result is not a meaningful SDK comparison.
Testing Concurrency Saturation
The most interesting part of the benchmark is usually not the first test.
Run progressively higher concurrency.
1
10
25
50
100
250
500
Record the results:
Join the conversation! Your thoughts help the community grow.