Update (April 2026): This post covers the v1.0 release announcement. MCP remains a strong interoperability standard for .NET agents and tools, but verify the current package versions, transport guidance, and framework integrations before starting a new server or client implementation.
What Shipped
The Model Context Protocol (MCP) C# SDK hit v1.0 on March 5, 2026. For .NET developers building AI applications, this is worth paying attention to — MCP is becoming the standard way agents discover and use tools, and this release marks the SDK as production-ready.
Two NuGet packages make up the release:
- ModelContextProtocol — Core library for building MCP clients and servers
- ModelContextProtocol.AspNetCore — HTTP transport for hosting MCP servers in ASP.NET Core
Both target netstandard2.0, so they work on .NET 8 LTS, .NET 9, and .NET 10 without any compatibility issues.
Why MCP Matters
If you’re building AI agents — or planning to — MCP solves a real problem. Today, connecting an agent to external tools means writing custom integration code for each tool. You write a plugin for your database, another for your file system, another for your API. Each one has its own discovery mechanism, authentication flow, and invocation pattern.
MCP standardizes all of that. An MCP server exposes tools with typed schemas. An MCP client discovers those tools automatically and invokes them with structured inputs and outputs. The protocol handles discovery, capability negotiation, and tool invocation — you don’t.
The analogy that keeps surfacing in the community is USB-C. Before USB-C, every device had its own connector. MCP does for AI tools what USB-C did for physical connections: one standard, universal compatibility.
What’s New in v1.0
The preview releases were usable but missing critical production features. The v1.0 release fills those gaps:
Authorization Server Discovery
MCP servers can now advertise their authorization requirements. Clients discover auth endpoints automatically — no hardcoded OAuth URLs:
var client = new McpClient(new McpClientOptions
{
ServerUri = new Uri("https://tools.example.com/mcp"),
// Client discovers OAuth endpoints from server metadata
EnableAuthorizationDiscovery = true,
ClientId = "my-dotnet-agent"
});
Client ID Metadata Documents (CIMD)
Dynamic client registration is now part of the spec. Your MCP client can register itself with a server without pre-shared secrets — the server publishes a CIMD endpoint, and the client uses it to obtain credentials at runtime.
Tool Sampling
MCP servers can now request the client to run a prompt through the LLM during tool execution. Think of a tool that needs to classify something before continuing — it can ask the client’s LLM to help mid-execution:
[McpTool("analyze_document")]
public async Task<ToolResult> AnalyzeDocument(
string documentText,
McpToolContext context)
{
// Ask the client's LLM to classify the document
var classification = await context.RequestSamplingAsync(
$"Classify this document into one of: invoice, contract, report.\n\n{documentText}");
// Use the classification result in further processing
return await ProcessByType(classification.Text, documentText);
}
Long-Running Requests
Some tools take minutes to complete — data processing, report generation, external API calls with queuing. The v1.0 SDK supports long-running tasks with progress notifications:
[McpTool("generate_report")]
public async Task<ToolResult> GenerateReport(
string query,
McpToolContext context)
{
await context.ReportProgressAsync(0, "Starting report generation...");
var data = await FetchData(query);
await context.ReportProgressAsync(50, "Data fetched. Analyzing...");
var report = await AnalyzeData(data);
await context.ReportProgressAsync(100, "Complete.");
return ToolResult.Success(report);
}
Quick Start: Building an MCP Server
Here’s the minimum viable MCP server in ASP.NET Core:
using ModelContextProtocol;
using ModelContextProtocol.AspNetCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMcpServer()
.WithTools<WeatherTools>();
var app = builder.Build();
app.MapMcpEndpoint("/mcp");
app.Run();
public class WeatherTools
{
[McpTool("get_weather")]
[Description("Get current weather for a city")]
public async Task<ToolResult> GetWeather(string city)
{
// Your weather API call here
var temp = await WeatherService.GetTemperatureAsync(city);
return ToolResult.Success($"Current temperature in {city}: {temp}°F");
}
}
Register the server, annotate your tools, and the SDK handles discovery, schema generation, and invocation routing.
Connecting to Microsoft Agent Framework
This is where MCP gets particularly interesting for .NET developers. Microsoft Agent Framework has native MCP support — agents can consume MCP servers as tool providers without any adapter code:
var agent = new ChatCompletionAgent
{
Name = "ResearchAssistant",
Instructions = "You are a research assistant with access to external tools.",
Kernel = kernel
};
// Connect MCP server as a tool source
agent.AddMcpToolProvider(new Uri("https://tools.example.com/mcp"));
The agent discovers available tools from the MCP server, includes them in its tool calling configuration, and invokes them as needed during conversations. If you’re building agentic systems, MCP is how you give your agents access to the outside world.
What This Means for Your Projects
If you’re starting a new .NET AI project, consider MCP as your tool integration strategy from day one. The v1.0 release means the API surface is stable — no more breaking changes between previews.
If you have existing tool integrations built as Semantic Kernel plugins or direct API calls, there’s no urgency to rewrite them. MCP is additive. You can expose new tools as MCP servers while keeping existing integrations intact.
The bigger picture: as more tools publish MCP servers (databases, APIs, cloud services), your agents gain capabilities without you writing integration code. That’s the real value proposition — tool reusability across the entire ecosystem.
Next Steps
- Model Context Protocol for .NET Developers: Complete Guide — Deep dive into MCP architecture, the host/client/server model, and production patterns
- Build an MCP Server in .NET with the Official C# SDK — Hands-on tutorial building a complete MCP server with three tools
- Microsoft Agent Framework: Complete Guide for .NET Developers — How Agent Framework uses MCP for tool integration