fastmcp/tests
marvin-context-protocol[bot] 9cd457727d Fix stdio proxy race condition in concurrent connections
Resolves race condition where multiple parallel requests through FastMCP
proxy to stdio servers would fail with 'Received request before
initialization was complete' errors.

The issue occurred because each proxy operation created a new client that
tried to initialize simultaneously. Added _SynchronizedClientContext to
serialize stdio client initialization using asyncio semaphore while
preserving performance for non-stdio transports.

- Added _SynchronizedClientContext async context manager
- Enhanced ProxyManagerMixin with synchronized client context
- Updated all proxy managers to use synchronized context for stdio
- Added comprehensive tests with 20+ parallel operations
- All existing tests continue to pass

Co-authored-by: William Easton <strawgate@users.noreply.github.com>
2025-08-25 18:25:32 +00:00
..
cli Consolidate server loading logic into FileSystemSource (#1614) 2025-08-24 20:50:25 -04:00
client Fallback to a Completions API when Sampling is not available (#1145) 2025-08-21 07:49:29 -04:00
contrib Add comprehensive OAuth 2.1 authentication system with WorkOS integration (#1327) 2025-08-01 17:06:55 -04:00
deprecated feat: introduce fastmcp.json configuration system (#1517) 2025-08-19 16:06:04 -04:00
experimental Fallback to a Completions API when Sampling is not available (#1145) 2025-08-21 07:49:29 -04:00
integration_tests Add WorkOS and Azure OAuth providers (#1550) 2025-08-20 16:22:03 -04:00
prompts Add meta parameter support to tools, resources, templates, and prompts decorators (#1294) 2025-07-29 17:16:05 -04:00
resources Ensure resource + template names are properly prefixed when importing/mounting (#1423) 2025-08-08 21:29:07 -04:00
server Fix stdio proxy race condition in concurrent connections 2025-08-25 18:25:32 +00:00
tools PR Clean-up 2025-08-25 10:18:39 -05:00
utilities feat: introduce inline snapshots (#1605) 2025-08-25 10:08:55 -04:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py feat: introduce inline snapshots (#1605) 2025-08-25 10:08:55 -04:00
test_examples.py Fix single-element list unwrapping in tool content 2025-07-07 12:07:16 -04:00
test_mcp_config.py Skip flaky windows test (#1596) 2025-08-23 09:43:01 -04:00