ZeroMCP 1.4.6

dotnet add package ZeroMCP --version 1.4.6
                    
NuGet\Install-Package ZeroMCP -Version 1.4.6
                    
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="ZeroMCP" Version="1.4.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZeroMCP" Version="1.4.6" />
                    
Directory.Packages.props
<PackageReference Include="ZeroMCP" />
                    
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 ZeroMCP --version 1.4.6
                    
#r "nuget: ZeroMCP, 1.4.6"
                    
#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 ZeroMCP@1.4.6
                    
#: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=ZeroMCP&version=1.4.6
                    
Install as a Cake Addin
#tool nuget:?package=ZeroMCP&version=1.4.6
                    
Install as a Cake Tool

ZeroMCP

Expose your ASP.NET Core API as an MCP (Model Context Protocol) server. Tag controller actions with [Mcp] or minimal APIs with .AsMcp(...); ZeroMCP discovers them, builds JSON Schema for inputs, and exposes a single POST /mcp endpoint that speaks the MCP Streamable HTTP transport. Tool calls are dispatched in-process through your real pipeline (filters, validation, authorization run as normal).

Full documentation (configuration, governance, observability, minimal APIs, limitations): repository README or your GitLab repo root README.md.


Install

<PackageReference Include="ZeroMCP" Version="1.*" />

Quick Start

1. Register and map

// Program.cs
builder.Services.AddZeroMCP(options =>
{
    options.ServerName = "My API";
    options.ServerVersion = "1.0.0";
});

// After UseRouting(), UseAuthorization()
app.MapZeroMCP();  // GET and POST /mcp; GET /mcp/tools and GET /mcp/ui when inspector/UI are enabled

2. Tag controller actions

[HttpGet("{id}")]
[Mcp("get_order", Description = "Retrieves a single order by ID.")]
public ActionResult<Order> GetOrder(int id) { ... }

[HttpPost]
[Mcp("create_order", Description = "Creates a new order.")]
public ActionResult<Order> CreateOrder([FromBody] CreateOrderRequest request) { ... }

3. Optional: minimal APIs

app.MapGet("/api/health", () => Results.Ok(new { status = "ok" }))
   .AsMcp("health_check", "Returns API health status.");

If you use both controllers and minimal APIs, add builder.Services.AddEndpointsApiExplorer(); and app.MapControllers(); so controller tools are discovered.

Point any MCP client (e.g. Claude Desktop) at your app’s /mcp URL.


Configuration (summary)

Option Default Description
RoutePrefix "/mcp" Endpoint path
ServerName / ServerVersion Shown in MCP handshake
IncludeInputSchemas true Include JSON Schema in tools/list
EnableXMLDocAnalysis true Use XML doc summary as tool description when [Mcp] Description is blank
ForwardHeaders ["Authorization"] Headers copied to tool dispatch
ToolFilter null Discovery-time filter by tool name
ToolVisibilityFilter null Per-request filter (name, ctx) => bool
CorrelationIdHeader "X-Correlation-ID" Request/response correlation ID
EnableOpenTelemetryEnrichment false Tag Activity.Current with MCP tool details
EnableResultEnrichment false tools/call result includes metadata, optional hints
EnableSuggestedFollowUps false Include suggestedNextActions when provider is set
EnableStreamingToolResults false Return content as chunks (chunkIndex, isFinal)
StreamingChunkSize 4096 Chunk size when streaming enabled
EnableToolInspector true GET {RoutePrefix}/tools returns full tool list as JSON
EnableToolInspectorUI true GET {RoutePrefix}/ui serves Swagger-like test invocation UI
EnableLegacySseTransport false Add GET /mcp/sse and POST /mcp/messages for MCP spec 2024-11-05 clients
MaxFormFileSizeBytes 10485760 (10 MB) Max size for base64-decoded form files; enforced before decode

Set EnableToolInspector or EnableToolInspectorUI to false to disable the JSON endpoint or the UI (e.g. in production if the list is sensitive). The sample app uses builder.Environment.IsDevelopment() to enable them only in Development.

Governance: Use [Mcp(..., Roles = new[] { "Admin" }, Policy = "RequireEditor")] or .AsMcp(..., roles: ..., policy: ...) to restrict which tools appear in tools/list per user.

Metrics: Implement IMcpMetricsSink and register it after AddZeroMCP() to record tool invocations (name, status code, duration, success/failure).


Versioning

We follow Semantic Versioning. Breaking changes are documented in the repository (e.g. VERSIONING.md).

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

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
1.4.6 32 3/5/2026
1.4.0 58 3/4/2026
1.3.0 90 3/2/2026
1.2.2 97 2/26/2026 1.2.2 is deprecated because it has critical bugs.
1.1.2.2 100 2/26/2026 1.1.2.2 is deprecated because it has critical bugs.