Table of Contents

Namespace ModelContextProtocol.Server

Classes

DelegatingMcpServerPrompt

Provides an McpServerPrompt that delegates all operations to an inner McpServerPrompt.

DelegatingMcpServerResource

Provides an McpServerResource that delegates all operations to an inner McpServerResource.

DelegatingMcpServerTool

Provides an McpServerTool that delegates all operations to an inner McpServerTool.

DistributedCacheEventStreamStore

An ISseEventStreamStore implementation backed by IDistributedCache.

DistributedCacheEventStreamStoreOptions

Configuration options for DistributedCacheEventStreamStore.

McpMetaAttribute

Specifies metadata for an MCP server primitive (tool, prompt, or resource).

McpServer

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

McpServerFilters

Provides filter collections for MCP server handlers.

McpServerHandlers

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

McpServerOptions

Provides configuration options for the MCP server.

McpServerPrimitiveCollection<T>

Provides a thread-safe collection of T instances, indexed by their names.

McpServerPrompt

Represents an invocable prompt used by Model Context Protocol clients and servers.

McpServerPromptAttribute

Used to indicate that a method should be considered an McpServerPrompt.

McpServerPromptCreateOptions

Provides options for controlling the creation of an McpServerPrompt.

McpServerPromptTypeAttribute

Specifies that a type contains methods that should be exposed as McpServerPrompts.

McpServerResource

Represents an invocable resource used by Model Context Protocol clients and servers.

McpServerResourceAttribute

Indicates that a method or property should be considered an McpServerResource.

McpServerResourceCollection

Provides a thread-safe collection of McpServerResource instances, indexed by their URI templates.

McpServerResourceCreateOptions

Provides options for controlling the creation of an McpServerResource.

McpServerResourceTypeAttribute

Indicates that a type contains members that should be exposed as McpServerResources.

McpServerTool

Represents an invocable tool used by Model Context Protocol clients and servers.

McpServerToolAttribute

Indicates that a method should be considered an McpServerTool.

McpServerToolCreateOptions

Provides options for controlling the creation of an McpServerTool.

McpServerToolTypeAttribute

Indicates that a type contains methods that should be exposed as McpServerTools.

MessageContext

Provides a context container that provides access to the server and resources for processing a JSON-RPC message.

RequestContext<TParams>

Provides a context container that provides access to the client request parameters and resources for the request.

SseEventStreamOptions

Configuration options for creating an SSE event stream.

SseResponseStreamTransport

Provides an ITransport implementation using Server-Sent Events (SSE) for server-to-client communication.

StdioServerTransport

Provides an ITransport implemented via "stdio" (standard input/output).

StreamServerTransport

Provides an ITransport implemented using a pair of input and output streams.

StreamableHttpServerTransport

Provides an ITransport implementation using Server-Sent Events (SSE) for server-to-client communication.

Interfaces

IMcpServerPrimitive

Represents an MCP server primitive, like a tool or a prompt.

ISseEventStreamReader

Provides read access to an SSE event stream, allowing events to be consumed asynchronously.

ISseEventStreamStore

Provides storage and retrieval of SSE event streams, enabling resumability and redelivery of events.

ISseEventStreamWriter

Provides write access to an SSE event stream, allowing events to be written and tracked with unique IDs.

Enums

SseEventStreamMode

Represents the mode of an SSE event stream.

Delegates

McpMessageFilter

Delegate type for applying filters to JSON-RPC messages.

McpMessageHandler

Delegate type for handling incoming JSON-RPC messages.

McpRequestFilter<TParams, TResult>

Delegate type for applying filters to incoming MCP requests with specific parameter and result types.

McpRequestHandler<TParams, TResult>

Delegate type for handling incoming MCP requests with specific parameter and result types.