Skip to content

Commit 12c654a

Browse files
committed
Add comment the reason why the protocol is old version
1 parent ce68209 commit 12c654a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Protocol/MCPProtocol.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525
final class MCPProtocol
2626
{
27+
// This should be 2025-03-26, but I set this to 2024-11-05 because Vercel ai-sdk doesn't support it
2728
public const PROTOCOL_VERSION = '2024-11-05';
2829

2930
private TransportInterface $transport;
@@ -111,7 +112,7 @@ public function handleMessage(string $clientId, array $message): ProcessMessageD
111112
{
112113
$messageId = $message['id'] ?? null;
113114
try {
114-
if (! isset($message['jsonrpc']) || $message['jsonrpc'] !== '2.0') {
115+
if (!isset($message['jsonrpc']) || $message['jsonrpc'] !== '2.0') {
115116
throw new JsonRpcErrorException(message: 'Invalid Request: Not a valid JSON-RPC 2.0 message', code: JsonRpcErrorCode::INVALID_REQUEST);
116117
}
117118

0 commit comments

Comments
 (0)