Skip to content

feat(mcp): show search tools to everyone, with links to enable search - #1384

Merged
Alexandre Girard (girarda) merged 5 commits into
release-candidate/v1from
devin/1792018335-search-tools-ga
Oct 15, 2026
Merged

Alexandre Girard (girarda) merged 5 commits into
release-candidate/v1from
devin/1792018335-search-tools-ga

Conversation

@girarda

@girarda Alexandre Girard (girarda) commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

execute_external_search_query and get_cloud_search_status are no longer insiders-only, so every MCP client lists them. This includes clients like Claude that can't send X-MCP-Insiders. When search isn't enabled, the tools now return an error result with enablement links instead of raising. Requested by AJ Steers and Alexandre Girard for a demo. The generic insiders_only mechanism from #1375 stays in place for other tools.

Search not enabled (AirbyteExternalAccessNotEnabledError raised with enablement_url set): both tools return their usual result model with empty hits/metadata/sources and a new errors list. The error text follows the direct-access pattern (_direct_access_disabled_result):

Show the user this message as-is: Search is currently disabled for GitHub Issues.
If the Context layer isn't enabled for your organization yet, an organization admin can
[click here](<web>/organization/<orgId>/context-layer) to enable it first.
Then [click here](<connector_url>) to turn on agent access and search for GitHub Issues specifically.

Once search is enabled, the connector's synced data must be indexed before searches return
results. Call `get_cloud_search_status` to check which streams are indexed and whether their
backfill is complete.
  • Where the links come from: CloudConnector.execute_search_query and get_search_status now pass enablement_url=self.connector_url. _raise_if_feature_not_enabled also sets the new organization_enablement_url from the organizationId in the enablement response it already fetched, so there's no extra API call.
  • Redaction: the generated message goes through redact_agent_text, because result content skips AgentErrorTextMiddleware.
  • 409 with no detail counts as not enabled: Sonar returns 409 source_search_disabled / destination_search_disabled when the connector has search turned off, but the platform currently replaces that detail with a generic message. For SEARCH_INDEXING, _raise_if_feature_not_enabled now re-checks enablement on a 409 whose message is generic: the platform default, PyAirbyte's status fallback, or no message (_GENERIC_CONFLICT_MESSAGES). A 409 carrying its own Cloud detail is re-raised unchanged.
  • Org unknown: if the org ID isn't available, the message has only the connector link.
  • No enablement URL: the exception is re-raised, the same as for direct access.
  • Empty-index warning: ExternalSearchResult no longer adds the "No index matched…" warning when errors is set.

Not in this PR

This PR can't tell "search is off for this connector" apart from "the feature isn't rolled out to your org yet (coming soon)". Sonar does say which case it is: a 403 with "External Cloud organization access is not enabled." means the org isn't rolled out. But SonarForwarder in airbyte-server-wrapped keeps detail only for 400/422 responses, so PyAirbyte only sees a generic message. Fixing that needs a platform change, tracked in PLAT-1557. Once it ships, Cloud's detail comes through as-is and the client-side translation (_search_disabled_errors) can be removed.

Testing

  • Unit tests: cover both tools across these cases:
    • org link plus connector link
    • connector link only
    • fallback label
    • re-raise when there's no enablement URL
    • organization_enablement_url set or unset
    • a 409 when the connector is disabled (raises not-enabled) and when it's enabled (re-raises)
    • a 409 with specific Cloud detail (relayed)
    • redaction of credentials in the connector name and URLs
  • Tool registration: the search tools are listed whether AIRBYTE_MCP_INSIDERS is unset, 1 or 0.
  • Real server: started airbyte-mcp over STDIO with no env var or header and listed its tools. Base (55917c3c) lists 42 tools and neither search tool. This branch lists 44, including both.
  • Not run: a real search against Cloud.

Link to Devin session: https://app.devin.ai/sessions/e6965897bf15489380e96ea10d3ee8dd
Open in Devin Desktop: https://app.devin.ai/desktop/session/e6965897bf15489380e96ea10d3ee8dd?variant=devin
Requested by: Alexandre Girard (@girarda)

…e search

Co-Authored-By: alexandre@airbyte.io <alexandre@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/1792018335-search-tools-ga' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792018335-search-tools-ga'

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.

Comment thread airbyte/mcp/cloud.py
Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
@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/1792018335-sea... d023cea +/-
65% 79% +14%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1792018335-sea... d023cea +/-
airbyte/mcp/cloud.py 52% 84% +32%
airbyte/_util/api_util.py 36% 68% +32%
airbyte/cloud/connectors.py 34% 76% +42%
airbyte/mcp/_datadog.py 0% 50% +50%
airbyte/mcp/_user_identity.py 0% 93% +93%
airbyte/mcp/_telemetry.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% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest

release-candidate/v1 d9f652f devin/1792018335-sea... d023cea +/-
71% 81% +10%
View coverage of the 10 most impacted files.
File release-candidate/v1 d9f652f devin/1792018335-sea... d023cea +/-
airbyte/cloud/connectors.py 51% 80% +29%
airbyte/mcp/cloud.py 52% 84% +32%
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/mcp/_telemetry.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% 97% +97%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest-unit

release-candidate/v1 devin/1792018335-sea... d023cea +/-
— 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/1792018335-sea... d023cea +/-
airbyte/cloud/models.py — 97% —
airbyte/mcp/_sso_auth.py — 96% —
airbyte/_direct...ctors/models.py — 95% —
airbyte/cloud/client.py — 90% —
airbyte/exceptions.py — 89% —
airbyte/mcp/cloud.py — 84% —
airbyte/progress.py — 80% —
airbyte/cloud/connectors.py — 76% —
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 15, 2026 00:21 UTC

Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
@girarda

Copy link
Copy Markdown
Contributor Author

Codex (@codex) review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T23:40:51.728517Z 11478cc Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: 11478cc269

ℹ️ 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 (@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 (@codex) address that feedback".

Comment thread airbyte/cloud/connectors.py
Comment thread airbyte/mcp/cloud.py Outdated
@girarda

Copy link
Copy Markdown
Contributor Author

I'll merge this to unblock. Let me know if you have feedback Aaron ("AJ") Steers (@aaronsteers) and I'll update as a follow up

devin-ai-integration Bot and others added 2 commits October 15, 2026 00:02
Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
Co-Authored-By: alexandre@airbyte.io <alexandre@airbyte.io>
@girarda
Alexandre Girard (girarda) merged commit baaf0be into release-candidate/v1 Oct 15, 2026
29 checks passed
@girarda
Alexandre Girard (girarda) deleted the devin/1792018335-search-tools-ga branch October 15, 2026 00:23
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