ModelContextProtocol.AspNetCore
0.3.0-preview.2
Prefix Reserved
See the version list below for details.
dotnet add package ModelContextProtocol.AspNetCore --version 0.3.0-preview.2
NuGet\Install-Package ModelContextProtocol.AspNetCore -Version 0.3.0-preview.2
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="0.3.0-preview.2" />
<PackageVersion Include="ModelContextProtocol.AspNetCore" Version="0.3.0-preview.2" />
<PackageReference Include="ModelContextProtocol.AspNetCore" />
paket add ModelContextProtocol.AspNetCore --version 0.3.0-preview.2
#r "nuget: ModelContextProtocol.AspNetCore, 0.3.0-preview.2"
#:package ModelContextProtocol.AspNetCore@0.3.0-preview.2
#addin nuget:?package=ModelContextProtocol.AspNetCore&version=0.3.0-preview.2&prerelease
#tool nuget:?package=ModelContextProtocol.AspNetCore&version=0.3.0-preview.2&prerelease
ASP.NET Core extensions for the MCP C# SDK
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 | Versions 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 was computed. 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. |
-
net8.0
- ModelContextProtocol (>= 0.3.0-preview.2)
-
net9.0
- ModelContextProtocol (>= 0.3.0-preview.2)
NuGet packages (22)
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 |
|
Senparc.Ncf.XncfBase
Senparc.Ncf.XncfBase |
|
Senparc.CO2NET.WebApi
Senparc.CO2NET.WebApi Application Performance Management |
|
MaIN.NET
MaIN.NET - Package designed to streamline the integration of large language models (LLMs) into advanced AI workflows. |
|
CloudStreams.Core.Api
Package Description |
GitHub repositories (21)
Showing the top 20 popular GitHub repositories that depend on ModelContextProtocol.AspNetCore:
Repository | Stars |
---|---|
JeffreySu/WeiXinMPSDK
微信全平台 .NET SDK, Senparc.Weixin for C#,支持 .NET Framework 及 .NET Core、.NET 8.0。已支持微信公众号、小程序、小游戏、微信支付、企业微信/企业号、开放平台、JSSDK、微信周边等全平台。 WeChat SDK for C#.
|
|
SciSharp/BotSharp
AI Multi-Agent Framework in .NET
|
|
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.
|
|
microsoft/mcp
Catalog of official Microsoft MCP (Model Context Protocol) server implementations for AI-powered data access and tool integration
|
|
IoTSharp/IoTSharp
IoTSharp is an open-source IoT platform for data collection, processing, visualization, and device management.
|
|
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.
|
|
mixcore/mix.core
🚀 A future-proof enterprise web CMS supporting both headless and decoupled approaches. Build any type of app with customizable APIs on ASP.NET Core/.NET Core. Completely open-source and designed for flexibility.
|
|
CommunityToolkit/Aspire
A community project with additional components and extensions for .NET Aspire
|
|
foxminchan/BookWorm
The practical implementation of .NET Aspire using Microservices
|
|
jsakamoto/BlazingStory
The clone of "Storybook" for Blazor, a frontend workshop for building UI components and pages in isolation.
|
|
CervantesSec/cervantes
Cervantes is an open-source, collaborative platform designed specifically for pentesters and red teams. It serves as a comprehensive management tool, streamlining the organization of projects, clients, vulnerabilities, and reports in a single, centralized location.
|
|
IvanMurzak/Unity-MCP
MCP Server + Plugin for Unity Editor and Unity game. The Plugin allows to connect to MCP clients like Claude Desktop or others.
|
|
Senparc/Senparc.CO2NET
Base Common Library, support for.NET Framework &.NET Core
|
|
daohainam/microservice-patterns
Microservice pattern demos (Saga, EventSourcing, CQRS...) running on .NET Aspire
|
|
junkai-li/NetCoreKevin
基于NET8搭建DDD-微服务-现代化Saas企业级WebAPI架构支持:IDS4单点登录、多缓存、自动任务、分布式、一库多租户、日志、授权和鉴权、CAP集成事件、SignalR、领域事件、ESL、MCP协议服务、IOC模块化注入、Cors、Quartz自动任务、多短信集成、AI智能体、AISemanticKernel集成、OCR验证码识别、API多版本兼容、单元集成测试
|
|
J-Tech-Japan/Sekiban
Sekiban - an Opinionated Event Sourcing and CQRS Framework using C#. It can store data into Azure Cosmos DB, AWS Dynamo DB or Postgres
|
|
microsoft/mcp-gateway
MCP Gateway is a reverse proxy and management layer for MCP servers, enabling scalable, session-aware routing and lifecycle management of MCP servers in Kubernetes environments.
|
|
wisedev-code/MaIN.NET
NuGet package designed to make LLMs, RAG, and Agents first-class citizens in .NET
|
|
AIDotNet/Text2Sql.Net
Text2Sql.Net 是一个使用DotNet和Semantic Kernel开发的Text2Sql工具
|
|
Azure/azure-sdk-tools
Tools repository leveraged by the Azure SDK team.
|
Version | Downloads | Last Updated |
---|---|---|
0.3.0-preview.4 | 16,286 | 8/20/2025 |
0.3.0-preview.3 | 46,212 | 7/16/2025 |
0.3.0-preview.2 | 20,764 | 7/3/2025 |
0.3.0-preview.1 | 44,586 | 6/20/2025 |
0.2.0-preview.3 | 41,391 | 6/3/2025 |
0.2.0-preview.2 | 12,904 | 5/29/2025 |
0.2.0-preview.1 | 37,713 | 5/16/2025 |
0.1.0-preview.14 | 5,693 | 5/15/2025 |
0.1.0-preview.13 | 7,893 | 5/10/2025 |
0.1.0-preview.12 | 5,441 | 5/5/2025 |
0.1.0-preview.11 | 27,569 | 4/24/2025 |
0.1.0-preview.10 | 11,921 | 4/19/2025 |
0.1.0-preview.9 | 7,589 | 4/15/2025 |
0.1.0-preview.8 | 6,284 | 4/11/2025 |
0.1.0-preview.7 | 1,796 | 4/9/2025 |
0.1.0-preview.6 | 3,994 | 4/4/2025 |
0.1.0-preview.5 | 1,212 | 4/3/2025 |
0.1.0-preview.4 | 1,986 | 3/31/2025 |