Welcome to the conceptual documentation for the Model Context Protocol SDK. Here you'll find high-level overviews, explanations, and guides to help you understand how the SDK implements the Model Context Protocol.
Install the SDK and build your first MCP client and server.
| Title | Description |
|---|
| Capabilities | Learn how client and server capabilities are negotiated during initialization, including protocol version negotiation. |
| Transports | Learn how to configure stdio, Streamable HTTP, and SSE transports for client-server communication. |
| Ping | Learn how to verify connection health using the ping mechanism. |
| Progress tracking | Learn how to track progress for long-running operations through notification messages. |
| Cancellation | Learn how to cancel in-flight MCP requests using cancellation tokens and notifications. |
| Tasks | Learn how to use task-based execution for long-running operations that can be polled for status and results. |
| Multi Round-Trip Requests (MRTR) | Learn how servers request client input during tool execution using input-required results and retries. |
| Title | Description |
|---|
| Sampling | Learn how servers request LLM completions from the client using the sampling feature. |
| Roots | Learn how clients provide filesystem roots to servers for context-aware operations. |
| Elicitation | Learn how to request additional information from users during interactions. |
| Title | Description |
|---|
| Tools | Learn how to implement and consume tools that return text, images, audio, and embedded resources. |
| Resources | Learn how to expose and consume data through MCP resources, including templates and subscriptions. |
| Prompts | Learn how to implement and consume reusable prompt templates with rich content types. |
| Completions | Learn how to implement argument auto-completion for prompts and resource templates. |
| Logging | Learn how to implement logging in MCP servers and how clients can consume log messages. |
| Pagination | Learn how to use cursor-based pagination when listing tools, prompts, and resources. |
| Stateless and Stateful | Learn when to use stateless vs. stateful mode for HTTP servers and how to configure sessions. |
| HTTP Context | Learn how to access the underlying HttpContext for a request. |
| MCP Server Handler Filters | Learn how to add filters to the handler pipeline. Filters let you wrap the original handler with additional functionality. |
| Title | Description |
|---|
| MCP Apps | Learn how to use the MCP Apps extension to deliver interactive UIs from MCP servers. |
| Identity and Roles | Learn how to access caller identity and roles in MCP tool, prompt, and resource handlers. |