38265906f1
Quart's test_client expects its request pipeline to populate app._preserved_context. Our /mcp middleware deliberately bypasses that pipeline (forwarding straight to FastMCP), so test_client's teardown blew up with AttributeError. The middleware is correct; the test harness was wrong. Build raw ASGI scope/receive/send and call app.asgi_app directly — which is what production hypercorn does anyway. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>