You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(client): respect server capabilities before querying components
ClientSessionGroup unconditionally called list_tools(), list_prompts(),
and list_resources() on every connect, regardless of whether the server
advertised those capabilities. This violates the MCP lifecycle spec
which states clients MUST only use capabilities that were successfully
negotiated.
Fix: check session.initialize_result.capabilities before each list
call. Only query prompts/resources/tools if the server advertised the
corresponding capability (caps.prompts/resources/tools is not None).
Fixes#2689
Signed-off-by: Gaurav Kumar Sinha <gaurav@substrai.dev>
0 commit comments