Skip to content

fix(python): preserve websocket connector options#1709

Open
luochen211 wants to merge 1 commit into
mcp-use:mainfrom
luochen211:fix/python-websocket-common-options
Open

fix(python): preserve websocket connector options#1709
luochen211 wants to merge 1 commit into
mcp-use:mainfrom
luochen211:fix/python-websocket-common-options

Conversation

@luochen211

@luochen211 luochen211 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • initialize WebSocketConnector through BaseConnector so common callbacks, middleware, and roots are available
  • pass common connector options from create_connector_from_config for ws_url configs
  • avoid passing an empty auth object to WebSocketConnector when auth is unset

Tests

  • MCP_USE_ANONYMIZED_TELEMETRY=false .venv/bin/python -m pytest tests/unit/test_config.py::TestConnectorCreation::test_create_websocket_connector_preserves_common_options -q
  • uv run --extra dev --extra e2b pytest tests/unit/test_config.py -q
  • uv run --extra dev ruff check mcp_use/client/config.py mcp_use/client/connectors/websocket.py tests/unit/test_config.py
  • uv run --extra dev ruff format --check mcp_use/client/config.py mcp_use/client/connectors/websocket.py tests/unit/test_config.py

Closes #1748

@luochen211 luochen211 force-pushed the fix/python-websocket-common-options branch from 146a885 to 5444f44 Compare June 16, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python ws_url config drops common connector options

1 participant