Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Whadup
Copy link
Contributor

@Whadup Whadup commented Oct 1, 2025

This resolves #3039 by introducing a server_info field in MCPServers that is set after succesful initialization()


Note

Expose MCP server initialization info via MCPServer.server_info, populated from ClientSession.initialize(); add tests.

  • MCP:
    • Add _server_info: mcp_types.Implementation to MCPServer and expose via server_info property (raises until initialized).
    • Update __aenter__ to capture initialize() result and set self._server_info = result.serverInfo.
  • Tests:
    • Add test_server_info to assert server_info unavailable pre-init and populated post-init.

Written by Cursor Bugbot for commit cf910d4. This will update automatically on new commits. Configure here.

@Kludex Kludex changed the title Store server_info in MCP Server Store server_info in MCPServer Oct 1, 2025
@Kludex Kludex changed the title Store server_info in MCPServer Expose server_info in MCPServer Oct 1, 2025
@Whadup Whadup requested a review from Kludex October 1, 2025 09:33
@Kludex Kludex enabled auto-merge (squash) October 1, 2025 16:45
@Kludex Kludex merged commit aedbcd6 into pydantic:main Oct 1, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide MCP Server Name and Title
2 participants