Skip to content

fix(mcp): Return only the email domain in list_cloud_organizations; fill workspace_url in list_cloud_workspaces - #1377

Merged
Aaron ("AJ") Steers (aaronsteers) merged 2 commits into
release-candidate/v1from
devin/1792013722-org-email-domain-workspace-url
Oct 16, 2026
Merged

Aaron ("AJ") Steers (aaronsteers) merged 2 commits into
release-candidate/v1from
devin/1792013722-org-email-domain-workspace-url

Conversation

@aaronsteers

Copy link
Copy Markdown
Member

Overview

👉 TL;DR: Organization list results stop showing each organization's full contact email and show only its domain. Describing a single organization now returns the full email, which used to come back empty. Workspace list results now include the workspace web link, the same way describing a workspace does.

Specifically, this adds email_domain to CloudOrganizationResult and CloudOrganization, adds an org-listing fallback for CloudOrganization.email, and sets workspace_url in list_cloud_workspaces.

Changes

  • list_cloud_organizations: returns email_domain (lowercased, the part after @) and leaves email null.
  • describe_cloud_organization: returns both email and email_domain.
  • CloudOrganization.email: the get_organization_info Config API response has no email field, so this was always null for orgs looked up by ID. It now falls back to the org listing (one cached lookup).
  • list_cloud_workspaces: fills workspace_url, matching describe_cloud_workspace.

Risks

  • Breaking for MCP clients: anything that reads email from list_cloud_organizations results now gets null. Use describe_cloud_organization, or read email_domain.

Test plan

  • New unit tests cover the list shape, the describe email, and the workspace URL in list results. Lint and the touched tests pass locally.

Link to Devin session: https://app.devin.ai/sessions/a51d808f26c9402fafc93e7640648187
Open in Devin Desktop: https://app.devin.ai/desktop/session/a51d808f26c9402fafc93e7640648187?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)

list_cloud_organizations no longer returns full contact emails for every
organization; it reports email_domain instead, while
describe_cloud_organization returns both email and email_domain.

describe_cloud_organization previously returned email=None because
_get_organization_by_id uses the get_organization_info Config API, whose
response does not include the contact email. CloudOrganization.email now
falls back to the public organizations listing (one extra call, cached).

list_cloud_workspaces now fills workspace_url the same way
describe_cloud_workspace does.

Co-Authored-By: AJ Steers <[email protected]>
@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/1792013722-org-email-domain-workspace-url' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792013722-org-email-domain-workspace-url'

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
📚 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 Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: Python

Python / code-coverage/pytest-no-creds

release-candidate/v1 d9f652f devin/1792013722-org... 9a85db9 +/-
65% 79% +14%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1792013722-org... 9a85db9 +/-
airbyte/mcp/cloud.py 52% 83% +31%
airbyte/_util/api_util.py 36% 68% +32%
airbyte/cloud/connectors.py 34% 75% +41%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_user_identity.py 0% 93% +93%
airbyte/_direct...ctors/models.py 0% 94% +94%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest

release-candidate/v1 d9f652f devin/1792013722-org... 9a85db9 +/-
71% 81% +10%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1792013722-org... 9a85db9 +/-
airbyte/cloud/connectors.py 51% 80% +29%
airbyte/mcp/cloud.py 52% 83% +31%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/int..._registry_ui.py 0% 92% +92%
airbyte/mcp/_user_identity.py 0% 93% +93%
airbyte/_direct...ctors/models.py 0% 94% +94%
airbyte/mcp/_telemetry.py 0% 94% +94%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest-unit

release-candidate/v1 devin/1792013722-org... 9a85db9 +/-
— 76% —

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/1792013722-org... 9a85db9 +/-
airbyte/cloud/models.py — 97% —
airbyte/mcp/_sso_auth.py — 96% —
airbyte/_direct...ctors/models.py — 94% —
airbyte/cloud/client.py — 90% —
airbyte/exceptions.py — 89% —
airbyte/mcp/cloud.py — 83% —
airbyte/progress.py — 80% —
airbyte/cloud/connectors.py — 75% —
airbyte/_util/api_util.py — 68% —
airbyte/shared/...ql_processor.py — 68% —

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


Updated October 14, 2026 22:11 UTC

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

The focused changes match the stated behavior, include regression coverage, and have no identified blocking issues.

0 open findings

What changed in this PR

Updates Cloud MCP responses to limit contact-email exposure in organization listings and include workspace links.

Changes:

  • Organization listings return email domains; descriptions retain full emails.
  • Organizations resolved by ID gain a cached email lookup fallback.
  • Workspace listings include web URLs, with focused regression tests.
File Description
tests/​unit_tests/​test_mcp_cloud.py Updates the organization fixture with an email domain.
tests/​unit_tests/​test_cloud_credentials.py Tests email visibility, lookup caching, domain extraction, and workspace URLs.
airbyte/​mcp/​cloud.py Updates organization response fields and workspace links.
airbyte/​cloud/​organizations.py Adds domain extraction and cached email lookup.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@aaronsteers
Aaron ("AJ") Steers (aaronsteers) marked this pull request as ready for review October 16, 2026 00:04
@aaronsteers

Copy link
Copy Markdown
Member Author

Devin, confirm there aren't any notable performance penalties for this change.

@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 found 2 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment thread airbyte/mcp/cloud.py
Comment thread airbyte/cloud/organizations.py
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Confirmed: no notable performance penalty. The only new API call is one extra call per describe-by-ID.

  1. list_cloud_organizations: no new calls. Both listing paths already return each org's email: the Config API organizations/list_by_user_id (OrganizationRead, where email is a required field) and the public GET /organizations. email_domain is computed locally from that email.
  2. list_cloud_workspaces: no new calls. workspace_url is built with string formatting (get_web_url_root + workspace ID).
  3. describe_cloud_organization by name: no new calls. The org is found through the listing, which already includes the email.
  4. describe_cloud_organization by ID: one extra call. get_organization_info (OrganizationInfoRead) doesn't return an email, so we make one GET /organizations call to look it up. It runs at most once per org object, and the response has one row per org the user belongs to.

@aaronsteers
Aaron ("AJ") Steers (aaronsteers) merged commit a7a63c1 into release-candidate/v1 Oct 16, 2026
30 checks passed
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) deleted the devin/1792013722-org-email-domain-workspace-url branch October 16, 2026 02:13
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