Before a Session can be created, Clients MUST initialize the connection by calling the
initialize method with:
- The latest protocol version supported
- The capabilities supported
Protocol version
The protocol versions that appear in theinitialize requests and responses are a single integer that identifies a MAJOR protocol version. This version is only incremented when breaking changes are introduced.
Clients and Agents MUST agree on a protocol version and act according to its specification.
See Capabilities to learn how non-breaking features are introduced.
Version Negotiation
Theinitialize request MUST include the latest protocol version the Client supports.
If the Agent supports the requested version, it MUST respond with the same version. Otherwise, the Agent MUST respond with the latest version it supports.
If the Client does not support the version specified by the Agent in the initialize response, the Client SHOULD close the connection and inform the user about it.
Capabilities
Capabilities describe features supported by the Client and the Agent. All capabilities included in theinitialize request are OPTIONAL. Clients and Agents SHOULD support all possible combinations of their peer’s capabilities.
The introduction of new capabilities is not considered a breaking change. Therefore, Clients and Agents MUST treat all capabilities omitted in the initialize request as UNSUPPORTED.
Capabilities may advertise top-level method surfaces or nested features that
only apply within a supported surface.
Capabilities may specify the availability of protocol methods, notifications, or a subset of their parameters. They may also signal behaviors of the Agent or Client implementation.
Implementations can also advertise custom capabilities using the _meta field to indicate support for protocol extensions.
Client Capabilities
Clients MAY include defined capability fields incapabilities.
Omitted fields mean unsupported. Extension-specific capabilities belong in
_meta.
Agent Capabilities
The Agent SHOULD specify whether it supports the following capabilities:The Agent supports the
session/* method surface. Omitted or null means the
Agent does not support session methods. Supplying {} means the Agent
supports the baseline session methods: session/new, session/prompt,
session/cancel, and session/update.Authentication-related capabilities supported by the Agent.
Session Capabilities
Supplyingsession: {} means the Agent supports session/new, session/prompt, session/cancel, and session/update.
Optionally, Agents MAY support prompt extensions, MCP server transports, and additional session methods by specifying nested capabilities.
Object indicating the different types of content that
may be included in
session/prompt requests. Omitted or null means the
Agent does not advertise any prompt extensions beyond the baseline text and
resource-link content required by session/prompt.Object indicating the MCP server transports that may be included in session
lifecycle requests. Omitted or
null means the Agent does not advertise MCP
server transport support for sessions.The
session/load method is
available. Omitted or null means the Agent does not advertise support.
Supplying {} means the Agent supports loading sessions.The
session/delete method is available.
Omitted or null means the Agent does not advertise support. Supplying {}
means the Agent supports deleting sessions from session/list.The Agent supports
additionalDirectories on supported session lifecycle
requests. Omitted or null means the Agent does not advertise support.
Supplying {} means the Agent supports additional workspace roots.Session Prompt Capabilities
As a baseline, Agents that advertisesession MUST support ContentBlock::Text and ContentBlock::ResourceLink in session/prompt requests.
Optionally, they MAY support richer types of content by specifying the following capabilities:
The prompt may include
ContentBlock::Image. Omitted or null means the
Agent does not advertise support. Supplying {} means the Agent supports
image content in prompts.The prompt may include
ContentBlock::Audio. Omitted or null means the
Agent does not advertise support. Supplying {} means the Agent supports
audio content in prompts.The prompt may include
ContentBlock::Resource. Omitted or null means the
Agent does not advertise support. Supplying {} means the Agent supports
embedded context in prompts.Session MCP Capabilities
The Agent supports connecting to MCP servers over stdio. Omitted or
null
means the Agent does not advertise support. Supplying {} means the Agent
supports stdio MCP server transports.The Agent supports connecting to MCP servers over HTTP. Omitted or
null
means the Agent does not advertise support. Supplying {} means the Agent
supports HTTP MCP server transports.Authentication Capabilities
Learn more about Authentication
Implementation Information
Both Clients and Agents SHOULD provide information about their implementation in theclientInfo and agentInfo fields respectively. Both take the following three fields:
Intended for programmatic or logical use, but can be used as a display name
fallback if title isn’t present.
Intended for UI and end-user contexts — optimized to be human-readable and
easily understood. If not provided, the name should be used for display.
Version of the implementation. Can be displayed to the user or used for
debugging or metrics purposes.
Note: in future versions of the protocol, this information will be required.
Once the connection is initialized, you’re ready to create a session and begin the conversation with the Agent.