Skip to content

fix(mcp): adapt login consent cookie to fastmcp 4.1.7 - #1466

Draft
Ryan Waskewich (rwask) wants to merge 2 commits into
release-candidate/v1from
devin/1794496558-fix-mcp-login-consent-cookie
Draft

Ryan Waskewich (rwask) wants to merge 2 commits into
release-candidate/v1from
devin/1794496558-fix-mcp-login-consent-cookie

Conversation

@rwask

Copy link
Copy Markdown

Summary

The hosted Cloud MCP (mcp.airbyte.com, 1.0.0-rc.42) returns HTTP 500 on every POST /auth/login, so no new user can finish OAuth sign-in. Already-authenticated sessions are unaffected. Datadog shows ~518 failures since 2026-11-06 22:37 UTC:

Exception in ASGI application | ConsentMixin._set_consent_binding_cookie() takes 4 positional arguments but 5 were given

fastmcp 4.1.7 dropped the request parameter from the private _set_consent_binding_cookie. Our fastmcp>=4.0.9,<5.0 range let the prod image resolve 4.1.8, while AirbyteSsoOidcProxy._redirect_upstream still passed request.

Changes:

  • _redirect_upstream: self._set_consent_binding_cookie(response, txn.txn_id, consent_token) (no request).
  • fastmcp floor raised to >=4.1.7,<5.0; uv.lock resolves 4.1.8.
  • check_fastmcp_compatibility() now also checks the positional parameters of _set_consent_binding_cookie, _verify_consent_binding_cookie and _build_upstream_authorize_url, so future signature drift fails at startup instead of on each login.
  • Tests: signature-drift coverage, and POST /auth/login (default and SSO) asserts a 302 to the upstream with a transaction-bound consent cookie.

Test plan: pytest tests/unit_tests/test_mcp_sso_auth.py (130 passed), ruff check, pyrefly check. Not yet verified against prod; after release + redeploy, confirm POST /auth/login no longer returns 500 for service:cloud-mcp.

Requested by Ryan Waskewich (Ryan Waskewich (@rwask)).

Link to Devin session: https://app.devin.ai/sessions/aefbc0c0a8764137a0dc2a1a77d252aa
Open in Devin Desktop: https://app.devin.ai/desktop/session/aefbc0c0a8764137a0dc2a1a77d252aa?variant=devin

Co-Authored-By: Ryan Waskewich <ryan.waskewich@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/1794496558-fix-mcp-login-consent-cookie' pyairbyte --help

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

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/1794496558-fix... b5b2c80 +/-
65% 81% +16%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1794496558-fix... b5b2c80 +/-
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/1794496558-fix... b5b2c80 +/-
71% 83% +12%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1794496558-fix... b5b2c80 +/-
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/1794496558-fix... b5b2c80 +/-
— 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/1794496558-fix... b5b2c80 +/-
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:35 UTC

Co-Authored-By: Ryan Waskewich <ryan.waskewich@airbyte.io>

This branch has not been deployed

No deployments
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.

1 participant