Table of Contents

Method HandleMcpRequestAsync

Namespace
Sisk.ModelContextProtocol
Assembly
Sisk.ModelContextProtocol.dll

HandleMcpRequestAsync(HttpRequest, CancellationToken)

Handles an incoming HTTP request using the configured MCP provider.

public static Task<HttpResponse> HandleMcpRequestAsync(this HttpRequest request, CancellationToken cancellation = default)

Parameters

request HttpRequest

The HTTP request to handle.

cancellation CancellationToken

A token to monitor for cancellation requests.

Returns

Task<HttpResponse>

A task that represents the asynchronous operation, containing the HTTP response.

Exceptions

InvalidOperationException

Thrown if the MCP provider has not been configured.