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 are high-level and are not attached to a specific base protocol concept.
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
The Client SHOULD specify whether it supports the following capabilities:File System
The
fs/read_text_file
method is available.The
fs/write_text_file
method is available.Learn more about File System methods
Terminal
All
terminal/*
methods are available, allowing the Agent to execute and
manage shell commands.Learn more about Terminals
Agent Capabilities
The Agent SHOULD specify whether it supports the following capabilities:The
session/load
method is available.Object indicating the different types of content that may be
included in
session/prompt
requests.Prompt capabilities
As a baseline, all Agents MUST supportContentBlock::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
The prompt may include
ContentBlock::Audio
The prompt may include
ContentBlock::Resource
MCP capabilities
The Agent supports connecting to MCP servers over HTTP.
The Agent supports connecting to MCP servers over SSE.Note: This transport has been deprecated by the MCP spec.
Once the connection is initialized, you’re ready to create a session and begin the conversation with the Agent.