Skip to content

Commit db43067

Browse files
committed
use serverInfo if _client_info is DEFAULT_CLIENT_INFO
1 parent 202af49 commit db43067

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/mcp/client/session.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ async def initialize(self) -> types.InitializeResult:
167167
types.InitializeResult,
168168
)
169169

170+
if self._client_info is DEFAULT_CLIENT_INFO:
171+
self._client_info = result.serverInfo
172+
170173
if result.protocolVersion not in SUPPORTED_PROTOCOL_VERSIONS:
171174
raise RuntimeError(f"Unsupported protocol version from the server: {result.protocolVersion}")
172175

0 commit comments

Comments
 (0)