fastmcp/tests/server
Jeremiah Lowin a52036ed0f
Cache component lists in ProxyProvider (#3479)
* fix: cache component lists in ProxyProvider to avoid redundant backend connections

Every call_tool through a proxy was triggering _list_tools() to resolve
the tool by name, opening a full MCP session just for the lookup, then
opening a second session for the actual execution. This caches component
lists on the ProxyProvider with a configurable TTL (default 300s),
cutting backend handshakes in half for repeated calls.

* docs: document component caching and session reuse for proxy providers

* fix: add sleep in cache TTL test for Windows clock resolution

* docs: clarify cache scope and dynamic backend guidance
2026-03-13 19:44:45 -04:00
..
auth fix: normalize Google scope shorthands and surface valid_scopes (#3477) 2026-03-13 18:42:16 -04:00
http Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
middleware Re-hash response cache keys 🤖 Generated with GPT-5.2-Codex (#3414) 2026-03-07 11:40:53 -05:00
mount Fix resource templates with query params on mounted servers 2026-03-03 16:43:27 -05:00
providers Cache component lists in ProxyProvider (#3479) 2026-03-13 19:44:45 -04:00
sampling Add helpers for converting FunctionTool and TransformedTool to SamplingTool (#3062) 2026-02-11 19:43:03 -06:00
tasks Replace vendored DI with uncalled-for (#3301) 2026-03-02 16:35:15 -05:00
telemetry Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
transforms Set readOnlyHint=True on ResourcesAsTools generated tools 2026-03-13 17:32:21 -05:00
versioning Fix get_* returning None when latest version is disabled (#3439) 2026-03-07 11:55:10 -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 Split large test files to comply with loq line limit (#3328) 2026-02-28 11:21:11 -05:00
test_auth_integration_errors.py Split large test files to comply with loq line limit (#3328) 2026-02-28 11:21:11 -05:00
test_context.py Support non-serializable values in Context.set_state (#3171) 2026-02-12 15:06:42 -06:00
test_dependencies.py Replace vendored DI with uncalled-for (#3301) 2026-03-02 16:35:15 -05:00
test_dependencies_advanced.py Replace vendored DI with uncalled-for (#3301) 2026-03-02 16:35:15 -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 Refactor server.py into mixins (#2939) 2026-01-19 11:36:00 -05:00
test_logging.py Refactor server.py into mixins (#2939) 2026-01-19 11:36:00 -05:00
test_pagination.py Bound client auto-pagination loops to prevent unbounded list fetches (#3411) 2026-03-06 17:43:47 -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 Expose local_provider property, deprecate FastMCP.remove_tool() (#3155) 2026-02-11 19:37:19 -06: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 Fix server lifespan overlap teardown (#3415) 2026-03-07 12:09:50 -05:00
test_session_visibility.py Fix session visibility marks leaking across sessions (#3132) 2026-02-10 11:42:43 -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 Normalize repo references to PrefectHQ/fastmcp casing (#3218) 2026-02-18 14:51:18 -05:00