Skip to main content

MCP C# SDK v1.0 Released: Authorization + Tool Sampling for .NET

Verified Apr 2026 From NuGet Release .NET 9 ModelContextProtocol 1.0.0 ModelContextProtocol.AspNetCore 1.0.0
By Rajesh Mishra · Mar 7, 2026 · 7 min read
In 30 Seconds

The Model Context Protocol C# SDK v1.0 was released on March 5, 2026. It provides a standardized way for .NET AI applications to expose and consume tools, resources, and prompts. Key v1.0 features include authorization server discovery, Client ID Metadata Documents, tool sampling, and long-running request support. The SDK ships as two NuGet packages: ModelContextProtocol (core) and ModelContextProtocol.AspNetCore (HTTP hosting).

📡 Ecosystem Update · From NuGet Release

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

Enjoying this article?

Get weekly .NET + AI insights delivered to your inbox. No spam.

Subscribe Free →

AI-Friendly Summary

Summary

The Model Context Protocol C# SDK v1.0 was released on March 5, 2026. It provides a standardized way for .NET AI applications to expose and consume tools, resources, and prompts. Key v1.0 features include authorization server discovery, Client ID Metadata Documents, tool sampling, and long-running request support. The SDK ships as two NuGet packages: ModelContextProtocol (core) and ModelContextProtocol.AspNetCore (HTTP hosting).

Key Takeaways

  • MCP C# SDK v1.0 released March 5, 2026 — first stable release
  • Two packages: ModelContextProtocol (core) + ModelContextProtocol.AspNetCore (HTTP hosting)
  • v1.0 adds authorization, tool sampling, long-running requests, and CIMD
  • Native integration with Microsoft Agent Framework and Semantic Kernel
  • API surface is frozen — safe for production use

Implementation Checklist

  • Install ModelContextProtocol 1.0.0 from NuGet
  • Add ModelContextProtocol.AspNetCore if hosting over HTTP
  • Define tools using [McpTool] attribute on methods
  • Configure authorization if exposing server externally
  • Test with MCP Inspector or compatible client

Frequently Asked Questions

What is the Model Context Protocol?

MCP is an open standard that defines how AI applications (hosts/clients) discover and invoke tools, resources, and prompts exposed by external servers. Think of it as a USB-C standard for AI tool integration — any MCP-compatible client can connect to any MCP-compatible server without custom integration code.

What NuGet packages do I need for MCP in .NET?

Install ModelContextProtocol for core client and server functionality. For hosting MCP servers over HTTP in ASP.NET Core, add ModelContextProtocol.AspNetCore. Both packages target netstandard2.0 and work on .NET 8+.

Does MCP work with Semantic Kernel and Microsoft Agent Framework?

Yes. Microsoft Agent Framework has native MCP support — agents can consume MCP servers as tool providers directly. Semantic Kernel can invoke MCP tools through its plugin system. The C# SDK makes it straightforward to build servers that both frameworks can consume.

What changed between the MCP preview and v1.0?

The v1.0 release adds authorization server discovery, Client ID Metadata Documents for dynamic registration, tool sampling in server-initiated requests, long-running request support for tasks that take minutes to complete, and a stabilized API surface with no more breaking changes.

You Might Also Enjoy

Was this article useful?

Feedback is anonymous and helps us improve content quality.

Discussion

Engineering discussion powered by GitHub Discussions.

#MCP #Model Context Protocol #.NET SDK #AI Agents #Tool Calling