Class McpAdapterEndpoints

Namespace
Kuestenlogik.Bowire.Protocol.Mcp
Assembly
Kuestenlogik.Bowire.Protocol.Mcp.dll

Map-time wiring for the Bowire MCP adapter. The DI-time half lives in AddBowireMcpAdapter(IServiceCollection, string?); this just mounts the SDK's streamable-HTTP transport on the host's route table plus a small info-endpoint the workbench's Settings → General tab consults.

public static class McpAdapterEndpoints
Inheritance
McpAdapterEndpoints
Inherited Members

Remarks

Security warning: mounting this endpoint allows any MCP client to invoke any discovered API method. Do not enable in production unless the surface is intentional.

Usage:

builder.Services.AddBowireMcpAdapter(opts =>
{
    opts.UpstreamServerUrl = "http://localhost:5005";
});
var app = builder.Build();
app.MapBowire(opts => opts.Title = "My API");
app.MapBowireMcpAdapter();   // default: /bowire/mcp/adapter

Dual-mount coexistence (#287): when paired with Kuestenlogik.Bowire.Mcp.MapBowireMcp, both endpoints share the same SDK streamable-HTTP transport and route by URL through BowireMcpDualHandlerDispatcher. Overlapping prefixes throw at startup so a typo doesn't silently shadow one endpoint with the other.

Methods

MapBowireMcpAdapter(IEndpointRouteBuilder, string)

Mount the MCP adapter at prefix. Defaults to /bowire/mcp/adapter — distinct from the full-server's /bowire/mcp default so both can coexist on the same host without conflict. Pass an empty string to mount at the site root (the standalone CLI does this, since it mounts the workbench at / and the adapter alone has no sibling to collide with).

public static IEndpointRouteBuilder MapBowireMcpAdapter(this IEndpointRouteBuilder endpoints, string prefix = "/bowire/mcp/adapter")

Parameters

endpoints IEndpointRouteBuilder

The endpoint route builder.

prefix string

URL prefix the adapter mounts under. Defaults to /bowire/mcp/adapter; pass "" to mount at site root (legacy standalone behaviour, POST /mcp).

Returns

IEndpointRouteBuilder