Definition
Assembly: Microsoft.OData.Mcp.AspNetCore.dll Namespace: Microsoft.OData.Mcp.AspNetCore.Hosting Inheritance: System.ObjectSyntax
Summary
Configures OData MCP Tasks onAddODataMcp. Hosts call
ODataMcpServerBuilder.WithTasks and WaitForAnnotatedAction“1 here, not on
UseODataMcp and not via SDK WithTasks from app code.
Examples
Constructors
.ctor Inherited
Inherited from
objectSyntax
Properties
Server
Gets the SDK builder already used forWithHttpTransport and catalog handlers.
Hosts may attach logging filters. They must not call SDK WithTasks on it.
Syntax
Property Value
Type:Microsoft.Extensions.DependencyInjection.IMcpServerBuilder
Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
WaitForAnnotatedAction
Registers the host waiter used after URL elicitation is accepted.Syntax
Returns
Type:Microsoft.OData.Mcp.AspNetCore.Hosting.ODataMcpServerBuilder
This builder.
Type Parameters
TWaiter- The waiter type.
Remarks
Required for Succeeded after elicitation. Without it, the call completes with the Started payload after the URL is shown.WithTasks
Enables MCP Tasks for annotated actions only, usingInMemoryMcpTaskStorePlus.
Authenticated callers are isolated by user id. Unauthenticated callers share owner
UnauthenticatedTaskOwner and the task id is the secret.
Syntax
Returns
Type:Microsoft.OData.Mcp.AspNetCore.Hosting.ODataMcpServerBuilder
This builder.
WithTasks
Enables MCP Tasks and selects a plus store provider.Syntax
Parameters
Returns
Type:Microsoft.OData.Mcp.AspNetCore.Hosting.ODataMcpServerBuilder
This builder.
Exceptions
Examples
WithTasks
Enables MCP Tasks for annotated actions only. CRUD, functions, and unannotated actions stay one-shot.Syntax
Parameters
Returns
Type:Microsoft.OData.Mcp.AspNetCore.Hosting.ODataMcpServerBuilder
This builder.
Exceptions
Remarks
Wirestasks/get, tasks/update, and tasks/cancel from
ModelContextProtocol.Extensions.Tasks. Does not wrap every catalog tool:
the execution-mode selector returns Optional only for annotated actions whose
request advertised the Tasks extension. Stamps DefaultTimeToLive on
IMcpTaskStorePlus so Claude Code receives ttlMs.