Skip to content

Add settings and environment variables reference#3384

Merged
jlowin merged 2 commits intomainfrom
docs/settings-reference
Mar 4, 2026
Merged

Add settings and environment variables reference#3384
jlowin merged 2 commits intomainfrom
docs/settings-reference

Conversation

@jlowin
Copy link
Copy Markdown
Member

@jlowin jlowin commented Mar 4, 2026

FastMCP has ~30 configurable settings available as FASTMCP_* environment variables via pydantic-settings, but until now you had to read src/fastmcp/settings.py to discover them. This adds a dedicated reference page at more/settings that 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

@jlowin jlowin added the documentation Updates to docs, examples, or guides. Primary change is documentation-related. label Mar 4, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docs/more/settings.mdx Outdated
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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@jlowin jlowin merged commit d4a8354 into main Mar 4, 2026
9 checks passed
@jlowin jlowin deleted the docs/settings-reference branch March 4, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to docs, examples, or guides. Primary change is documentation-related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document all available settings and environment variables

1 participant