Skip to content
Open
Changes from 2 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
3 changes: 3 additions & 0 deletions src/mcp/client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ async def initialize(self) -> types.InitializeResult:
if result.protocolVersion not in SUPPORTED_PROTOCOL_VERSIONS:
raise RuntimeError(f"Unsupported protocol version from the server: {result.protocolVersion}")

if self._client_info is DEFAULT_CLIENT_INFO:
self._client_info = result.serverInfo

await self.send_notification(types.ClientNotification(types.InitializedNotification()))

return result
Expand Down