fastmcp/tests
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
..
cli generate-cli: auto-generate SKILL.md agent skill (#3115) 2026-02-08 17:09:28 -05:00
client Add concurrent tool execution with sequential flag (#3022) 2026-02-09 20:43:53 -05:00
contrib Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
deprecated Remove deprecated FastMCP() constructor kwargs (#3148) 2026-02-11 11:39:34 -05:00
experimental Unify SamplingHandler and promote OpenAI handler (#2616) 2025-12-14 15:22:43 -05:00
fs Add standalone decorators and eliminate fastmcp.fs module (#2832) 2026-01-10 12:16:35 -05:00
integration_tests Refactor OAuthProxy into focused modules (#2935) 2026-01-19 10:10:07 -05:00
prompts Fix Field() handling in prompts (#3050) 2026-02-01 21:28:44 -05:00
resources Fix Field() handling in prompts (#3050) 2026-02-01 21:28:44 -05:00
server Fix stale request context in StatefulProxyClient handlers (#3172) 2026-02-12 17:13:23 -05:00
telemetry Address Jeremiah's telemetry feedback 2026-01-14 09:45:41 -05:00
tools Make $ref dereferencing optional via FastMCP(dereference_refs=...) (#3151) 2026-02-11 13:45:37 -05:00
utilities Make $ref dereferencing optional via FastMCP(dereference_refs=...) (#3151) 2026-02-11 13:45:37 -05:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py Consolidate test fixtures and refactor large test files (#2941) 2026-01-19 15:18:35 -05:00
test_apps.py Rename ui= to app= and consolidate ToolUI/ResourceUI into AppConfig (#3117) 2026-02-08 20:26:47 -05:00
test_json_schema_generation.py fix: use SkipJsonSchema to exclude callable fields from JSON schema generation (#3048) 2026-02-01 21:30:48 -05:00
test_mcp_config.py Fix test_multi_client_with_logging to filter OpenTelemetry logs 2026-01-14 09:45:41 -05:00