Skip to content

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

Fix Settings field with both default and default_factory (#1380)

Jeremiah Lowin1ade5ddb0525
diff --git a/src/fastmcp/settings.py b/src/fastmcp/settings.py
index 76f70e36f..0e1ec1aff 100644
--- a/src/fastmcp/settings.py
+++ b/src/fastmcp/settings.py
@@ -244,13 +244,10 @@ class Settings(BaseSettings):
),
] = False
- server_dependencies: Annotated[
- list[str],
- Field(
- default_factory=list,
- description="List of dependencies to install in the server environment",
- ),
- ] = []
+ server_dependencies: list[str] = Field(
+ default_factory=list,
+ description="List of dependencies to install in the server environment",
+ )
# StreamableHTTP settings
json_response: bool = False