initialize
request containing:
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {
"roots": {
"listChanged": true
},
"sampling": {},
"elicitation": {}
},
"clientInfo": {
"name": "ExampleClient",
"title": "Example Client Display Name",
"version": "1.0.0"
}
}
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {
"logging": {},
"prompts": {
"listChanged": true
},
"resources": {
"subscribe": true,
"listChanged": true
},
"tools": {
"listChanged": true
}
},
"serverInfo": {
"name": "ExampleServer",
"title": "Example Server Display Name",
"version": "1.0.0"
},
"instructions": "Optional instructions for the client"
}
}
initialized
notification
to indicate it is ready to begin normal operations:
{
"jsonrpc": "2.0",
"method": "notifications/initialized"
}
initialize
request.initialized
notification.initialize
request, the client MUST send a protocol version it supports.
This SHOULD be the latest version supported by the client.
If the server supports the requested protocol version, it MUST respond with the same
version. Otherwise, the server MUST respond with another protocol version it
supports. This SHOULD be the latest version supported by the server.
If the client does not support the version in the server’s response, it SHOULD
disconnect.
MCP-Protocol-Version: <protocol-version>
HTTP header on all subsequent requests to the MCP
server.
For details, see the Protocol Version Header section in Transports.Category | Capability | Description |
---|---|---|
Client | roots | Ability to provide filesystem roots |
Client | sampling | Support for LLM sampling requests |
Client | elicitation | Support for server elicitation requests |
Client | experimental | Describes support for non-standard experimental features |
Server | prompts | Offers prompt templates |
Server | resources | Provides readable resources |
Server | tools | Exposes callable tools |
Server | logging | Emits structured log messages |
Server | completions | Supports argument autocompletion |
Server | experimental | Describes support for non-standard experimental features |
listChanged
: Support for list change notifications (for prompts, resources, and
tools)subscribe
: Support for subscribing to individual items’ changes (resources only)SIGTERM
if the server does not exit
within a reasonable timeSIGKILL
if the server does not exit within a reasonable time after SIGTERM
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Unsupported protocol version",
"data": {
"supported": ["2024-11-05"],
"requested": "1.0.0"
}
}
}
Was this page helpful?