MCP.Extensions 0.0.10

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package MCP.Extensions --version 0.0.10
                    
NuGet\Install-Package MCP.Extensions -Version 0.0.10
                    
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="MCP.Extensions" Version="0.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MCP.Extensions" Version="0.0.10" />
                    
Directory.Packages.props
<PackageReference Include="MCP.Extensions" />
                    
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 MCP.Extensions --version 0.0.10
                    
#r "nuget: MCP.Extensions, 0.0.10"
                    
#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 MCP.Extensions@0.0.10
                    
#: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=MCP.Extensions&version=0.0.10
                    
Install as a Cake Addin
#tool nuget:?package=MCP.Extensions&version=0.0.10
                    
Install as a Cake Tool

MCP.Extensions

Extensions and middleware for ModelContextProtocol in ASP.NET Core.

Overview

This package provides useful middleware and extension methods for working with the ModelContextProtocol in ASP.NET Core applications. It is designed to help with request/response logging, audience filtering, and other common tasks when using ModelContextProtocol.

Features

  • Middleware for logging HTTP headers, request bodies, and response bodies
  • Middleware for filtering tools in responses and streams
  • Attribute-based audience targeting
  • Service abstractions for tool audience management

Installation

Install via NuGet Package Manager:

dotnet add package MCP.Extensions

Or via the NuGet UI in Visual Studio.

Usage

Add the desired middleware to your ASP.NET Core pipeline in Startup.cs or Program.cs:

// Debugging and logging middleware
app.UseMiddleware<HeaderLoggingMiddleware>();
app.UseMiddleware<RequestBodyLoggingMiddleware>();
app.UseMiddleware<ResponseBodyLoggingMiddleware>();
app.UseMiddleware<ResponseToolFilteringMiddleware>();
//Practical use case for filtering tools in streams
app.UseMiddleware<StreamToolFilteringMiddleware>();

Use the [McpAudience] attribute to restrict the tools listing to specific audiences:

[McpAudience("admin")]
public IActionResult AdminOnlyAction() {
    // ...
}

Requirements

License

MIT

Repository

https://github.com/echapmanFromBunnings/mcp.extensions

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.11-preview.19416414142 234 11/17/2025
0.0.11-preview.19324399365 226 11/17/2025
0.0.11-preview.19324399340 224 11/17/2025
0.0.11-preview.18795004085 72 10/24/2025
0.0.11-preview.18794524719 52 10/24/2025
0.0.11-preview.18794524714 59 10/24/2025
0.0.11-preview.18279819569 130 10/6/2025
0.0.11-preview.18279758360 125 10/6/2025
0.0.11-preview.17716643785 180 9/14/2025
0.0.10 739 7/27/2025
0.0.10-preview.16548331303 102 7/27/2025
0.0.10-preview.16546775734 121 7/27/2025
0.0.9 399 7/25/2025
0.0.9-preview.16526103338 370 7/25/2025
0.0.9-preview.16525456268 377 7/25/2025
0.0.9-preview.16525136559 371 7/25/2025
0.0.8 419 7/25/2025
0.0.8-preview.16522042210 395 7/25/2025
0.0.7 490 7/24/2025
0.0.7-preview.16499201410 471 7/24/2025
0.0.6 124 7/18/2025
0.0.6-preview.16366817721 95 7/18/2025
0.0.5 198 6/29/2025
0.0.5-preview.16366731274 91 7/18/2025
0.0.5-preview.16366705636 96 7/18/2025
0.0.5-preview.16104232693 130 7/6/2025
0.0.5-preview.15959312357 133 6/29/2025
0.0.4 260 6/25/2025
0.0.4-preview.15954511535 127 6/29/2025
0.0.3 145 6/25/2025
0.0.3-preview.15881876633 132 6/25/2025
0.0.2-preview.15881058445 134 6/25/2025
0.0.2-preview.15881021758 130 6/25/2025
0.0.1 115 6/20/2025
0.0.1-preview.15880890942 134 6/25/2025
0.0.1-preview.15880778648 129 6/25/2025
0.0.1-preview.15880752835 132 6/25/2025
0.0.1-preview.15880551630 128 6/25/2025
0.0.1-preview.15807198442 138 6/22/2025
0.0.1-preview.15779540861 95 6/20/2025
0.0.1-preview.15778048273 95 6/20/2025
0.0.1-preview.15777820444 96 6/20/2025