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: src/ModelContextProtocol.Core/Client/McpClient.Methods.cs
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,19 @@ public abstract partial class McpClient : McpSession
21
21
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
22
22
/// <returns>An <see cref="McpClient"/> that's connected to the specified server.</returns>
23
23
/// <exception cref="ArgumentNullException"><paramref name="clientTransport"/> is <see langword="null"/>.</exception>
24
+
/// <exception cref="HttpRequestException">An error occurred while connecting to the server over HTTP.</exception>
25
+
/// <remarks>
26
+
/// <para>
27
+
/// When using an HTTP-based transport (such as <see cref="HttpClientTransport"/>), this method may throw
28
+
/// <see cref="HttpRequestException"/> if there is a problem establishing the connection to the MCP server.
29
+
/// </para>
30
+
/// <para>
31
+
/// If the server requires authentication and credentials are not provided or are invalid, an
32
+
/// <see cref="HttpRequestException"/> with an HTTP 401 Unauthorized status code will be thrown.
33
+
/// To authenticate with a protected server, configure the <see cref="HttpClientTransportOptions.OAuth"/>
34
+
/// property of the transport with appropriate credentials before calling this method.
0 commit comments