fastmcp/tests/server
Jeremiah Lowin 87b4a6fb99 Refactor Client class into mixins for better organization
Split the monolithic Client class into focused mixin classes:
- ClientToolsMixin (tools_client.py)
- ClientPromptsMixin (prompts.py)
- ClientResourcesMixin (resources.py)
- ClientTaskManagementMixin (task_management.py)

Also:
- Extract timeout normalization helpers to utilities/timeout.py
- Split SSETransport into its own module (transports/sse.py)
- Clean up unused imports across client modules
- Fix bare except clauses to catch specific McpError

Note: ty reports unresolved-attribute errors on mixin classes because
it doesn't understand that mixins will be composed with Client. This is
a known limitation of mixin typing in Python. The code is functionally
correct and all tests pass.
2026-01-19 09:21:38 -05:00
..
auth Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
http Add loq file size limits and clean up type ignores (#2859) 2026-01-13 07:29:12 -05:00
middleware Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
providers Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
sampling SEP-1577: Sampling with tools (#2551) 2025-12-14 13:51:05 -05:00
tasks Refactor Client class into mixins for better organization 2026-01-19 09:21:38 -05:00
telemetry Add component versioning and VersionFilter transform (#2894) 2026-01-16 20:53:18 -05:00
transforms Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
__init__.py restore 1.x code 2025-04-09 11:54:42 -04:00
test_app_state.py Update docs and test 2025-06-20 13:06:48 -04:00
test_auth_integration.py Update FastMCP for MCP SDK 1.23.1 auth changes 2025-12-03 11:50:08 -05:00
test_context.py Move session visibility logic to enabled.py (#2924) 2026-01-19 08:29:23 -05:00
test_dependencies.py Add MCP-compliant pagination for list operations 2026-01-17 19:30:24 -05:00
test_event_store.py Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
test_file_server.py Add MCP-compliant pagination for list operations 2026-01-17 19:30:24 -05:00
test_icons.py Implement icon support (#2121) 2025-10-17 17:28:08 -04:00
test_input_validation.py Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665) 2025-12-21 16:37:20 -05:00
test_log_level.py Add log level support for stdio and HTTP transports (#1840) 2025-09-19 13:46:30 -04:00
test_logging.py Fix uvicorn 0.39+ test timeouts and FastMCPError propagation (#2699) 2025-12-23 19:02:47 -05:00
test_mount.py Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
test_pagination.py Address review feedback: validation and edge cases 2026-01-17 19:50:33 -05:00
test_providers.py Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
test_run_server.py Update tests for prompts 2025-06-04 16:37:41 -04:00
test_server.py Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
test_server_docket.py Make pydocket optional and unify DI systems (#2835) 2026-01-10 16:23:32 -05:00
test_server_lifespan.py Add composable lifespans (#2828) 2026-01-10 11:16:50 -05:00
test_session_visibility.py Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
test_streamable_http_no_redirect.py Improve redirect handling to address 307's (#1387) 2025-08-08 11:55:30 -04:00
test_tool_annotations.py Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
test_tool_transformation.py Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
test_versioning.py Bump dependencies (#2931) 2026-01-19 08:38:48 -05:00