diff --git a/fastapps/core/server.py b/fastapps/core/server.py index 13a053c..db0a0bf 100644 --- a/fastapps/core/server.py +++ b/fastapps/core/server.py @@ -134,15 +134,10 @@ def __init__( self.token_verifier_instance = verifier # Initialize FastMCP with or without auth + fastmcp_kwargs: Dict[str, Any] = {"name": name, "stateless_http": True} if auth_settings: - self.mcp = FastMCP( - name=name, - stateless_http=True, - token_verifier=verifier, - auth=auth_settings, - ) - else: - self.mcp = FastMCP(name=name) + fastmcp_kwargs.update({"token_verifier": verifier, "auth": auth_settings}) + self.mcp = FastMCP(**fastmcp_kwargs) self._register_handlers()