Fixed
- HTTP transport ContextVar propagation: Fixed
LookupErrorfor_mcp_dh_clientContextVar when running with HTTP transport (stateless_http=True). Each HTTP request runs in a separate async context that doesn't inherit ContextVars from the main thread, causingDocumentToolsMiddlewareandVersionFilterMiddlewareto fail. Added_DataHubClientMiddlewarethat sets the ContextVar at the start of every MCP message. create_app()initialization safety: The_app_initializedflag is now set only after all middleware is successfully added, so a failed setup can be retried.--debugmiddleware ordering:LoggingMiddlewareis now added before other middlewares so it wraps the full request/response lifecycle for maximum visibility.
Added
create_app()factory function: Extracted server setup into a factory function so thatfastmcp dev/fastmcp runwork correctly (they import the module but never callmain()).- Multi-mode smoke testing:
smoke_check.pynow supports--urland--stdio-cmdoptions to test against running HTTP/SSE servers or stdio subprocesses, in addition to the default in-process mode. test_all_modes.shorchestrator: Runs smoke checks across all 5 transport modes (in-process, HTTP, SSE, stdio,fastmcp run), with per-mode log capture toscripts/logs/.SMOKE_CHECK.md: Documentation with step-by-step reproduction instructions for all transport modes.- Core tool validation: Smoke check now verifies that all 8 core read-only tools are present, catching silent regressions in tool registration or middleware filtering.
Full Changelog: v0.5.1...v0.5.2