Skip to content

Add release notes for v2.14.2 and v2.14.3#2851

Merged
jlowin merged 1 commit intorelease/2.xfrom
add-transport-to-context
Jan 12, 2026
Merged

Add release notes for v2.14.2 and v2.14.3#2851
jlowin merged 1 commit intorelease/2.xfrom
add-transport-to-context

Conversation

@jlowin
Copy link
Copy Markdown
Member

@jlowin jlowin commented Jan 12, 2026

Adds documentation entries for both releases to docs/updates.mdx and docs/changelog.mdx.

  • v2.14.2 "Port Authority" - Community contributions, OpenAPI 3.1 fixes, MCP spec compliance
  • v2.14.3 "Time After Timeout" - HTTP transport timeout fix, OAuth/Redis/ASGI fixes

@marvin-context-protocol marvin-context-protocol Bot added the enhancement Improvement to existing functionality. For issues and smaller PR improvements. label Jan 12, 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: 22c76d09a8

ℹ️ 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 src/fastmcp/client/client.py Outdated
@jlowin jlowin force-pushed the add-transport-to-context branch from 680709b to cb9fc0c Compare January 12, 2026 21:54
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 12, 2026

Walkthrough

This pull request adds two new release entries to the documentation: FastMCP v2.14.3 (January 12, 2026) and v2.14.2 (December 31, 2025). The changelog.mdx file receives entries with release summaries, enhancement sections, fixes, and changelog links. The updates.mdx file receives corresponding Card components displaying release information, links, and descriptions. A total of 72 lines were added across both documentation files with no functional code changes.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides context about the changes but does not follow the required template with Contributors and Review checklists. Update description to include the required Contributors Checklist and Review Checklist with appropriate checkboxes marked.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding release notes for two specific versions (v2.14.2 and v2.14.3).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/updates.mdx (1)

18-26: Consider more concise phrasing.

The static analysis tool flagged "A variety of" on line 24 as verbose. A more direct phrasing would improve readability.

✏️ Suggested wording
-FastMCP 2.14.2 brings a wave of community contributions safely into the 2.x line. A variety of important fixes backported from 3.0 work improve OpenAPI 3.1 compatibility, MCP spec compliance for output schemas and elicitation, and correct a subtle base_url fallback issue. The CLI now gently reminds you that FastMCP 3.0 is on the horizon.
+FastMCP 2.14.2 brings a wave of community contributions safely into the 2.x line. Important fixes backported from 3.0 improve OpenAPI 3.1 compatibility, MCP spec compliance for output schemas and elicitation, and correct a subtle base_url fallback issue. The CLI now gently reminds you that FastMCP 3.0 is on the horizon.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e600570 and cb9fc0c.

📒 Files selected for processing (2)
  • docs/changelog.mdx
  • docs/updates.mdx
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/.cursor/rules/mintlify.mdc)

docs/**/*.mdx: Use clear, direct language appropriate for technical audiences
Write in second person ('you') for instructions and procedures in MDX documentation
Use active voice over passive voice in MDX technical documentation
Employ present tense for current states and future tense for outcomes in MDX documentation
Maintain consistent terminology throughout all MDX documentation
Keep sentences concise while providing necessary context in MDX documentation
Use parallel structure in lists, headings, and procedures in MDX documentation
Lead with the most important information using inverted pyramid structure in MDX documentation
Use progressive disclosure in MDX documentation: present basic concepts before advanced ones
Break complex procedures into numbered steps in MDX documentation
Include prerequisites and context before instructions in MDX documentation
Provide expected outcomes for each major step in MDX documentation
End sections with next steps or related information in MDX documentation
Use descriptive, keyword-rich headings for navigation and SEO in MDX documentation
Focus on user goals and outcomes rather than system features in MDX documentation
Anticipate common questions and address them proactively in MDX documentation
Include troubleshooting for likely failure points in MDX documentation
Provide multiple pathways (beginner vs advanced) but offer an opinionated path to avoid overwhelming users in MDX documentation
Always include complete, runnable code examples that users can copy and execute in MDX documentation
Show proper error handling and edge case management in MDX code examples
Use realistic data instead of placeholder values in MDX code examples
Include expected outputs and results for verification in MDX code examples
Test all code examples thoroughly before publishing in MDX documentation
Specify language and include filename when relevant in MDX code examples
Add explanatory comments for complex logic in MDX code examples
Document all API...

Files:

  • docs/updates.mdx
  • docs/changelog.mdx
🪛 LanguageTool
docs/updates.mdx

[style] ~24-~24: Consider using a more concise synonym.
Context: ...contributions safely into the 2.x line. A variety of important fixes backported from 3.0 wor...

(A_VARIETY_OF)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Run tests: Python 3.13 on ubuntu-latest
  • GitHub Check: Run tests: Python 3.10 on windows-latest
  • GitHub Check: Run tests: Python 3.10 on ubuntu-latest
  • GitHub Check: Run tests with lowest-direct dependencies
🔇 Additional comments (2)
docs/updates.mdx (1)

8-16: LGTM!

The v2.14.3 release entry follows the established pattern correctly. The description is clear, concise, and appropriately summarizes the key fixes (HTTP transport timeout, OAuth, Redis, ASGI support, CLI notifications).

docs/changelog.mdx (1)

7-26: LGTM!

The v2.14.3 changelog entry is well-structured with clear categorization of enhancements and fixes. The summary accurately describes the release focus, and all PR links and contributor attributions are properly formatted.

Comment thread docs/changelog.mdx
Comment on lines +28 to +57
<Update label="v2.14.2" description="2025-12-31">

**[v2.14.2: Port Authority](https://github.com/jlowin/fastmcp/releases/tag/v2.14.2)**

FastMCP 2.14.2 brings a wave of community contributions safely into the 2.x line. A variety of important fixes backported from 3.0 work improve OpenAPI 3.1 compatibility, MCP spec compliance for output schemas and elicitation, and correct a subtle base_url fallback issue. The CLI now gently reminds you that FastMCP 3.0 is on the horizon.

## What's Changed
### Enhancements 🔧
* Pin MCP under 2.x by [@jlowin](https://github.com/jlowin) in [#2709](https://github.com/jlowin/fastmcp/pull/2709)
* Add auth_route parameter to SupabaseProvider by [@EloiZalczer](https://github.com/EloiZalczer) in [#2760](https://github.com/jlowin/fastmcp/pull/2760)
* Update CLI banner with FastMCP 3.0 notice by [@jlowin](https://github.com/jlowin) in [#2765](https://github.com/jlowin/fastmcp/pull/2765)
### Fixes 🐞
* Let FastMCPError propagate unchanged from managers by [@jlowin](https://github.com/jlowin) in [#2697](https://github.com/jlowin/fastmcp/pull/2697)
* Fix test cleanup for uvicorn 0.39+ context isolation by [@jlowin](https://github.com/jlowin) in [#2696](https://github.com/jlowin/fastmcp/pull/2696)
* Bump pydocket to 0.16.3 to fix worker cleanup race condition by [@chrisguidry](https://github.com/chrisguidry) in [#2700](https://github.com/jlowin/fastmcp/pull/2700)
* Fix Prefect website URL in docs footer by [@mgoldsborough](https://github.com/mgoldsborough) in [#2705](https://github.com/jlowin/fastmcp/pull/2705)
* Fix: resolve root-level $ref in outputSchema for MCP spec compliance by [@majiayu000](https://github.com/majiayu000) in [#2727](https://github.com/jlowin/fastmcp/pull/2727)
* Fix OAuth Proxy resource parameter validation by [@jlowin](https://github.com/jlowin) in [#2763](https://github.com/jlowin/fastmcp/pull/2763)
* Fix openapi_version check to include 3.1 by [@deeleeramone](https://github.com/deeleeramone) in [#2769](https://github.com/jlowin/fastmcp/pull/2769)
* Fix titled enum elicitation schema to comply with MCP spec by [@jlowin](https://github.com/jlowin) in [#2774](https://github.com/jlowin/fastmcp/pull/2774)
* Fix base_url fallback when url is not set by [@bhbs](https://github.com/bhbs) in [#2782](https://github.com/jlowin/fastmcp/pull/2782)
* Lazy import DiskStore to avoid sqlite3 dependency on import by [@jlowin](https://github.com/jlowin) in [#2785](https://github.com/jlowin/fastmcp/pull/2785)
### Docs 📚
* Add v3 breaking changes notice to README and docs by [@jlowin](https://github.com/jlowin) in [#2713](https://github.com/jlowin/fastmcp/pull/2713)
* Add changelog entries for v2.13.1 through v2.14.1 by [@jlowin](https://github.com/jlowin) in [#2724](https://github.com/jlowin/fastmcp/pull/2724)
* conference to 2.x branch by [@aaazzam](https://github.com/aaazzam) in [#2787](https://github.com/jlowin/fastmcp/pull/2787)

**Full Changelog**: [v2.14.1...v2.14.2](https://github.com/jlowin/fastmcp/compare/v2.14.1...v2.14.2)

</Update>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Unclear changelog entry on line 53.

The entry "conference to 2.x branch" appears to be an incomplete or unclear commit message. Consider clarifying what this documentation change actually does, or omitting it if it's not meaningful to users.

✏️ Suggested clarification
-* conference to 2.x branch by [@aaazzam](https://github.com/aaazzam) in [#2787](https://github.com/jlowin/fastmcp/pull/2787)
+* Backport conference documentation to 2.x branch by [@aaazzam](https://github.com/aaazzam) in [#2787](https://github.com/jlowin/fastmcp/pull/2787)

Or if the entry is not user-relevant, it could be removed from the Docs section.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Update label="v2.14.2" description="2025-12-31">
**[v2.14.2: Port Authority](https://github.com/jlowin/fastmcp/releases/tag/v2.14.2)**
FastMCP 2.14.2 brings a wave of community contributions safely into the 2.x line. A variety of important fixes backported from 3.0 work improve OpenAPI 3.1 compatibility, MCP spec compliance for output schemas and elicitation, and correct a subtle base_url fallback issue. The CLI now gently reminds you that FastMCP 3.0 is on the horizon.
## What's Changed
### Enhancements 🔧
* Pin MCP under 2.x by [@jlowin](https://github.com/jlowin) in [#2709](https://github.com/jlowin/fastmcp/pull/2709)
* Add auth_route parameter to SupabaseProvider by [@EloiZalczer](https://github.com/EloiZalczer) in [#2760](https://github.com/jlowin/fastmcp/pull/2760)
* Update CLI banner with FastMCP 3.0 notice by [@jlowin](https://github.com/jlowin) in [#2765](https://github.com/jlowin/fastmcp/pull/2765)
### Fixes 🐞
* Let FastMCPError propagate unchanged from managers by [@jlowin](https://github.com/jlowin) in [#2697](https://github.com/jlowin/fastmcp/pull/2697)
* Fix test cleanup for uvicorn 0.39+ context isolation by [@jlowin](https://github.com/jlowin) in [#2696](https://github.com/jlowin/fastmcp/pull/2696)
* Bump pydocket to 0.16.3 to fix worker cleanup race condition by [@chrisguidry](https://github.com/chrisguidry) in [#2700](https://github.com/jlowin/fastmcp/pull/2700)
* Fix Prefect website URL in docs footer by [@mgoldsborough](https://github.com/mgoldsborough) in [#2705](https://github.com/jlowin/fastmcp/pull/2705)
* Fix: resolve root-level $ref in outputSchema for MCP spec compliance by [@majiayu000](https://github.com/majiayu000) in [#2727](https://github.com/jlowin/fastmcp/pull/2727)
* Fix OAuth Proxy resource parameter validation by [@jlowin](https://github.com/jlowin) in [#2763](https://github.com/jlowin/fastmcp/pull/2763)
* Fix openapi_version check to include 3.1 by [@deeleeramone](https://github.com/deeleeramone) in [#2769](https://github.com/jlowin/fastmcp/pull/2769)
* Fix titled enum elicitation schema to comply with MCP spec by [@jlowin](https://github.com/jlowin) in [#2774](https://github.com/jlowin/fastmcp/pull/2774)
* Fix base_url fallback when url is not set by [@bhbs](https://github.com/bhbs) in [#2782](https://github.com/jlowin/fastmcp/pull/2782)
* Lazy import DiskStore to avoid sqlite3 dependency on import by [@jlowin](https://github.com/jlowin) in [#2785](https://github.com/jlowin/fastmcp/pull/2785)
### Docs 📚
* Add v3 breaking changes notice to README and docs by [@jlowin](https://github.com/jlowin) in [#2713](https://github.com/jlowin/fastmcp/pull/2713)
* Add changelog entries for v2.13.1 through v2.14.1 by [@jlowin](https://github.com/jlowin) in [#2724](https://github.com/jlowin/fastmcp/pull/2724)
* conference to 2.x branch by [@aaazzam](https://github.com/aaazzam) in [#2787](https://github.com/jlowin/fastmcp/pull/2787)
**Full Changelog**: [v2.14.1...v2.14.2](https://github.com/jlowin/fastmcp/compare/v2.14.1...v2.14.2)
</Update>
<Update label="v2.14.2" description="2025-12-31">
**[v2.14.2: Port Authority](https://github.com/jlowin/fastmcp/releases/tag/v2.14.2)**
FastMCP 2.14.2 brings a wave of community contributions safely into the 2.x line. A variety of important fixes backported from 3.0 work improve OpenAPI 3.1 compatibility, MCP spec compliance for output schemas and elicitation, and correct a subtle base_url fallback issue. The CLI now gently reminds you that FastMCP 3.0 is on the horizon.
## What's Changed
### Enhancements 🔧
* Pin MCP under 2.x by [@jlowin](https://github.com/jlowin) in [#2709](https://github.com/jlowin/fastmcp/pull/2709)
* Add auth_route parameter to SupabaseProvider by [@EloiZalczer](https://github.com/EloiZalczer) in [#2760](https://github.com/jlowin/fastmcp/pull/2760)
* Update CLI banner with FastMCP 3.0 notice by [@jlowin](https://github.com/jlowin) in [#2765](https://github.com/jlowin/fastmcp/pull/2765)
### Fixes 🐞
* Let FastMCPError propagate unchanged from managers by [@jlowin](https://github.com/jlowin) in [#2697](https://github.com/jlowin/fastmcp/pull/2697)
* Fix test cleanup for uvicorn 0.39+ context isolation by [@jlowin](https://github.com/jlowin) in [#2696](https://github.com/jlowin/fastmcp/pull/2696)
* Bump pydocket to 0.16.3 to fix worker cleanup race condition by [@chrisguidry](https://github.com/chrisguidry) in [#2700](https://github.com/jlowin/fastmcp/pull/2700)
* Fix Prefect website URL in docs footer by [@mgoldsborough](https://github.com/mgoldsborough) in [#2705](https://github.com/jlowin/fastmcp/pull/2705)
* Fix: resolve root-level $ref in outputSchema for MCP spec compliance by [@majiayu000](https://github.com/majiayu000) in [#2727](https://github.com/jlowin/fastmcp/pull/2727)
* Fix OAuth Proxy resource parameter validation by [@jlowin](https://github.com/jlowin) in [#2763](https://github.com/jlowin/fastmcp/pull/2763)
* Fix openapi_version check to include 3.1 by [@deeleeramone](https://github.com/deeleeramone) in [#2769](https://github.com/jlowin/fastmcp/pull/2769)
* Fix titled enum elicitation schema to comply with MCP spec by [@jlowin](https://github.com/jlowin) in [#2774](https://github.com/jlowin/fastmcp/pull/2774)
* Fix base_url fallback when url is not set by [@bhbs](https://github.com/bhbs) in [#2782](https://github.com/jlowin/fastmcp/pull/2782)
* Lazy import DiskStore to avoid sqlite3 dependency on import by [@jlowin](https://github.com/jlowin) in [#2785](https://github.com/jlowin/fastmcp/pull/2785)
### Docs 📚
* Add v3 breaking changes notice to README and docs by [@jlowin](https://github.com/jlowin) in [#2713](https://github.com/jlowin/fastmcp/pull/2713)
* Add changelog entries for v2.13.1 through v2.14.1 by [@jlowin](https://github.com/jlowin) in [#2724](https://github.com/jlowin/fastmcp/pull/2724)
* Backport conference documentation to 2.x branch by [@aaazzam](https://github.com/aaazzam) in [#2787](https://github.com/jlowin/fastmcp/pull/2787)
**Full Changelog**: [v2.14.1...v2.14.2](https://github.com/jlowin/fastmcp/compare/v2.14.1...v2.14.2)
</Update>

@marvin-context-protocol
Copy link
Copy Markdown
Contributor

Test Failure Analysis

Summary: The test suite is timing out on Windows during Azure provider tests at line 19 in after exceeding the 5-second timeout.

Root Cause: The recent changes added with to (and likely other auth provider settings classes). When initializes with , it attempts to read the file. On Windows specifically, this appears to be causing a blocking operation that exceeds the 5-second test timeout.

The issue manifests during provider initialization:

provider = AzureProvider(
    client_id="test_client",
    client_secret="test_secret",
    # ... more params
)

Inside __init__, line ~188 calls:

settings = AzureProviderSettings.model_validate({...})

This triggers pydantic-settings to attempt reading .env, which blocks on Windows.

Suggested Solution:

The env_file parameter should be set conditionally or made optional for testing scenarios. Here are the recommended fixes:

  1. Option A: Disable env_file in tests (Quick fix)

    • Set FASTMCP_ENV_FILE="" in the test environment to prevent file loading
    • Add to pyproject.toml or test fixtures:
      import os
      os.environ["FASTMCP_ENV_FILE"] = ""
  2. Option B: Make env_file conditional (Better fix)

    • Modify AzureProviderSettings (and other provider settings classes) to only use env_file when it exists or when explicitly enabled:
      from pathlib import Path
      
      _env_file = ENV_FILE if ENV_FILE and Path(ENV_FILE).exists() else None
      
      model_config = SettingsConfigDict(
          env_prefix="FASTMCP_SERVER_AUTH_AZURE_",
          env_file=_env_file,
          extra="ignore",
      )
  3. Option C: Use env_file_encoding with explicit None (Most robust)

    • Some pydantic-settings versions handle missing files better with explicit encoding:
      model_config = SettingsConfigDict(
          env_prefix="FASTMCP_SERVER_AUTH_AZURE_",
          env_file=ENV_FILE,
          env_file_encoding="utf-8" if ENV_FILE else None,
          extra="ignore",
      )
Detailed Analysis

Log Excerpt Showing Failure

tests\server\auth\providers\test_azure.py [32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m+++++++++++++++++++++++++++++++++++ Timeout +++++++++++++++++++++++++++++++++++

The test hung at the 20th test (after 19 passing dots), which corresponds to test initialization. The timeout occurred after 5 seconds (the default pytest timeout).

Code Change Analysis

The PR branch added BaseSettings usage to auth providers:

class AzureProviderSettings(BaseSettings):
    model_config = SettingsConfigDict(
        env_prefix="FASTMCP_SERVER_AUTH_AZURE_",
        env_file=ENV_FILE,  # <-- This triggers .env file reading
        extra="ignore",
    )

Where ENV_FILE = os.getenv("FASTMCP_ENV_FILE", ".env") from src/fastmcp/settings.py.

Why Windows Specifically?

Windows file I/O can behave differently than Unix-like systems:

  • File locking mechanisms differ
  • Path resolution may be slower
  • The .env file lookup might be traversing directories differently

The tests passed on other platforms but failed specifically on windows-latest with Python 3.10.

Related Files

Files causing the issue:

  • src/fastmcp/server/auth/providers/azure.py:34-45 - AzureProviderSettings with env_file=ENV_FILE
  • src/fastmcp/settings.py:21 - ENV_FILE definition

Files needing review:

  • Check if other auth providers (Auth0, AWS, GitHub, Google, etc.) were updated similarly and may have the same issue
  • tests/server/auth/providers/test_azure.py:19 - First failing test location

Test file:

  • tests/server/auth/providers/test_azure.py - Tests timing out during provider initialization

@marvin-context-protocol
Copy link
Copy Markdown
Contributor

Test Failure Analysis

Summary: The test suite is timing out on Windows during Azure provider tests at line 19 in test_azure.py after exceeding the 5-second timeout.

Root Cause: The recent changes added BaseSettings with env_file=ENV_FILE to AzureProviderSettings (and likely other auth provider settings classes). When pydantic-settings initializes with env_file=".env", it attempts to read the .env file. On Windows specifically, this appears to be causing a blocking operation that exceeds the 5-second test timeout.

The issue manifests during provider initialization:

provider = AzureProvider(
    client_id="test_client",
    client_secret="test_secret",
    # ... more params
)

Inside __init__, line ~188 calls:

settings = AzureProviderSettings.model_validate({...})

This triggers pydantic-settings to attempt reading .env, which blocks on Windows.

Suggested Solution:

The env_file parameter should be set conditionally or made optional for testing scenarios. Here are the recommended fixes:

  1. Option A: Disable env_file in tests (Quick fix)

    • Set FASTMCP_ENV_FILE="" in the test environment to prevent file loading
    • Add to pyproject.toml or test fixtures:
      import os
      os.environ["FASTMCP_ENV_FILE"] = ""
  2. Option B: Make env_file conditional (Better fix)

    • Modify AzureProviderSettings (and other provider settings classes) to only use env_file when it exists or when explicitly enabled:
      from pathlib import Path
      
      _env_file = ENV_FILE if ENV_FILE and Path(ENV_FILE).exists() else None
      
      model_config = SettingsConfigDict(
          env_prefix="FASTMCP_SERVER_AUTH_AZURE_",
          env_file=_env_file,
          extra="ignore",
      )
  3. Option C: Use env_file_encoding with explicit None (Most robust)

    • Some pydantic-settings versions handle missing files better with explicit encoding:
      model_config = SettingsConfigDict(
          env_prefix="FASTMCP_SERVER_AUTH_AZURE_",
          env_file=ENV_FILE,
          env_file_encoding="utf-8" if ENV_FILE else None,
          extra="ignore",
      )
Detailed Analysis

Log Excerpt Showing Failure

tests\server\auth\providers\test_azure.py [32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m[32m.[0m+++++++++++++++++++++++++++++++++++ Timeout +++++++++++++++++++++++++++++++++++

The test hung at the 20th test (after 19 passing dots), which corresponds to test initialization. The timeout occurred after 5 seconds (the default pytest timeout).

Code Change Analysis

The PR branch added BaseSettings usage to auth providers:

class AzureProviderSettings(BaseSettings):
    model_config = SettingsConfigDict(
        env_prefix="FASTMCP_SERVER_AUTH_AZURE_",
        env_file=ENV_FILE,  # <-- This triggers .env file reading
        extra="ignore",
    )

Where ENV_FILE = os.getenv("FASTMCP_ENV_FILE", ".env") from src/fastmcp/settings.py.

Why Windows Specifically?

Windows file I/O can behave differently than Unix-like systems:

  • File locking mechanisms differ
  • Path resolution may be slower
  • The .env file lookup might be traversing directories differently

The tests passed on other platforms but failed specifically on windows-latest with Python 3.10.

Related Files

Files causing the issue:

  • src/fastmcp/server/auth/providers/azure.py:34-45 - AzureProviderSettings with env_file=ENV_FILE
  • src/fastmcp/settings.py:21 - ENV_FILE definition

Files needing review:

  • Check if other auth providers (Auth0, AWS, GitHub, Google, etc.) were updated similarly and may have the same issue
  • tests/server/auth/providers/test_azure.py:19 - First failing test location

Test file:

  • tests/server/auth/providers/test_azure.py - Tests timing out during provider initialization

@jlowin jlowin merged commit 559b778 into release/2.x Jan 12, 2026
11 of 12 checks passed
@jlowin jlowin deleted the add-transport-to-context branch January 12, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality. For issues and smaller PR improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant