This page describes how to set up and configure a third-party application before creating the Sourcegraph data store.
Create OAuth app
Sign in to your Sourcegraph account or site administration page.
Navigate to your user account settings or site administration page to manage OAuth applications (client applications).
Create a new OAuth client application.
In the creation dialog, enter an application name (for example,
Gemini Enterprise Connector).After you create the application, copy the Client ID and store it securely for later use when creating the data store.
Set redirect URL and scopes
When creating or configuring the OAuth application, configure its redirect URL and scopes:
Open the OAuth application configuration page in Sourcegraph.
In the Redirect URL (or callback URL) field, enter
https://vertexaisearch.cloud.google.com/oauth-redirect.Select and enable the following scopes:
Scope Purpose openid Allows the app to authenticate the user using OpenID Connect. profile Allows the app to view basic profile information of the authenticated user. email Allows the app to view the email address of the authenticated user. offline_access Grants a refresh token so the app can access Sourcegraph when the user is not actively logged in. mcp Allows the app to connect using Model Context Protocol (MCP) to interact with Sourcegraph search and tools. Save the configuration changes.