1,295 pages for code.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Messages
Model Context Protocol · in the page
specification/2024-11-05/basic/messages
…number; result?: { [key: string]: unknown; } error?: { code: number; message: string; data?: unknown; } } ``` * Responses **MUST** include the same ID as the request they cor…
Transports
Model Context Protocol · in the page
specification/2024-11-05/basic/transports
…messages are sent as SSE `message` events, with the message content encoded as JSON in the event data. ```mermaid theme={null} sequenceDiagram participant Client participant Server Clien…
Roots
Model Context Protocol · in the page
specification/2024-11-05/client/roots
…`json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32601, "message": "Roots not supported", "data": { "reason": "Client does not have roots capability" }…
Sampling
Model Context Protocol · in the page
specification/2024-11-05/client/sampling
…ontent ```json theme={null} { "type": "image", "data": "base64-encoded-image-data", "mimeType": "image/jpeg" } ``` ### Model Preferences Model selection in MCP requires careful abstraction si…
Specification
Model Context Protocol · in the page
specification/2024-11-05/index
…tocol enables powerful capabilities through arbitrary data access and code execution paths. With this power comes important security and trust considerations that all implementors must carefully addre…
Prompts
Model Context Protocol · in the page
specification/2024-11-05/server/prompts
…", "id": 1, "result": { "prompts": [ { "name": "code_review", "description": "Asks the LLM to analyze code quality and suggest improvements", "arguments": […
Resources
Model Context Protocol · in the page
specification/2024-11-05/server/resources
…"file:///example.png", "mimeType": "image/png", "blob": "base64-encoded-data" } ``` ## Common URI Schemes The protocol defines several standard URI schemes. This list not exhaustive—implementati…
Tools
Model Context Protocol · in the page
specification/2024-11-05/server/tools
…"type": "string", "description": "City name or zip code" } }, "required": ["location"] } } ], "nextCursor": "next-page-cursor"…
Completion
Model Context Protocol · in the page
specification/2024-11-05/server/utilities/completion
…CP is designed to support interactive user experiences similar to IDE code completion. For example, applications may show completion suggestions in a dropdown or popup menu as users type, with the ab…
Pagination
Model Context Protocol · in the page
specification/2024-11-05/server/utilities/pagination
…## Error Handling Invalid cursors **SHOULD** result in an error with code -32602 (Invalid params).
Architecture
Model Context Protocol · in the page
specification/2025-03-26/architecture/index
…ze implementation overhead * Clear separation enables maintainable code 2. **Servers should be highly composable** * Each server provides focused functionality in isolation * Multiple server…
Authorization
Model Context Protocol · in the page
specification/2025-03-26/basic/authorization
…est align with the intended audience. For instance: 1. Authorization Code: useful when the client is acting on behalf of a (human) end user. * For instance, an agent calls an MCP tool implemented…
Overview
Model Context Protocol · in the page
specification/2025-03-26/basic/index
…number; result?: { [key: string]: unknown; } error?: { code: number; message: string; data?: unknown; } } ``` * Responses **MUST** include the same ID as the request they cor…
Lifecycle
Model Context Protocol · in the page
specification/2025-03-26/basic/lifecycle
…`json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32602, "message": "Unsupported protocol version", "data": { "supported": ["2024-11-05"], "requested":…
Transports
Model Context Protocol · in the page
specification/2025-03-26/basic/transports
# Transports MCP uses JSON-RPC to encode messages. JSON-RPC messages **MUST** be UTF-8 encoded. The protocol currently defines two standard transport mechanisms for client-server communication: 1.…
Roots
Model Context Protocol · in the page
specification/2025-03-26/client/roots
…`json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32601, "message": "Roots not supported", "data": { "reason": "Client does not have roots capability" }…
Sampling
Model Context Protocol · in the page
specification/2025-03-26/client/sampling
…ontent ```json theme={null} { "type": "image", "data": "base64-encoded-image-data", "mimeType": "image/jpeg" } ``` #### Audio Content ```json theme={null} { "type": "audio", "data": "base…
Specification
Model Context Protocol · in the page
specification/2025-03-26/index
…tocol enables powerful capabilities through arbitrary data access and code execution paths. With this power comes important security and trust considerations that all implementors must carefully addre…
Prompts
Model Context Protocol · in the page
specification/2025-03-26/server/prompts
…", "id": 1, "result": { "prompts": [ { "name": "code_review", "description": "Asks the LLM to analyze code quality and suggest improvements", "arguments": […
Resources
Model Context Protocol · in the page
specification/2025-03-26/server/resources
…"file:///example.png", "mimeType": "image/png", "blob": "base64-encoded-data" } ``` ## Common URI Schemes The protocol defines several standard URI schemes. This list not exhaustive—implementati…
Tools
Model Context Protocol · in the page
specification/2025-03-26/server/tools
…"type": "string", "description": "City name or zip code" } }, "required": ["location"] } } ], "nextCursor": "next-page-cursor"…
Completion
Model Context Protocol · in the page
specification/2025-03-26/server/utilities/completion
…CP is designed to support interactive user experiences similar to IDE code completion. For example, applications may show completion suggestions in a dropdown or popup menu as users type, with the ab…
Pagination
Model Context Protocol · in the page
specification/2025-03-26/server/utilities/pagination
…## Error Handling Invalid cursors **SHOULD** result in an error with code -32602 (Invalid params).
Architecture
Model Context Protocol · in the page
specification/2025-06-18/architecture/index
…ze implementation overhead * Clear separation enables maintainable code 2. **Servers should be highly composable** * Each server provides focused functionality in isolation * Multiple server…
Authorization
Model Context Protocol · in the page
specification/2025-06-18/basic/authorization
…these authorization servers, MCP clients will have to either: 1. Hardcode a client ID (and, if applicable, client credentials) specifically for the MCP client to use when interacting with that aut…
Overview
Model Context Protocol · in the page
specification/2025-06-18/basic/index
…number; result?: { [key: string]: unknown; } error?: { code: number; message: string; data?: unknown; } } ``` * Responses **MUST** include the same ID as the request they cor…
Lifecycle
Model Context Protocol · in the page
specification/2025-06-18/basic/lifecycle
…`json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32602, "message": "Unsupported protocol version", "data": { "supported": ["2024-11-05"], "requested":…
Transports
Model Context Protocol · in the page
specification/2025-06-18/basic/transports
# Transports MCP uses JSON-RPC to encode messages. JSON-RPC messages **MUST** be UTF-8 encoded. The protocol currently defines two standard transport mechanisms for client-server communication: 1.…
Roots
Model Context Protocol · in the page
specification/2025-06-18/client/roots
…`json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32601, "message": "Roots not supported", "data": { "reason": "Client does not have roots capability" }…
Sampling
Model Context Protocol · in the page
specification/2025-06-18/client/sampling
…ontent ```json theme={null} { "type": "image", "data": "base64-encoded-image-data", "mimeType": "image/jpeg" } ``` #### Audio Content ```json theme={null} { "type": "audio", "data": "base…
Specification
Model Context Protocol · in the page
specification/2025-06-18/index
…tocol enables powerful capabilities through arbitrary data access and code execution paths. With this power comes important security and trust considerations that all implementors must carefully addre…
Schema Reference
Model Context Protocol · in the page
specification/2025-06-18/schema
…lass="tsd-signature-symbol">\{</span> <span class="tsd-kind-property">code</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-sy…
Prompts
Model Context Protocol · in the page
specification/2025-06-18/server/prompts
…", "id": 1, "result": { "prompts": [ { "name": "code_review", "title": "Request Code Review", "description": "Asks the LLM to analyze code quality and suggest imp…
Resources
Model Context Protocol · in the page
specification/2025-06-18/server/resources
…"file:///example.png", "mimeType": "image/png", "blob": "base64-encoded-data" } ``` ### Annotations Resources, resource templates and content blocks support optional annotations that provide hin…
Tools
Model Context Protocol · in the page
specification/2025-06-18/server/tools
…"type": "string", "description": "City name or zip code" } }, "required": ["location"] } } ], "nextCursor": "next-page-cursor"…
Completion
Model Context Protocol · in the page
specification/2025-06-18/server/utilities/completion
…CP is designed to support interactive user experiences similar to IDE code completion. For example, applications may show completion suggestions in a dropdown or popup menu as users type, with the ab…
Pagination
Model Context Protocol · in the page
specification/2025-06-18/server/utilities/pagination
…## Error Handling Invalid cursors **SHOULD** result in an error with code -32602 (Invalid params).
Architecture
Model Context Protocol · in the page
specification/2025-11-25/architecture/index
…ze implementation overhead * Clear separation enables maintainable code 2. **Servers should be highly composable** * Each server provides focused functionality in isolation * Multiple server…
Authorization
Model Context Protocol · in the page
specification/2025-11-25/basic/authorization
…http://localhost:3000/callback" ], "grant_types": ["authorization_code"], "response_types": ["code"], "token_endpoint_auth_method": "none" } ``` #### Client ID Metadata Documents Flow The fo…
Overview
Model Context Protocol · in the page
specification/2025-11-25/basic/index
…eme={null} { jsonrpc: "2.0"; id?: string | number; error: { code: number; message: string; data?: unknown; } } ``` * Error responses **MUST** include the same ID as the request th…
Lifecycle
Model Context Protocol · in the page
specification/2025-11-25/basic/lifecycle
…`json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32602, "message": "Unsupported protocol version", "data": { "supported": ["2024-11-05"], "requested":…
Transports
Model Context Protocol · in the page
specification/2025-11-25/basic/transports
# Transports MCP uses JSON-RPC to encode messages. JSON-RPC messages **MUST** be UTF-8 encoded. The protocol currently defines two standard transport mechanisms for client-server communication: 1.…
Tasks
Model Context Protocol · in the page
specification/2025-11-25/basic/utilities/tasks
…a terminal status (`completed`, `failed`, or `cancelled`) with error code `-32602` (Invalid params). 2. Upon receiving a valid cancellation request, receivers **SHOULD** attempt to stop the task exec…
Key Changes
Model Context Protocol · in the page
specification/2025-11-25/changelog
…mption always via GET regardless of stream origin, event IDs should encode stream identity, disconnection includes server-initiated closure (Issue [#1847](https://github.com/modelcontextprotocol/model…
Elicitation
Model Context Protocol · in the page
specification/2025-11-25/client/elicitation
…er **MAY** return a [`URLElicitationRequiredError`](#error-handling) (code `-32042`) to indicate to the client that a URL mode elicitation is required. The server **MUST NOT** return this error except…
Roots
Model Context Protocol · in the page
specification/2025-11-25/client/roots
…`json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32601, "message": "Roots not supported", "data": { "reason": "Client does not have roots capability" }…
Sampling
Model Context Protocol · in the page
specification/2025-11-25/client/sampling
…ontent ```json theme={null} { "type": "image", "data": "base64-encoded-image-data", "mimeType": "image/jpeg" } ``` #### Audio Content ```json theme={null} { "type": "audio", "data": "base…
Specification
Model Context Protocol · in the page
specification/2025-11-25/index
…tocol enables powerful capabilities through arbitrary data access and code execution paths. With this power comes important security and trust considerations that all implementors must carefully addre…
Schema Reference
Model Context Protocol · in the page
specification/2025-11-25/schema
…tsd-typography"><p>Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.</p> </div> </div> <div class="type"> ### `JSONRPCNotification` <div class="tsd-si…
Prompts
Model Context Protocol · in the page
specification/2025-11-25/server/prompts
…", "id": 1, "result": { "prompts": [ { "name": "code_review", "title": "Request Code Review", "description": "Asks the LLM to analyze code quality and suggest imp…