LowCodeHub.MinimalEndpoints.Mcp 0.0.1

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

LowCodeHub.MinimalEndpoints.Mcp

Expose selected API contracts as Model Context Protocol tools over ASP.NET Core Streamable HTTP. This package is designed for frontend teams that want to give coding agents a tool name, description, input schema, and output schema without executing backend application logic through MCP.

Installation

dotnet add package LowCodeHub.MinimalEndpoints.Mcp

Quick Start

using LowCodeHub.MinimalEndpoints.Mcp.Extensions;

builder.Services.AddMcpApiCatalog(options =>
{
    options.ServerName = "orders-api";
    options.ServerTitle = "Orders API";
    options.ApiKey = builder.Configuration["Mcp:ApiKey"];
});

var app = builder.Build();

app.UseAuthentication();
app.UseAuthorization();

app.MapPut("/orders/{orderId:guid}", HandleUpdateOrder)
   .EnableMcp<UpdateOrderMcpInput, OrderDto>("orders_update", "Update an order by id.", options =>
   {
       options.ReadOnly = false;
       options.Destructive = false;
       options.Idempotent = true;
   });

app.MapMcpApiCatalog("/mcp");

The MCP endpoint is protected with:

Authorization: Bearer <Mcp:ApiKey>

The input type should include everything an agent needs to understand the API call, including route params, query params, and body data:

public sealed record UpdateOrderMcpInput(
    Guid OrderId,
    UpdateOrderBody Body);

public sealed record UpdateOrderBody(
    string CustomerName,
    IReadOnlyList<UpdateOrderItem> Items);

For this tool, MCP clients see:

.EnableMcp<UpdateOrderMcpInput, OrderDto>("orders_update", "Update an order by id.");

The server advertises:

  • tool name: orders_update
  • description: Update an order by id.
  • input schema: generated from UpdateOrderMcpInput
  • output schema: generated from OrderDto

tools/call returns the contract by default. It does not run HandleUpdateOrder, call IOperation, or mutate application state.

Explicit Schemas

If a generated schema is not enough, provide explicit JSON Schema objects:

app.MapGet("/orders/{orderId:guid}", HandleGetOrder)
   .EnableMcp<GetOrderMcpInput, OrderDto>(options =>
   {
       options.ToolName = "orders_get";
       options.Description = "Get an order by id.";
       options.InputSchema = JsonSerializer.SerializeToElement(new
       {
           type = "object",
           required = new[] { "orderId" },
           properties = new
           {
               orderId = new
               {
                   type = "string",
                   format = "uuid",
                   description = "The order id from the route."
               }
           }
       });
   });

Security Notes

Set LowCodeHubMcpOptions.ApiKey in AddMcpApiCatalog. When RequireApiKey is enabled, MapMcpApiCatalog automatically applies the package's bearer API-key authorization policy.

MCP tool annotations are hints for clients. They do not replace server-side authorization on your real HTTP APIs.

Product Compatible and additional computed target framework versions.
.NET 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
0.0.1 98 6/1/2026