Skip to content

Harden OAuth-backed remote MCP actions#377

Open
stefan-ernst wants to merge 2 commits into
getomnico:masterfrom
Windshiftapp:feat/oauth-mcp-foundation
Open

Harden OAuth-backed remote MCP actions#377
stefan-ernst wants to merge 2 commits into
getomnico:masterfrom
Windshiftapp:feat/oauth-mcp-foundation

Conversation

@stefan-ernst

@stefan-ernst stefan-ernst commented Jul 23, 2026

Copy link
Copy Markdown

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:

  • TypeScript connector SDK: 82 tests
  • Web OAuth helpers: 6 tests
  • AI tool discovery and OAuth handling: 29 unit tests
  • Shared OAuth refresh: 2 tests
  • Indexer queue behavior: 3 tests
  • Connector-manager unit tests: 29 tests
  • Standalone Rust compile check for shared, omni-indexer, and omni-connector-manager

@stefan-ernst
stefan-ernst marked this pull request as ready for review July 23, 2026 08:28
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