Improve docs landing page (#1114)

This commit is contained in:
Genevieve Warren 2025-12-19 12:45:35 -08:00 • committed by GitHub
commit aa2f8f444b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@ uid: httpcontext
## HTTP Context
When using the Streamable HTTP transport, an MCP server might need to access the underlying [HttpContext] for a request.
The [HttpContext] contains request metadata such as the HTTP headers, authorization context, and the actual path and query string for the request.
The [HttpContext] object contains request metadata such as the HTTP headers, authorization context, and the actual path and query string for the request.
To access the [HttpContext], the MCP server should add the [IHttpContextAccessor] service to the application service collection (typically in Program.cs).
Then any classes, for example, a class containing MCP tools, should accept an [IHttpContextAccessor] in their constructor and store this for use by its methods.