Table of Contents

Namespace ModelContextProtocol.Protocol

Classes

Annotations

Represents annotations that can be attached to content, resources, and resource templates.

Argument

Represents an argument used in completion requests to provide context for auto-completion functionality.

AudioContentBlock

Represents audio provided to or from an LLM.

BlobResourceContents

Represents the binary contents of a resource in the Model Context Protocol.

CallToolRequestParams

Represents the parameters used with a ToolsCall request from a client to invoke a tool provided by the server.

CallToolResult

Represents the result of a ToolsCall request from a client to invoke a tool provided by the server.

CancelTaskRequestParams

Represents the parameters for a tasks/cancel request to signal intent to cancel an in-progress task.

CancelTaskResult

Represents the result of a tasks/cancel request. This is an empty acknowledgement.

CancelledNotificationParams

Represents a notification indicating that a request has been cancelled by the client, and that any associated processing should cease immediately.

CancelledTaskNotificationParams

Task notification for a task that was cancelled.

CancelledTaskResult

Represents a task that was cancelled before completion.

ClientCapabilities

Represents the capabilities that a client supports.

CompleteContext

Represents additional context information for completion requests.

CompleteRequestParams

Represents the parameters used with a CompletionComplete request from a client to ask a server for auto-completion suggestions.

CompleteResult

Represents the server's response to a CompletionComplete request, containing suggested values for a given argument.

CompletedTaskNotificationParams

Task notification for a task that has completed successfully.

CompletedTaskResult

Represents a task that has completed successfully, carrying the final result.

Completion

Represents a completion object in the server's response to a CompletionComplete request.

CompletionsCapability

Represents the completions capability for providing auto-completion suggestions for prompt arguments and resource references.

ContentBlock

Represents content within the Model Context Protocol (MCP).

CreateMessageRequestParams

Represents the parameters used with a SamplingCreateMessage request from a server to sample an LLM via the client.

CreateMessageResult

Represents a client's response to a SamplingCreateMessage from the server.

CreateTaskResult

Represents the result returned by a server when it creates a task in lieu of a standard result.

DiscoverRequestParams

Represents the parameters used with a ServerDiscover request.

DiscoverResult

Represents the result returned from a ServerDiscover request.

ElicitRequestParams

Represents a message issued from the server to elicit additional information from the user via the client.

ElicitRequestParams.BooleanSchema

Represents a schema for a Boolean type.

ElicitRequestParams.EnumSchemaOption

Represents a single option in a titled enum schema with a constant value and display title.

ElicitRequestParams.LegacyTitledEnumSchema

Represents a legacy schema for an enum type with enumNames.

ElicitRequestParams.NumberSchema

Represents a schema for a number or integer type.

ElicitRequestParams.PrimitiveSchemaDefinition

Represents a restricted subset of JSON Schema: ElicitRequestParams.StringSchema, ElicitRequestParams.NumberSchema, ElicitRequestParams.BooleanSchema, ElicitRequestParams.UntitledSingleSelectEnumSchema, ElicitRequestParams.TitledSingleSelectEnumSchema, ElicitRequestParams.UntitledMultiSelectEnumSchema, ElicitRequestParams.TitledMultiSelectEnumSchema, or ElicitRequestParams.LegacyTitledEnumSchema (deprecated).

ElicitRequestParams.RequestSchema

Represents a request schema used in a form mode elicitation request.

ElicitRequestParams.StringSchema

Represents a schema for a string type.

ElicitRequestParams.TitledEnumItemsSchema

Represents the items schema for titled multi-select enum arrays.

ElicitRequestParams.TitledMultiSelectEnumSchema

Represents a schema for multiple-selection enumeration with display titles for each option.

ElicitRequestParams.TitledSingleSelectEnumSchema

Represents a schema for single-selection enumeration with display titles for each option.

ElicitRequestParams.UntitledEnumItemsSchema

Represents the items schema for untitled multi-select enum arrays.

ElicitRequestParams.UntitledMultiSelectEnumSchema

Represents a schema for multiple-selection enumeration without display titles for options.

ElicitRequestParams.UntitledSingleSelectEnumSchema

Represents a schema for single-selection enumeration without display titles for options.

ElicitResult

Represents the client's response to an elicitation request.

ElicitResult<T>

Represents the client's response to an elicitation request, with typed content payload.

ElicitationCapability

Represents the capability for a client to provide server-requested additional information during interactions.

ElicitationCompleteNotificationParams

Represents the parameters used with a ElicitationCompleteNotification notification emitted after a URL-mode elicitation finishes out-of-band.

EmbeddedResourceBlock

Represents the contents of a resource, embedded into a prompt or tool call result.

EmptyResult

Represents an empty result object for operations that need to indicate successful completion but don't need to return any specific data.

FailedTaskNotificationParams

Task notification for a task that failed.

FailedTaskResult

Represents a task that failed due to a JSON-RPC error during execution.

FormElicitationCapability

Represents the capability for form-based (in-band) elicitation.

GetPromptRequestParams

Represents the parameters used with a PromptsGet request from a client to get a prompt provided by a server.

GetPromptResult

Represents a server's response to a PromptsGet request from the client.

GetTaskRequestParams

Represents the parameters for a tasks/get request to poll for task completion.

GetTaskResult

Represents the result of a tasks/get request, containing the full task state.

Icon

Represents an icon that can be used to visually identify an implementation, resource, tool, or prompt.

ImageContentBlock

Represents an image provided to or from an LLM.

Implementation

Provides the name and version of an MCP implementation.

InitializeRequestParams

Represents the parameters used with a Initialize request sent by a client to a server during the protocol handshake.

InitializeResult

Represents the result of a Initialize request sent to the server during connection establishment.

InitializedNotificationParams

Represents the parameters used with a InitializedNotification sent from the client to the server after initialization has finished.

InputRequest

Represents a server-initiated request that the client must fulfill as part of an MRTR (Multi Round-Trip Request) flow.

InputRequest.Converter

Provides JSON serialization support for InputRequest.

InputRequiredException

The exception that is thrown by a server handler to return an InputRequiredResult to the client, signaling that additional input is needed before the request can be completed.

InputRequiredResult

Represents an input-required result sent by the server to indicate that additional input is needed before the request can be completed.

InputRequiredTaskNotificationParams

Task notification for a task that requires input from the client.

InputRequiredTaskResult

Represents a task that requires input from the client before it can proceed.

InputResponse

Represents a client's response to a server-initiated InputRequest as part of an MRTR (Multi Round-Trip Request) flow.

InputResponse.Converter

Provides JSON serialization support for InputResponse.

JsonRpcError

Represents an error response message in the JSON-RPC protocol.

JsonRpcErrorDetail

Represents detailed error information for JSON-RPC error responses.

JsonRpcMessage

Represents any JSON-RPC message used in the Model Context Protocol (MCP).

JsonRpcMessageContext

Contains contextual information for JSON-RPC messages that is not part of the JSON-RPC protocol specification.

JsonRpcMessageWithId

Represents a JSON-RPC message used in the Model Context Protocol (MCP) and that includes an ID.

JsonRpcNotification

Represents a notification message in the JSON-RPC protocol.

JsonRpcRequest

Represents a request message in the JSON-RPC protocol.

JsonRpcResponse

Represents a successful response message in the JSON-RPC protocol.

ListPromptsRequestParams

Represents the parameters used with a PromptsList request from a client to request a list of prompts available from the server.

ListPromptsResult

Represents a server's response to a PromptsList request from the client, containing available prompts.

ListResourceTemplatesRequestParams

Represents the parameters used with a ResourcesTemplatesList request from a client to request a list of resource templates available from the server.

ListResourceTemplatesResult

Represents a server's response to a ResourcesTemplatesList request from the client, containing available resource templates.

ListResourcesRequestParams

Represents the parameters used with a ResourcesList request from a client to request a list of resources available from the server.

ListResourcesResult

Represents a server's response to a ResourcesList request from the client, containing available resources.

ListRootsRequestParams

Represents the parameters used with a RootsList request from a server to request a list of roots available from the client.

ListRootsResult

Represents a client's response to a RootsList request from the server, containing available roots.

ListToolsRequestParams

Represents the parameters used with a ToolsList request from a client to request a list of tools available from the server.

ListToolsResult

Represents a server's response to a ToolsList request from the client, containing available tools.

LoggingCapability

Represents the logging capability configuration for a Model Context Protocol server.

LoggingMessageNotificationParams

Represents the parameters used with a LoggingMessageNotification notification sent whenever a log message is generated.

McpExtensions

Provides constants for well-known MCP extension identifiers.

McpHeaderEncoder

Encodes and decodes parameter values for use in MCP HTTP headers according to the HTTP Standardization SEP.

MetaKeys

Provides constants for well-known _meta field keys defined by the MCP protocol and its extensions.

MissingRequiredClientCapabilityErrorData

Represents the payload for the MissingRequiredClientCapability JSON-RPC error.

ModelHint

Provides hints to use for model selection.

ModelPreferences

Represents a server's preferences for model selection, requested of the client during sampling.

NotificationMethods

Provides constants with the names of common notification methods used in the MCP protocol.

NotificationParams

Provides a base class for notification parameters.

PaginatedRequestParams

Provides a base class for paginated requests.

PaginatedResult

Provides a base class for result payloads that support cursor-based pagination.

PingRequestParams

Represents the parameters used with a Ping request to verify server connectivity.

PingResult

Represents the result of a Ping request in the Model Context Protocol.

ProgressNotificationParams

Represents an out-of-band notification used to inform the receiver of a progress update for a long-running request.

Prompt

Represents a prompt that the server offers.

PromptArgument

Represents an argument that a prompt can accept for templating and customization.

PromptListChangedNotificationParams

Represents the parameters used with a PromptListChangedNotification notification from the server to the client, informing it that the list of prompts it offers has changed.

PromptMessage

Represents a message within the Model Context Protocol (MCP) system, used for communication between clients and AI models.

PromptReference

Represents a reference to a prompt, identified by its name.

PromptsCapability

Represents the server's capability to provide predefined prompt templates that clients can use.

ReadResourceRequestParams

Represents the parameters used with a ResourcesRead request from a client to get a resource provided by a server.

ReadResourceResult

Represents a server's response to a ResourcesRead request from the client.

Reference

Represents a reference to a resource or prompt in the Model Context Protocol.

RequestMethods

Provides constants with the names of common request methods used in the MCP protocol.

RequestParams

Provides a base class for all request parameters.

RequestParamsMetadata

Provides metadata related to the request that provides additional protocol-level information.

Resource

Represents a known resource that the server is capable of reading.

ResourceContents

Provides a base class representing contents of a resource in the Model Context Protocol.

ResourceLinkBlock

Represents a resource that the server is capable of reading, included in a prompt or tool call result.

ResourceListChangedNotificationParams

Represents the parameters used with a ResourceListChangedNotification notification from the server to the client, informing it that the list of resources it can read from has changed.

ResourceTemplate

Represents a known resource template that the server is capable of reading.

ResourceTemplateReference

Represents a reference to a resource or resource template definition.

ResourceUpdatedNotificationParams

Represents the parameters used with a ResourceUpdatedNotification notification sent whenever a subscribed resource changes.

ResourcesCapability

Represents the resources capability configuration.

Result

Provides a base class for result payloads.

ResultOrCreatedTask<TResult>

Represents the result of a request that supports task-augmented execution, which may be either the standard result or a CreateTaskResult indicating asynchronous processing.

Root

Represents a root URI and its metadata in the Model Context Protocol.

RootsCapability

Represents a client capability that enables root resource discovery in the Model Context Protocol.

RootsListChangedNotificationParams

Represents the parameters used with a RootsListChangedNotification notification from the client to the server, informing it that the list of roots has changed.

SamplingCapability

Represents the capability for a client to generate text or other content using an AI model.

SamplingContextCapability

Represents the sampling context capability.

SamplingMessage

Represents a message issued to or received from an LLM API within the Model Context Protocol.

SamplingToolsCapability

Represents the sampling tools capability.

ServerCapabilities

Represents the capabilities that a server supports.

SetLevelRequestParams

Represents the parameters used with a LoggingSetLevel request from a client to enable or adjust logging.

StreamClientTransport

Provides an IClientTransport implemented around a pair of input/output streams.

SubscribeRequestParams

Represents the parameters used with a ResourcesSubscribe request from a client to request real-time notifications from the server whenever a particular resource changes.

SubscriptionsAcknowledgedNotificationParams

Represents the parameters sent with a SubscriptionsAcknowledgedNotification.

SubscriptionsListenNotifications

Describes the set of notification types a client wants to receive (or that a server has agreed to deliver) for a SubscriptionsListen subscription.

SubscriptionsListenRequestParams

Represents the parameters used with a SubscriptionsListen request.

TaskStatusNotificationParams

Represents the parameters for a notifications/tasks notification sent by the server to push task status updates to the client.

TextContentBlock

Represents text provided to or from an LLM.

TextResourceContents

Represents text-based contents of a resource in the Model Context Protocol.

Tool

Represents a tool that the server is capable of calling.

ToolAnnotations

Represents additional properties describing a Tool to clients.

ToolChoice

Controls tool selection behavior for sampling requests.

ToolListChangedNotificationParams

Represents the parameters used with a ToolListChangedNotification notification from the server to the client, informing it that the list of tools it offers has changed.

ToolResultContentBlock

Represents the result of a tool use, provided by the user back to the assistant.

ToolUseContentBlock

Represents a request from the assistant to call a tool.

ToolsCapability

Represents the tools capability configuration. See the schema for details.

TransportBase

Provides a base class for implementing ITransport.

UnsubscribeRequestParams

Represents a message sent from the client to cancel resource update notifications from the server for a specific resource.

UnsupportedProtocolVersionErrorData

Represents the payload for the UnsupportedProtocolVersion JSON-RPC error.

UpdateTaskRequestParams

Represents the parameters for a tasks/update request to provide input responses to outstanding server-to-client requests on a task.

UpdateTaskResult

Represents the result of a tasks/update request. This is an empty acknowledgement.

UrlElicitationCapability

Represents the capability for URL mode (out-of-band) elicitation.

UrlElicitationRequiredErrorData

Represents the payload for the URL_ELICITATION_REQUIRED JSON-RPC error.

WorkingTaskNotificationParams

Task notification for a task that is currently being processed.

WorkingTaskResult

Represents a task that is currently being processed by the server.

Structs

ProgressToken

Represents a progress token, which can be either a string or an integer.

RequestId

Represents a JSON-RPC request identifier, which can be either a string or an integer.

Interfaces

IBaseMetadata

Provides a base interface for metadata with name (identifier) and title (display name) properties.

ICacheableResult

Represents a result that carries time-to-live (TTL) caching hints, allowing clients to cache the response for a period of time before re-fetching.

ITransport

Represents a transport mechanism for MCP (Model Context Protocol) communication between clients and servers.

Enums

CacheScope

Indicates the intended scope of a cached response, analogous to the HTTP Cache-Control: public and Cache-Control: private directives.

ContextInclusion

Specifies the context inclusion options for a request in the Model Context Protocol (MCP).

LoggingLevel

Indicates the severity of a log message.

McpTaskStatus

Represents the status of an MCP task.

Role

Represents the type of role in the Model Context Protocol conversation.