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.

McpServerExtensions

Provides extension methods for interacting with an IMcpServer instance.

McpServerFactory

Provides a factory for creating IMcpServer instances.

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

Used to attribute a type containing methods that should be exposed as McpServerPrompts.

McpServerResource

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

McpServerResourceAttribute

Used to indicate that a method or property should be considered an McpServerResource.

McpServerResourceCreateOptions

Provides options for controlling the creation of an McpServerResource.

McpServerResourceTypeAttribute

Used to attribute a type containing members that should be exposed as McpServerResources.

McpServerTool

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

McpServerToolAttribute

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

McpServerToolCreateOptions

Provides options for controlling the creation of an McpServerTool.

McpServerToolTypeAttribute

Used to attribute a type containing methods that should be exposed as McpServerTools.

RequestContext<TParams>

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

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

IMcpServer

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

IMcpServerPrimitive

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