Add version parameter to FastMCP constructor

This commit is contained in:
Miki Yutani 2025-06-16 12:38:15 +09:00
commit 42121b2767
2 changed files with 25 additions and 0 deletions

View file

@ -110,6 +110,7 @@ class FastMCP(Generic[LifespanResultT]):
def __init__(
self,
name: str | None = None,
version: str | None = None,
instructions: str | None = None,
auth: OAuthProvider | None = None,
lifespan: (
@ -175,6 +176,7 @@ class FastMCP(Generic[LifespanResultT]):
self._has_lifespan = True
self._mcp_server = MCPServer[LifespanResultT](
name=name or "FastMCP",
version=version,
instructions=instructions,
lifespan=_lifespan_wrapper(self, lifespan),
)