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
refactor(client): rename message_handler to message_callback for naming consistency
Closes#2588.
The five user-facing callback fields on ClientConfig / ClientSession /
ServerConnectionParams were inconsistently named (four used *_callback,
one used *_handler). Rename message_handler -> message_callback across:
src/mcp/client/client.py ClientConfig field + forwarding call
src/mcp/client/session.py ClientSession.__init__ param +
internal _message_handler ->
_message_callback; related docstring
and log messages updated
src/mcp/client/session_group.py ServerConnectionParams field +
forwarding call
src/mcp/client/__main__.py CLI entry point
src/mcp/client/subscriptions.py docstring
src/mcp/shared/jsonrpc_dispatcher.py docstring
Type alias MessageHandlerFnT is intentionally not renamed (separate
naming layer). Test usages updated across the codebase.
Since this lands on the v2 rewrite on main, a breaking rename is
appropriate without a deprecation shim. 4383 tests pass; ruff lint
and format clean.
0 commit comments