Skip to content

fix(client): respect negotiated capabilities in ClientSessionGroup#2698

Open
Epochex wants to merge 2 commits into
modelcontextprotocol:mainfrom
Epochex:fix/2689-session-group-capabilities
Open

fix(client): respect negotiated capabilities in ClientSessionGroup#2698
Epochex wants to merge 2 commits into
modelcontextprotocol:mainfrom
Epochex:fix/2689-session-group-capabilities

Conversation

@Epochex
Copy link
Copy Markdown

@Epochex Epochex commented May 26, 2026

Fixes #2689.

ClientSessionGroup now only calls list_prompts/list_resources/list_tools when the server advertised the corresponding capability in InitializeResult. This keeps the client aligned with negotiated capabilities and avoids warning noise from tools-only servers.

Tests:

  • uv run pytest tests/client/test_session_group.py
  • uv run ruff check src/mcp/client/session_group.py tests/client/test_session_group.py
  • uv run ruff format src/mcp/client/session_group.py tests/client/test_session_group.py
  • uv run pyright --pythonplatform Linux

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.

ClientSessionGroup attempts to use capabilities that were not advertised

1 participant