You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ To install the SDK and build your first MCP client and server, see [Getting star
20
20
| - | - |
21
21
|[Capabilities](capabilities/capabilities.md)| Learn how client and server capabilities are negotiated during initialization, including protocol version negotiation. |
22
22
|[Transports](transports/transports.md)| Learn how to configure stdio, Streamable HTTP, and SSE transports for client-server communication. |
23
+
|[Stateless and Stateful](stateless/stateless.md)| Learn when to use stateless vs. stateful mode for HTTP servers and how to configure sessions. |
23
24
|[Ping](ping/ping.md)| Learn how to verify connection health using the ping mechanism. |
24
25
|[Progress tracking](progress/progress.md)| Learn how to track progress for long-running operations through notification messages. |
25
26
|[Cancellation](cancellation/cancellation.md)| Learn how to cancel in-flight MCP requests using cancellation tokens and notifications. |
@@ -43,7 +44,6 @@ To install the SDK and build your first MCP client and server, see [Getting star
43
44
|[Completions](completions/completions.md)| Learn how to implement argument auto-completion for prompts and resource templates. |
44
45
|[Logging](logging/logging.md)| Learn how to implement logging in MCP servers and how clients can consume log messages. |
45
46
|[Pagination](pagination/pagination.md)| Learn how to use cursor-based pagination when listing tools, prompts, and resources. |
46
-
|[Stateless and Stateful](stateless/stateless.md)| Learn when to use stateless vs. stateful mode for HTTP servers and how to configure sessions. |
47
47
|[HTTP Context](httpcontext/httpcontext.md)| Learn how to access the underlying `HttpContext` for a request. |
48
48
|[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. |
> Logging is **deprecated** as of MCP specification revision `2026-07-28` ([SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577), [MCP9005](xref:list-of-diagnostics#obsolete-apis)) and may be removed in a future version.
16
+
14
17
This document describes how to implement logging in MCP servers and how clients can consume log messages.
15
18
16
19
### Logging levels
@@ -32,8 +35,8 @@ different set of logging levels. The following table shows the levels and how th
32
35
|`emergency`|| System is unusable ||
33
36
34
37
**Note:** .NET's [ILogger] also supports a `Trace` level (more verbose than Debug) log level.
35
-
As there is no equivalent level in the MCP logging levels, Trace level logs messages are silently
36
-
dropped when sending messages to the client.
38
+
As there is no more verbose level in the MCP logging levels, Trace level log messages are mapped to
> Roots are **deprecated** as of MCP specification revision `2026-07-28` ([SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577), [MCP9005](xref:list-of-diagnostics#obsolete-apis)) and may be removed in a future version.
16
+
14
17
### Overview
15
18
16
19
Roots provide a mechanism for the client to tell the server which directories, projects, or repositories are relevant to the current session. A server might use roots to:
@@ -57,7 +60,7 @@ await using var client = await McpClient.CreateAsync(transport, options);
57
60
58
61
### Requesting roots from the server
59
62
60
-
Servers can request the client's root list using <xref:ModelContextProtocol.Server.McpServer.RequestRootsAsync*>. This is a server-to-client request, so it requires [stateful mode or stdio](xref:stateless) — it is not available in [stateless mode](xref:stateless#stateless-mode-recommended).
63
+
Servers can request the client's root list using <xref:ModelContextProtocol.Server.McpServer.RequestRootsAsync*>. This is a server-to-client request, so it requires [stateful mode or stdio](xref:stateless) — it is not available in [stateless mode](xref:stateless#stateless-mode-recommended). For a stateless-compatible alternative, throw `InputRequiredException` from your handler through MRTR — see [Multi round-trip requests (MRTR)](#multi-round-trip-requests-mrtr).
61
64
62
65
```csharp
63
66
[McpServerTool, Description("Lists the user's project roots")]
> Sampling is **deprecated** as of MCP specification revision `2026-07-28` ([SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577), [MCP9005](xref:list-of-diagnostics#obsolete-apis)) and may be removed in a future version.
16
+
14
17
> [!NOTE]
15
-
> Sampling is a **server-to-client request** — the server sends a request back to the client over an open connection. This requires [stateful mode or stdio](xref:stateless). Sampling is not available in [stateless mode](xref:stateless#stateless-mode-recommended) because stateless servers cannot send requests to clients.
18
+
> Sampling is a **server-to-client request** — the server sends a request back to the client over an open connection. This requires [stateful mode or stdio](xref:stateless). Sampling is not available in [stateless mode](xref:stateless#stateless-mode-recommended) because stateless servers cannot send requests to clients. For a stateless-compatible alternative, throw `InputRequiredException` from your handler through MRTR — see [Multi round-trip requests (MRTR)](#multi-round-trip-requests-mrtr).
0 commit comments