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
<PackageReference Include="LowCodeHub.MinimalEndpoints.Mcp" Version="0.0.1" />
<PackageVersion Include="LowCodeHub.MinimalEndpoints.Mcp" Version="0.0.1" />
<PackageReference Include="LowCodeHub.MinimalEndpoints.Mcp" />
paket add LowCodeHub.MinimalEndpoints.Mcp --version 0.0.1
#r "nuget: LowCodeHub.MinimalEndpoints.Mcp, 0.0.1"
#:package LowCodeHub.MinimalEndpoints.Mcp@0.0.1
#addin nuget:?package=LowCodeHub.MinimalEndpoints.Mcp&version=0.0.1
#tool nuget:?package=LowCodeHub.MinimalEndpoints.Mcp&version=0.0.1
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 | Versions 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. |
-
net10.0
- LowCodeHub.MinimalEndpoints (>= 0.0.6)
- ModelContextProtocol.AspNetCore (>= 1.3.0)
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 |