Harden OAuth-backed remote MCP actions#377
Open
stefan-ernst wants to merge 2 commits into
Open
Conversation
stefan-ernst
marked this pull request as ready for review
July 23, 2026 08:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first of two PRs following up on the remote MCP connector discussion.
In that discussion we agreed that connectors should be able to use native Streamable HTTP MCP, and that tool calls should run with the current user's OAuth identity instead of reusing an administrator's source credential. PRs #211 and #212 established that direction. Building the Windshift connector against it exposed a few gaps in the end-to-end flow, which this PR addresses without adding the Windshift source itself.
MCP tools can now declare the OAuth scopes they require. Omni carries those scopes through connector discovery and asks the user only for permissions missing from their existing credential. Stored OAuth credentials retain the metadata needed for refresh and are refreshed safely, including providers that rotate refresh tokens.
The connector SDK can rebuild an authenticated MCP catalog after OAuth completes, and a newly connected personal source starts syncing immediately. Completed syncs are flushed to the index without waiting for a batch threshold. Tool discovery also handles exact matches more reliably and retries once when a model stops immediately after discovering or loading a tool.
The tests in this PR cover the generic SDK, OAuth, indexing, credential-refresh, and lazy-tool behavior. The Windshift connector is kept in the dependent draft #378 so this foundation can be reviewed on its own.
Validation:
shared,omni-indexer, andomni-connector-manager