Add settings and environment variables reference#3384
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33d4cdc57a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| icon: gear | ||
| --- | ||
|
|
||
| FastMCP uses [pydantic-settings](https://docs.pydantic.dev/latest/concepts/pydantic_settings/) for configuration. Every setting is available as an environment variable with a `FASTMCP_` prefix, loaded automatically from the environment or a `.env` file. |
There was a problem hiding this comment.
Correct claim that all settings load from
.env
Settings loads dotenv values through Settings.model_config.env_file in src/fastmcp/settings.py, but Docket config is a pre-instantiated DocketSettings() field (Settings.docket) whose own model_config only defines an FASTMCP_DOCKET_ prefix and no env_file. As written, this sentence implies .env values work for every setting, but users who put FASTMCP_DOCKET_URL in .env can still end up on the default memory:// backend, which is a high-impact misconfiguration for multi-worker task deployments.
Useful? React with 👍 / 👎.
FastMCP has ~30 configurable settings available as
FASTMCP_*environment variables via pydantic-settings, but until now you had to readsrc/fastmcp/settings.pyto discover them. This adds a dedicated reference page atmore/settingsthat groups everything by concern (logging, transport, error handling, client, CLI, tasks, advanced) with precise types, defaults, and descriptions.Also adds a maintenance note to CLAUDE.md so future settings changes stay in sync with the doc.
Closes #3275