Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

fix(type): lifespan is partially unknown (#1389)

Kun Yanged5a83301d1f
diff --git a/src/fastmcp/server/http.py b/src/fastmcp/server/http.py
index 1e0978d62..13c13ea73 100644
--- a/src/fastmcp/server/http.py
+++ b/src/fastmcp/server/http.py
@@ -72,7 +72,7 @@ _current_http_request: ContextVar[Request | None] = ContextVar(
class StarletteWithLifespan(Starlette):
@property
- def lifespan(self) -> Lifespan:
+ def lifespan(self) -> Lifespan[Starlette]:
return self.router.lifespan_context