Skip to content

Commit 036946d

Browse files
fixes Protocol version negotiation incorrect #41
1 parent 759c309 commit 036946d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Server/MCPServer.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,8 @@ private function getValidatedProtocolVersion(string $requestedVersion): string
240240
return $requestedVersion;
241241
}
242242

243-
// Throw error for unsupported protocol version
244-
throw new JsonRpcErrorException(
245-
message: 'Unsupported protocol version',
246-
code: JsonRpcErrorCode::INVALID_PARAMS,
247-
data: [
248-
'supported' => $supportedVersions,
249-
'requested' => $requestedVersion,
250-
]
251-
);
243+
//return latest version
244+
return MCPProtocolInterface::PROTOCOL_VERSION_STREAMABE_HTTP;
252245
}
253246

254247
/**

0 commit comments

Comments
 (0)