Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/seps/2575-stateless-mcp.mdx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/specification/draft/basic/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ listing the versions it does support:
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"code": -32004,
"message": "Unsupported protocol version",
"data": {
"supported": ["DRAFT-2026-v1", "2025-11-25"],
Expand Down
13 changes: 11 additions & 2 deletions docs/specification/draft/schema.mdx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"code": -32004,
"message": "Unsupported protocol version",
"data": {
"supported": ["DRAFT-2026-v1", "2025-11-25"],
Expand Down
2 changes: 1 addition & 1 deletion schema/draft/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion schema/draft/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,14 @@ export interface InternalError extends Error {
*/
export const MISSING_REQUIRED_CLIENT_CAPABILITY = -32003;

/**
* Error code returned when the request's protocol version is not supported
* by the server.
*
* @category Errors
*/
export const UNSUPPORTED_PROTOCOL_VERSION = -32004;

/**
* Returned when the request's protocol version is unknown to the server or
* unsupported (e.g., a known experimental or draft version the server has
Expand All @@ -392,7 +400,7 @@ export interface UnsupportedProtocolVersionError extends Omit<
"error"
> {
error: Error & {
code: typeof INVALID_PARAMS;
code: typeof UNSUPPORTED_PROTOCOL_VERSION;
data: {
/**
* Protocol versions the server supports. The client should choose a
Expand Down
4 changes: 3 additions & 1 deletion seps/2575-stateless-mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,14 @@ return a JSON-RPC error response. For HTTP, the response status code MUST be
`400 Bad Request`. The error MUST conform to the following structure:

```ts
export const UNSUPPORTED_PROTOCOL_VERSION = -32004;

export interface UnsupportedProtocolVersionError extends Omit<
JSONRPCErrorResponse,
"error"
> {
error: Error & {
code: typeof INVALID_PARAMS;
code: typeof UNSUPPORTED_PROTOCOL_VERSION;
data: {
/**
* An array of protocol version strings that the server supports.
Expand Down