Table of Contents

Namespace ModelContextProtocol.Client

Classes

ClientCompletionDetails

Provides details about why an MCP client session completed.

ClientTransportClosedException

An IOException that indicates the client transport was closed, carrying structured ClientCompletionDetails about why the closure occurred.

HttpClientCompletionDetails

Provides details about the completion of an HTTP-based MCP client session, including sessions using the legacy SSE transport or the Streamable HTTP transport.

HttpClientTransport

Provides an IClientTransport over HTTP using the Server-Sent Events (SSE) or Streamable HTTP protocol.

HttpClientTransportOptions

Provides options for configuring HttpClientTransport instances.

McpClient

Represents an instance of a Model Context Protocol (MCP) client session that connects to and communicates with an MCP server.

McpClientHandlers

Provides a container for handlers used in the creation of an MCP client.

McpClientOptions

Provides configuration options for creating McpClient instances.

McpClientPrompt

Represents a named prompt that can be retrieved from an MCP server and invoked with arguments.

McpClientResource

Represents a named resource that can be retrieved from an MCP server.

McpClientResourceTemplate

Represents a named resource template that can be retrieved from an MCP server.

McpClientTool

Provides an Microsoft.Extensions.AI.AIFunction that calls a tool via an McpClient.

ResumeClientSessionOptions

Provides the metadata captured from a previous MCP client session that is required to resume it.

StdioClientCompletionDetails

Provides details about the completion of a stdio-based MCP client session.

StdioClientTransport

Provides a IClientTransport implemented via "stdio" (standard input/output).

StdioClientTransportOptions

Provides options for configuring StdioClientTransport instances.

Interfaces

IClientTransport

Represents a transport mechanism for Model Context Protocol (MCP) client-to-server communication.

Enums

HttpTransportMode

Specifies the transport mode for HTTP client connections.