ModelContextProtocol.AspNetCore 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ModelContextProtocol.AspNetCore --version 1.0.0
                    
NuGet\Install-Package ModelContextProtocol.AspNetCore -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModelContextProtocol.AspNetCore" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ModelContextProtocol.AspNetCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ModelContextProtocol.AspNetCore --version 1.0.0
                    
#r "nuget: ModelContextProtocol.AspNetCore, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ModelContextProtocol.AspNetCore@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ModelContextProtocol.AspNetCore&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ModelContextProtocol.AspNetCore&version=1.0.0
                    
Install as a Cake Tool

ASP.NET Core extensions for the MCP C# SDK

NuGet preview version

The official C# SDK for the Model Context Protocol, enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. Please visit our API documentation for more details on available functionality.

This project is in preview; breaking changes can be introduced without prior notice.

About MCP

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). It enables secure integration between LLMs and various data sources and tools.

For more information about MCP:

Installation

To get started, install the package from NuGet

dotnet new web
dotnet add package ModelContextProtocol.AspNetCore --prerelease

Getting Started

// Program.cs
using ModelContextProtocol.Server;
using System.ComponentModel;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMcpServer()
    .WithHttpTransport()
    .WithToolsFromAssembly();
var app = builder.Build();

app.MapMcp();

app.Run("http://localhost:3001");

[McpServerToolType]
public static class EchoTool
{
    [McpServerTool, Description("Echoes the message back to the client.")]
    public static string Echo(string message) => $"hello {message}";
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (231)

Showing the top 5 NuGet packages that depend on ModelContextProtocol.AspNetCore:

Package Downloads
Senparc.Weixin.AspNet

微信 SDK - Senparc.Weixin.AspNet 模块 Senparc.Weixin SDK 开源项目: https://github.com/JeffreySu/WeiXinMPSDK

PostSharp.Engineering.BuildTools

A multi-repo build orchestrator used by PostSharp Technologies for its products and for Metalama.

Microsoft.Debugging.Platform.DbgX

Wraps DbgEng in a managed Task Asynchronous Pattern (e.g. async/await) so that consumers of this library do not need to be aware of the oddities of the dbgeng threading model. It creates a child process to host the engine out of process (using EngHost.exe) to allow native 32/64 bit debugging of binaries.

Rsk.AdminUI

Admin user interface for Duende IdentityServer. To purchase a license or get a demo license, contact sales@identityserver.com.

PayTech.RestHost

Easy Rest Api Development Library

GitHub repositories (62)

Showing the top 20 popular GitHub repositories that depend on ModelContextProtocol.AspNetCore:

Repository Stars
unoplatform/uno
Open-source platform for building cross-platform native Mobile, Web, Desktop, and Embedded apps from a single C#/XAML codebase. Work from any IDE/CLI with Hot Reload, Visual Designer, MCPs, and Skills built for modern .NET workflows. 200M+ NuGet downloads.
JeffreySu/WeiXinMPSDK
微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 10.0。已支持微信公众号、小程序、小游戏、微信支付、企业微信/企业号、开放平台、JSSDK、微信周边等全平台。 WeChat SDK for C#.
FastEndpoints/FastEndpoints
A light-weight REST API development framework for ASP.NET 10 and newer.
microsoft/mcp
Catalog of official Microsoft MCP (Model Context Protocol) server implementations for AI-powered data access and tool integration
AIDotNet/OpenDeepWiki
OpenDeepWiki is the open-source version of the DeepWiki project, aiming to provide a powerful knowledge management and collaboration platform. The project is mainly developed using C# and TypeScript, supporting modular design, and is easy to expand and customize.
dotnet/extensions
This repository contains a suite of libraries that provide facilities commonly needed when creating production-ready applications.
SciSharp/BotSharp
AI Multi-Agent Framework in .NET
OPCFoundation/UA-.NETStandard
OPC Unified Architecture .NET Standard
MCCTeam/Minecraft-Console-Client
Lightweight console for Minecraft chat and automated scripts. Currently supports up to Minecraft 26.2
DuendeSoftware/products
The most flexible and standards-compliant OpenID Connect and OAuth 2.x framework for ASP.NET Core
Azure/data-api-builder
Data API builder provides modern REST, GraphQL endpoints and MCP tools to your Azure Databases and on-prem stores.
IoTSharp/IoTSharp
IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
iioter/iotgateway
An industrial IoTGateway with B/S architecture that enables bidirectional communication between industrial devices (southbound connections) and IoT platforms (northbound connections). It supports numerous industrial protocols, and can connect to various IoT cloud platforms.
microsoft/mcp-gateway
MCP Gateway is a reverse proxy and management layer for MCP servers, enabling scalable, session-aware stateful routing and lifecycle management of MCP servers in Kubernetes environments.
Implem/Implem.Pleasanter
Pleasanter is a no-code/low-code development platform that runs on .NET. You can quickly create business applications with simple operations.
microsoft/copilot-camp
Hands-on labs for extending Microsoft 365 Copilot and building custom engine agents
OpenRakis/Spice86
Reverse engineer and rewrite real mode DOS programs!
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
havit/Havit.Blazor
Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
Version Downloads Last Updated
2.4.0 231,653 2026/11/7
2.3.1 209,232 2026/11/3
2.3.0 820,515 2026/10/20
2.2.0 6,179,820 2026/8/13
2.1.0 619,708 2026/8/5
2.0.0 842,295 2026/7/28
2.0.0-rc.2 5,503 2026/7/28
2.0.0-rc.1 15,128 2026/7/25
2.0.0-preview.3 24,357 2026/7/15
2.0.0-preview.2 19,771 2026/7/9
2.0.0-preview.1 49,972 2026/6/26
1.4.2 21,451 2026/11/3
1.4.1 1,514,942 2026/7/9
1.4.0 2,460,582 2026/6/4
1.3.0 1,925,388 2026/5/8
1.2.0 2,571,608 2026/3/27
1.1.0 1,437,693 2026/3/6
1.0.0 1,027,646 2026/2/25
1.0.0-rc.1 15,216 2026/2/24
0.9.0-preview.2 36,568 2026/2/21
Loading failed