This page describes how to set up and configure a third-party application before
creating the Sourcegraph data store.

## Create OAuth app

1. Sign in to your Sourcegraph account or site administration page.

2. Navigate to your user account settings or site administration page to manage
   OAuth applications (client applications).

3. Create a new OAuth client application.

4. In the creation dialog, enter an application name (for example,
   `Gemini Enterprise Connector`).

5. 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:

1. Open the OAuth application configuration page in Sourcegraph.

2. In the **Redirect URL** (or callback URL) field, enter
   `https://vertexaisearch.cloud.google.com/oauth-redirect`.

3. 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. |

4. Save the configuration changes.