> ## Documentation Index
> Fetch the complete documentation index at: https://ai.easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Summary of the Microsoft.OData.Mcp.AspNetCore.Hosting Namespace

## Types

### &#x20;Classes

| Name | Summary |
| - | - |
| [McpAnnotatedActionContext](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/McpAnnotatedActionContext.md) | Context passed to [CancellationToken)](https://learn.microsoft.com/dotnet/api/microsoft.odata.mcp.aspnetcore.hosting.imcpannotatedactionwaiter.waitasync\(microsoft.odata.mcp.aspnetcore.hosting.mcpannotatedactioncontext,system.threading.cancellationtoken\)) after elicitation is accepted. |
| [McpHttpContextAccessor](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/McpHttpContextAccessor.md) | [IHttpContextAccessor](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.http.ihttpcontextaccessor) that keeps the MCP request and the in-process OData  request as two contexts. [McpHttpContextAccessor.HttpContext](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/McpHttpContextAccessor.md#httpcontext) always returns [McpHttpContextAccessor.Active](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/McpHttpContextAccessor.md#active).  [HttpContext)](https://learn.microsoft.com/dotnet/api/microsoft.odata.mcp.aspnetcore.hosting.mcphttpcontextaccessor.start\(microsoft.aspnetcore.http.httpcontext\)) / [McpHttpContextAccessor.End](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/McpHttpContextAccessor.md#end) change which context is active without using  Microsoft's `HttpContextAccessor` setter (that setter nulls a shared holder and ends  the outer request). |
| [ODataMcpHostOptions](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpHostOptions.md) | Host options for `AddODataMcp`. |
| [ODataMcpPipeline](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpPipeline.md) | Host-lifetime state for in-process OData execution. `AddODataMcp` registers this disabled;  `UseODataMcp` is the on switch. |
| [ODataMcpPipelineStartupFilter](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpPipelineStartupFilter.md) | Captures the application `RequestDelegate` when MCP is on so tool calls can invoke  routing in-process instead of looping back through the server. |
| [ODataMcpRouteBinding](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpRouteBinding.md) | An OData route prefix bound to an [IEdmModel](https://learn.microsoft.com/dotnet/api/microsoft.odata.edm.iedmmodel). |
| [ODataMcpRouteDiscovery](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpRouteDiscovery.md) | Discovers `(prefix, IEdmModel)` pairs from ASP.NET Core endpoint routing without compiling against  Microsoft.AspNetCore.OData 7 or 8. |
| [ODataMcpServerBuilder](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpServerBuilder.md) | Configures OData MCP Tasks on `AddODataMcp`. Hosts call  [ODataMcpServerBuilder.WithTasks](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpServerBuilder.md#withtasks) and [WaitForAnnotatedAction\`\`1](https://learn.microsoft.com/dotnet/api/microsoft.odata.mcp.aspnetcore.hosting.odatamcpserverbuilder.waitforannotatedaction`-1) here, not on  `UseODataMcp` and not via SDK `WithTasks` from app code. |
| [ODataMcpSessionFactory](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/ODataMcpSessionFactory.md) | Builds one MCP session per enabled OData route prefix discovered from endpoint routing. |

### &#x20;Interfaces

| Name | Summary |
| - | - |
| [IMcpAnnotatedActionWaiter](https://ai.easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/AspNetCore/Hosting/IMcpAnnotatedActionWaiter.md) | Host completion source for an annotated action after URL elicitation is accepted. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.