> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.xobin.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to connect Xobin MCP to Gemini Enterprise?

Unlike Claude and ChatGPT, Gemini Enterprise does not auto-register an OAuth client. An administrator must register Gemini as an OAuth app on Xobin, then create a Custom MCP Server data store.

|| Contact your IT team to do the setup.

**Note:** \*\*Gemini only supports Streamable HTTP (the Xobin URL ending in `/mcp`). Legacy SSE is not supported. Before proceeding, make sure you have reviewed the prerequisites and connection values in\*\* [**Connecting Xobin to AI Assistants via MCP**](https://docs.xobin.com/en-us/article/connecting-xobin-to-ai-assistants-via-mcp-hdrtb8/)**.**

**Step 1: Register Gemini as an OAuth Client on Xobin**
* Request a pre-registered Gemini client from Xobin, or register one directly against the MCP authorization server.
* Gemini requires the following redirect URI:
```
https://vertexaisearch.cloud.google.com/oauth-redirect
```

Example registration request:

```
curl -sS -X POST "https://{MCP_HOST}/register" \
  -H "Content-Type: application/json" \
  -d '{
    "client_name": "Gemini Enterprise",
    "redirect_uris": [
      "https://vertexaisearch.cloud.google.com/oauth-redirect"
    ],
    "grant_types": ["authorization_code", "refresh_token"],
    "response_types": ["code"],
    "token_endpoint_auth_method": "none",
    "scope": "mcp:read mcp:write"
  }'
```

Save the returned `client_id` (and `client_secret`, if provided) in a secure secrets store — never in chat logs.

||| **Warning:** If registration fails or Gemini cannot exchange tokens, contact Xobin to provision the client. Redirect URIs are strictly enforced — Gemini will not connect without the exact URI above.

**Step 2: Google Cloud Gemini Enterprise**
Your Google Cloud project must allow Custom MCP data stores and egress to `{MCP_HOST}`. The user creating the data store needs the **Discovery Engine Editor** role (`roles/discoveryengine.editor`).
* In the Google Cloud console, open **Gemini Enterprise**.
* Go to **Data Stores → Create Data Store**.
* Search for **Custom MCP Server** and click **Add MCP Server**.
* Select **OAuth 2.0** and enter the following:
| Field | Value |
| MCP Server URL | https://{MCP_HOST}/mcp |
| Authorization URL | https://{MCP_HOST}/authorize |
| Token URL | https://{MCP_HOST}/token |
| Authorization URL Parameters | `&resource=https://{MCP_HOST}/mcp` |
| Client ID | From Step 1 |
| Client Secret | From Step 1, or leave blank if the client is public |
| Enable PKCE Support | On |
| Scopes | `mcp:read` `mcp:write` |

|| **Note:** Enter only the authorization base URL — Gemini automatically appends `client_id`, `redirect_uri`, and `scope`. The `resource` parameter tells Xobin which MCP resource to issue tokens for.

* Click **Verify Auth**, sign in to Xobin, and approve access.
* Choose a location, name the data store **Xobin**, and click **Create**.
* Wait until the data store status shows **Active**.
* Open **Actions**, reload custom actions, and enable the required Xobin tools (up to 100).
* Connect the data store to your Gemini Enterprise app. In the chat UI, authorize the connector if it still shows **Authorize**, then enable it.

**Step 3: Gemini Enterprise – Business Edition**
* Sign in at **business.gemini.google**.
* Go to **Settings & Help**.
* Select your team → **Manage Team → Connected Apps**.
* Click **Add MCP Server**.
* Enter the name **Xobin**, a short description of the hiring workflow, and the MCP Server URL [https://mcp.xobin.com/mcp.](https://mcp.xobin.com/mcp)
* Fill in the same Authorization URL, Token URL, Client ID, Client Secret, PKCE, scopes, and `&resource=https://{MCP_HOST}/mcp` parameter as above.
* Click **Add**, then enable the connection so your team can access it.
* In chat, open **Connectors**, authorize Xobin, and keep it toggled on.

**Confirming the Connection:**
* Test the connection with: *"Using Xobin, what job tracks are open, and how many candidates are in each?"*
* Then test a write action you can safely review: *"Draft (do not send) an assessment invitation for a candidate I name."*

**Troubleshooting:**
* **Gemini "Verify Auth" fails.**
Check the MCP URL (`/mcp`), Authorization URL (`/authorize` with no query string), Token URL (`/token`), PKCE settings, scopes (`mcp:read mcp:write`), and the `resource` parameter. Ensure the MCP host is allowed as an egress FQDN in your Google Cloud organization policy.

* **OAuth redirect error ("redirect\_uri is not registered").**
The registered redirect URI must exactly match https://vertexaisearch.cloud.google.com/oauth-redirect.