We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db43067 commit 5e62109Copy full SHA for 5e62109
src/mcp/client/session.py
@@ -167,12 +167,12 @@ async def initialize(self) -> types.InitializeResult:
167
types.InitializeResult,
168
)
169
170
- if self._client_info is DEFAULT_CLIENT_INFO:
171
- self._client_info = result.serverInfo
172
-
173
if result.protocolVersion not in SUPPORTED_PROTOCOL_VERSIONS:
174
raise RuntimeError(f"Unsupported protocol version from the server: {result.protocolVersion}")
175
+ if self._client_info is DEFAULT_CLIENT_INFO:
+ self._client_info = result.serverInfo
+
176
await self.send_notification(types.ClientNotification(types.InitializedNotification()))
177
178
return result
0 commit comments