fastmcp/tests/server/providers
Jeremiah Lowin 5f941be5a3
Fix stale request context in StatefulProxyClient handlers (#3172)
* fix: restore request context in StatefulProxyClient handlers

StatefulProxyClient reuses sessions across requests, so its receive-loop
task inherits a stale request_ctx ContextVar from the first request.
Server-initiated messages (elicitation, sampling, etc.) that depend on
related_request_id routing get sent to a closed stream and hang forever.

Closes #3169

* chore: Update SDK documentation

---------

Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-12 17:13:23 -05:00
..
local_provider_tools Remove deprecated FastMCP() constructor kwargs (#3148) 2026-02-11 11:39:34 -05:00
openapi Add validate_output option for OpenAPI tools (#3134) 2026-02-10 13:29:45 -05:00
proxy Fix stale request context in StatefulProxyClient handlers (#3172) 2026-02-12 17:13:23 -05:00
__init__.py Refactor MountedProvider into FastMCPProvider + TransformingProvider (#2653) 2025-12-19 11:42:59 -05:00
test_base_provider.py Refactor transform list methods to pure function pattern (#2942) 2026-01-19 16:21:35 -05:00
test_fastmcp_provider.py Immutable transform wrapping for providers (#2913) 2026-01-18 19:37:29 -05:00
test_local_provider.py Rename Enabled transform to Visibility (#2950) 2026-01-19 20:46:58 -05:00
test_local_provider_prompts.py Remove deprecated FastMCP() constructor kwargs (#3148) 2026-02-11 11:39:34 -05:00
test_local_provider_resources.py Remove deprecated FastMCP() constructor kwargs (#3148) 2026-02-11 11:39:34 -05:00
test_skills_provider.py Add Skills Provider for exposing agent skills as MCP resources (#2944) 2026-01-19 18:29:16 -05:00
test_skills_vendor_providers.py Add Skills Provider for exposing agent skills as MCP resources (#2944) 2026-01-19 18:29:16 -05:00
test_transforming_provider.py Refactor transform list methods to pure function pattern (#2942) 2026-01-19 16:21:35 -05:00