Skip to content

fix(mcp): pin fastmcp<4.1.7 to restore hosted SSO login - #1465

Merged
Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
release-candidate/v1from
devin/1794492938-fix-sso-consent-cookie-fastmcp
Nov 12, 2026
Merged

Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
release-candidate/v1from
devin/1794492938-fix-sso-consent-cookie-fastmcp

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Overview

👉 TL;DR: Fixes the hosted Cloud MCP login, which has been failing with a server error for every user since 2026-11-06. It pins the auth library back to a stable release so the hosted image can no longer pull in an alpha build, and makes the server refuse to start if that library's internals ever change shape again.

Specifically, this pins fastmcp>=4.0.9,<4.1.7 and extends check_fastmcp_compatibility() to check the signatures of the private OIDCProxy consent-cookie methods that AirbyteSsoOidcProxy calls.

Changes

  • pyproject.toml: fastmcp>=4.0.9,<5.0 → fastmcp>=4.0.9,<4.1.7. uv.lock moves fastmcp / fastmcp-slim from 4.0.9 to 4.1.6.
  • airbyte/mcp/_sso_auth.py: the new _CALLED_FASTMCP_METHOD_PARAMS gives the expected parameter names of _set_consent_binding_cookie and _verify_consent_binding_cookie. check_fastmcp_compatibility() now fails at startup when either one doesn't match. The existing _set_consent_binding_cookie(request, response, txn_id, token) call is unchanged.
  • tests/unit_tests/test_mcp_sso_auth.py: a new test confirms that the check names a changed _set_consent_binding_cookie signature.
  • tests/unit_tests/test_mcp_http_main.py: the MultiAuth test now names its fake verifier (verifiers={"headless": verifier}). fastmcp 4.1.6 rejects duplicate source IDs, and its two identical fakes collided.

Review Spotlight

Reviewers with limited time, please review first:

Root cause

  • The hosted image installs the released package with uv pip install --prerelease=allow, so PyAirbyte's uv.lock is not used. fastmcp>=4.0.9,<5.0 resolved to 4.2.0a3 for 1.0.0-rc.42, and it resolves to 4.2.0a4 today.
  • Those alphas, and stable 4.1.7+, dropped request from the private _set_consent_binding_cookie. Every POST /auth/login (Airbyte Cloud and SSO) then raises TypeError: ConsentMixin._set_consent_binding_cookie() takes 4 positional arguments but 5 were given.
  • Under PEP 440, <4.1.7 excludes 4.1.7 pre-releases and every 4.2.0a*, even with --prerelease=allow.

Risks

  • PyAirbyte users can't install fastmcp 4.1.7+ alongside this release until the pin is lifted. Lifting it means changing the call to the new signature, and the startup check will flag that.
  • Preview and internal Cloud MCP deployments can't reproduce or verify this bug. They don't set AIRBYTE_MCP_SSO_OIDC_CONFIG_URL_TEMPLATE, so they never serve the SSO login page.

Follow-ups

  • Lift the pin and adopt the 4.1.7+ signature in a separate PR.

Test plan

  • uv run pytest tests/unit_tests/test_mcp_sso_auth.py tests/unit_tests/test_mcp_http_main.py: 143 passed. ruff check and ruff format pass.
  • A scripted interactive login (register → /authorize → /auth/login → POST /auth/login) against a local http_main with SSO login enabled and pointed at cloud.airbyte.com. Both builds were installed the way the image does it (--prerelease=allow):
    • Released airbyte==1.0.0rc42 (fastmcp 4.2.0a4) returns 500 with the TypeError above. This matches what prod mcp.airbyte.com returns today.
    • This branch (fastmcp 4.1.6) returns 302 to the Keycloak authorize URL.
  • Not tested against a hosted deployment of this branch.

Link to Devin session: https://app.devin.ai/sessions/372eb3109e3742879489bff8d6b26bb0

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

… login

Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This PyAirbyte Version

You can test this version of PyAirbyte using the following:

# Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1794492938-fix-sso-consent-cookie-fastmcp' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1794492938-fix-sso-consent-cookie-fastmcp'

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /fix-pr - Fixes most formatting and linting issues
  • /uv-lock - Updates uv.lock file
  • /test-pr - Runs tests with the updated PyAirbyte
  • /prerelease - Builds and publishes a prerelease version to PyPI
  • /evals - Runs the Cloud MCP evals that use the MCP tools this PR changed (/evals full=true runs the full suite)
📚 Show Repo Guidance

Helpful Resources

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@github-code-quality

github-code-quality Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: Python

Python / code-coverage/pytest-no-creds

release-candidate/v1 d9f652f devin/1794492938-fix... 1809fb5 +/-
65% 81% +16%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1794492938-fix... 1809fb5 +/-
airbyte/_util/api_util.py 36% 66% +30%
airbyte/mcp/cloud.py 52% 87% +35%
airbyte/cloud/connectors.py 34% 81% +47%
airbyte/cloud/connections.py 26% 76% +50%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/cloud/c...lder/project.py 0% 94% +94%
airbyte/_direct...ctors/models.py 0% 95% +95%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 96% +96%

Python / code-coverage/pytest

release-candidate/v1 d9f652f devin/1794492938-fix... 1809fb5 +/-
71% 83% +12%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1794492938-fix... 1809fb5 +/-
airbyte/cloud/connectors.py 51% 84% +33%
airbyte/mcp/cloud.py 52% 87% +35%
airbyte/cloud/connections.py 34% 77% +43%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/cloud/c...lder/project.py 0% 94% +94%
airbyte/_direct...ctors/models.py 0% 95% +95%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 96% +96%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest-unit

release-candidate/v1 devin/1794492938-fix... 1809fb5 +/-
— 78% —

Line coverage data for the release-candidate/v1 branch is not yet available.

View coverage of the 10 most covered files.
File release-candidate/v1 devin/1794492938-fix... 1809fb5 +/-
airbyte/mcp/_sso_auth.py — 96% —
airbyte/cloud/models.py — 96% —
airbyte/_direct...ctors/models.py — 95% —
airbyte/cloud/client.py — 91% —
airbyte/mcp/cloud.py — 87% —
airbyte/cloud/connectors.py — 81% —
airbyte/progress.py — 80% —
airbyte/cloud/connections.py — 76% —
airbyte/shared/...ql_processor.py — 68% —
airbyte/_util/api_util.py — 66% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 12, 2026 15:30 UTC

devin-ai-integration Bot and others added 3 commits November 12, 2026 14:26
…ay unique

Co-Authored-By: AJ Steers <aj@airbyte.io>
…ires unique source IDs

Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration devin-ai-integration Bot changed the title fix(mcp): match fastmcp 4.1.7 _set_consent_binding_cookie signature fix(mcp): pin fastmcp <4.1.7 to restore hosted SSO login Nov 12, 2026
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) marked this pull request as ready for review November 12, 2026 15:21
Copilot AI balanced review requested due to automatic review settings November 12, 2026 15:21

@devin-ai-integration devin-ai-integration Bot left a comment

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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Devin Review

🟢 Devin Review found nothing to fix · View findings

@devin-ai-integration devin-ai-integration Bot changed the title fix(mcp): pin fastmcp <4.1.7 to restore hosted SSO login fix(mcp): pin fastmcp<4.1.7 to restore hosted SSO login Nov 12, 2026

Copilot AI left a comment

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.

🟢 Approval recommended

No active review issues are reported for the FastMCP compatibility update.

No open issues 🎉

What changed in this PR

This PR addresses hosted Cloud MCP login failures caused by incompatible FastMCP consent-cookie APIs. It narrows the dependency range and strengthens startup compatibility checks for the custom SSO proxy.

Changes:

  • Constrains FastMCP to >=4.0.9,<4.1.7 and locks it to 4.1.6.
  • Checks parameter names for both consent-binding methods so incompatible signatures fail at startup.
  • Adds a signature-change regression test and names the fake MultiAuth verifier to avoid duplicate provider IDs.
File Description
uv.lock Locks FastMCP to 4.1.6 and refreshes affected transitive dependencies.
tests/​unit_tests/​test_mcp_sso_auth.py Tests rejection of an incompatible consent-cookie method signature.
tests/​unit_tests/​test_mcp_http_main.py Assigns the fake verifier a distinct MultiAuth identifier.
pyproject.toml Caps FastMCP below the incompatible 4.1.7 release.
airbyte/​mcp/​_sso_auth.py Adds consent-binding signature checks and updates compatibility documentation and errors.

Review effort: Balanced

@aaronsteers
Aaron ("AJ") Steers (aaronsteers) merged commit 4a8d8cc into release-candidate/v1 Nov 12, 2026
35 checks passed
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) deleted the devin/1794492938-fix-sso-consent-cookie-fastmcp branch November 12, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants