Table of Contents

Class McpTasksServerExtensions

Namespace
ModelContextProtocol.Extensions.Tasks
Assembly
ModelContextProtocol.Extensions.Tasks.dll

Extension methods for task-aware server operations.

public static class McpTasksServerExtensions
Inheritance
McpTasksServerExtensions
Inherited Members

Methods

CreateMcpTaskScope(McpServer, string, IMcpTaskStore)

Creates a scope that routes server-initiated requests through the specified task store.

public static IDisposable CreateMcpTaskScope(this McpServer server, string taskId, IMcpTaskStore store)

Parameters

server McpServer

The server whose outgoing requests should be redirected.

taskId string

The related task identifier.

store IMcpTaskStore

The task store used to surface input requests.

Returns

IDisposable

An IDisposable that restores the previous outgoing-request behavior.

SendTaskStatusNotificationAsync(McpServer, TaskStatusNotificationParams, CancellationToken)

Sends a task status notification to the connected client.

public static Task SendTaskStatusNotificationAsync(this McpServer server, TaskStatusNotificationParams notificationParams, CancellationToken cancellationToken = default)

Parameters

server McpServer

The server sending the notification.

notificationParams TaskStatusNotificationParams

The notification payload.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A task representing the send operation.