Skip to content

feat: add get_info method to retrieve MCP server metadata#430

Open
Kirill Ustinov (umbilnm) wants to merge 1 commit intolangchain-ai:mainfrom
umbilnm:feat/get-server-info
Open

feat: add get_info method to retrieve MCP server metadata#430
Kirill Ustinov (umbilnm) wants to merge 1 commit intolangchain-ai:mainfrom
umbilnm:feat/get-server-info

Conversation

@umbilnm

Closes #405

Summary

  • Add load_mcp_server_info() helper that retrieves InitializeResult from an MCP server (via session or connection config)
  • Add MultiServerMCPClient.get_info() method that returns server metadata (instructions, capabilities, implementation details) for all connected servers in parallel
  • Add tests covering both the low-level helper and the client method

Test plan

  • test_load_mcp_server_info_with_connection — retrieve info via connection config
  • test_load_mcp_server_info_no_instructions — server without instructions
  • test_load_mcp_server_info_with_session — retrieve info via mock session
  • test_load_mcp_server_info_raises_without_args — error when no args provided
  • test_client_get_server_infoget_info() returns info for all servers

🤖 Generated with Claude Code

Add `load_mcp_server_info` helper and `MultiServerMCPClient.get_info()`
to expose the MCP `InitializeResult` (instructions, capabilities,
server implementation details) for all connected servers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Feature Request: Support for accessing instructions from InitializeResult

1 participant