diff --git a/docs/concepts/elicitation/elicitation.md b/docs/concepts/elicitation/elicitation.md index 1b97ea0a8..aa5cdcdda 100644 --- a/docs/concepts/elicitation/elicitation.md +++ b/docs/concepts/elicitation/elicitation.md @@ -10,8 +10,9 @@ uid: elicitation The **elicitation** feature allows servers to request additional information from users during interactions. This enables more dynamic and interactive AI experiences, making it easier to gather necessary context before executing tasks. The protocol supports two modes of elicitation: -- **Form (In-Band)**: The server requests structured data (strings, numbers, booleans, enums) which the client collects via a form interface and returns to the server. -- **URL Mode**: The server provides a URL for the user to visit (e.g., for OAuth, payments, or sensitive data entry). The interaction happens outside the MCP client. + +- **Form (In-Band)**: The server requests structured data (strings, numbers, Booleans, enums) which the client collects via a form interface and returns to the server. +- **URL Mode**: The server provides a URL for the user to visit (for example, for OAuth, payments, or sensitive data entry). The interaction happens outside the MCP client. ### Server Support for Elicitation @@ -208,6 +209,7 @@ await using var completionHandler = client.RegisterNotificationHandler( ``` This pattern is particularly useful for: + - **Third-party OAuth flows**: When the MCP server needs to obtain tokens from external services on behalf of the user - **Payment processing**: When user confirmation is required through a secure payment interface - **Sensitive credential collection**: When API keys or other secrets must be entered directly on a trusted server page rather than through the MCP client diff --git a/docs/concepts/httpcontext/httpcontext.md b/docs/concepts/httpcontext/httpcontext.md index 32c0eb2fd..7fc408835 100644 --- a/docs/concepts/httpcontext/httpcontext.md +++ b/docs/concepts/httpcontext/httpcontext.md @@ -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. diff --git a/docs/concepts/index.md b/docs/concepts/index.md index e038c8996..044d4fee7 100644 --- a/docs/concepts/index.md +++ b/docs/concepts/index.md @@ -1,2 +1,13 @@ +# Conceptual documentation Welcome to the conceptual documentation for the Model Context Protocol SDK. Here you'll find high-level overviews, explanations, and guides to help you understand how the SDK implements the Model Context Protocol. + +## Contents + +| Title | Description | +| - | - | +| [Progress tracking](progress/progress.md) | Learn how to track progress for long-running operations through notification messages. | +| [Elicitation](elicitation/elicitation.md) | Learn how to request additional information from users during interactions. | +| [Logging](logging/logging.md) | Learn how to implement logging in MCP servers and how clients can consume log messages. | +| [HTTP Context](httpcontext/httpcontext.md) | Learn how to access the underlying `HttpContext` for a request. | +| [MCP Server Handler Filters](filters.md) | Learn how to add filters to the handler pipeline. Filters let you wrap the original handler with additional functionality. | diff --git a/docs/index.md b/docs/index.md index 9a4f0534a..f329a972e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,7 +4,12 @@ _layout: landing # Overview -The official C# SDK for the [Model Context Protocol](https://modelcontextprotocol.io/), enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. For more details on available functionality, please see the [API documentation](https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.html). +This SDK is the official C# SDK for the [Model Context Protocol](https://modelcontextprotocol.io/), enabling .NET applications, services, and libraries to implement and interact with MCP clients and servers. + +For more details on available functionality, see: + +- [Conceptual documentation](https://modelcontextprotocol.github.io/csharp-sdk/concepts/index.html) +- [API documentation](https://modelcontextprotocol.github.io/csharp-sdk/api/ModelContextProtocol.html). ## About MCP @@ -12,7 +17,7 @@ The Model Context Protocol (MCP) is an open protocol that standardizes how appli For more information about MCP: -- [Official Documentation](https://modelcontextprotocol.io/) +- [Official MCP Documentation](https://modelcontextprotocol.io/) - [Protocol Specification](https://modelcontextprotocol.io/specification/) - [GitHub Organization](https://github.com/modelcontextprotocol)