Package io.modelcontextprotocol.spec
package io.modelcontextprotocol.spec
-
ClassDescriptionDefault implementation of the
JsonSchemaValidatorinterface.A default implementation ofMcpStreamableServerSession.Factory.Default implementation ofMcpTransportSessionwhich manages the open connections using tyeDisposabletype and allows to perform clean up using theDisposable.dispose()method.DefaultMcpTransportStream<CONNECTION>An implementation ofMcpTransportStreamusing Project Reactor types.Names of HTTP headers in use by MCP HTTP transports.Interface for validating structured content against a JSON schema.Represents the result of a validation operation.Default implementation of the MCP (Model Context Protocol) session that manages bidirectional JSON-RPC communication between clients and servers.Functional interface for handling incoming JSON-RPC notifications.Functional interface for handling incoming JSON-RPC requests.Interface for the client side of theMcpTransport.AnMcpSessionwhich is capable of processing logging notifications and keeping track of a min logging level.Based on the JSON-RPC 2.0 specification and the Model Context Protocol Schema.Base for objects that include optional annotations for the client.Optional annotations for the client.Audio provided to or from an LLM.Base interface for metadata with name (identifier) and title (display name) properties.Binary contents of a resource.Used by the client to call a tool provided by the server.The server's response to a tools/call request from the client.Builder forMcpSchema.CallToolResult.Capabilities a client may support.Provides a standardized way for servers to request additional information from users through the client during interactions.Present if the client supports listing roots.Provides a standardized way for servers to request LLM sampling ("completions" or "generations") from language models via clients.A request from the client to the server, to ask for completion options.The argument's information for completion requests.Additional, optional context for completions.The server's response to a completion/complete request.The server's response to a completion/complete requestA request from the server to sample an LLM via the client.The client's response to a sampling/create_message request from the server.A request from the server to elicit additional information from the user via the client.The client's response to an elicitation request.The contents of a resource, embedded into a prompt or tool call result.Standard error codes used in MCP JSON-RPC responses.Used by the client to get a prompt provided by the server.The server's response to a prompts/get request from the client.An image provided to or from an LLM.Describes the name and version of an MCP implementation, with an optional title for UI representation.This request is sent from the client to the server when it first connects, asking it to begin initialization.After receiving an initialize request from the client, the server sends this response.A notification which does not expect a response.A request that expects a response.A successful (non-error) response to a request.A response to a request that indicates an error occurred.A JSON Schema object that describes the expected structure of arguments or output.The server's response to a prompts/list request from the client.The server's response to a resources/list request from the client.The server's response to a resources/templates/list request from the client.The client's response to a roots/list request from the server.The server's response to a tools/list request from the client.The Model Context Protocol (MCP) provides a standardized way for servers to send structured log messages to clients.Hints to use for model selection.The server's preferences for model selection, requested of the client during sampling.A request that supports pagination using cursors.An opaque token representing the pagination position after the last returned result.The Model Context Protocol (MCP) supports optional progress tracking for long-running operations through notification messages.A prompt or prompt template that the server offers.Describes an argument that a prompt can accept.Describes a message returned as part of a prompt.Identifies a prompt for completion requests.Sent from the client to the server, to read a specific resource URI.The server's response to a resources/read request from the client.A known resource that the server is capable of reading.A common interface for resource content, which includes metadata about the resource such as its URI, name, description, MIME type, size, and annotations.The contents of a specific resource or sub-resource.A known resource that the server is capable of reading.A reference to a resource or resource template definition for completion requests.The Model Context Protocol (MCP) provides a standardized way for servers to send resources update message to clients.Resource templates allow servers to expose parameterized resources using URIRepresents a root directory or file that the server can operate on.Describes a message issued to or received from an LLM API.Capabilities that a server may support.Present if the server supports argument autocompletion suggestions.Present if the server supports sending log messages to the client.Present if the server offers any prompt templates.Present if the server offers any resources to read.Present if the server offers any tools to call.A request from the client to the server, to enable or adjust logging.Sent from the client to request resources/updated notifications from the server whenever a particular resource changes.Text provided to or from an LLM.Text contents of a resource.Represents a tool that the server provides.Additional properties describing a Tool to clients.Sent from the client to request cancellation of resources/updated notifications from the server.Represents a Model Context Protocol (MCP) session on the server side.Factory for creating server sessions which delegate to a provided 1:1 transport with a connected client.Notification handler for the initialization notification from the client.Deprecated.Deprecated.Deprecated.Marker interface for the server-side MCP transport.Classic implementation ofMcpServerTransportProviderBasefor a single outgoing stream in bidirectional communication (STDIO and the legacy HTTP SSE).The core building block providing the server-side MCP transport.Represents a Model Context Protocol (MCP) session that handles communication between clients and the server.Representation of a Streamable HTTP server session that keeps track of mapping server-initiated requests to the client and mapping arriving responses.Factory for new Streamable HTTP MCP sessions.Request handler for the initialization request.Composite holding theMcpStreamableServerSessionand the initialization resultStreamable HTTP server transport representing an individual SSE stream.The core building block providing the server-side MCP transport for Streamable HTTP servers.Defines the asynchronous transport layer for the Model Context Protocol (MCP).Exception thrown when there is an issue with the transport layer of the Model Context Protocol (MCP).McpTransportSession<CONNECTION>An abstraction of the session as perceived from the MCP transport layer.Exception that signifies that the server does not recognize the connecting client via the presented transport session identifier.McpTransportStream<CONNECTION>A representation of a stream at the transport layer of the MCP protocol.AMcpLoggableSessionwhich represents a missing stream that would allow the server to communicate with the client.
McpInitRequestHandler