> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/mcp/connect/gemini.md).

# Gemini

Connect Celigo Platform MCP to Google's Gemini clients. Google ships several products under the Gemini name, and each connects differently:

* [Gemini CLI](#gemini-cli) — Google's open-source terminal agent. Add the server with one command and sign in from the session.
* [Gemini Code Assist](#gemini-code-assist) — the VS Code extension. Its agent mode reads the same settings file as Gemini CLI.
* [Gemini app](#gemini-app) — gemini.google.com and the mobile app. Custom MCP servers work only inside Gemini Spark, and only for eligible personal accounts.

## Gemini CLI

### Prerequisites

* [Gemini CLI](https://geminicli.com/) installed and signed in.
* An integrator.io user (see [Connect a client](/mcp/connect.md)).

### Connect

Add the server with one command. The `-s user` flag writes it to `~/.gemini/settings.json`, so it is available in every folder.

```bash
gemini mcp add -s user --transport http celigo https://api.integrator.io/celigo-mcp
```

Swap the host to target another region. See [Pick your endpoint](/mcp/connect.md#pick-your-endpoint).

Without `-s user`, Gemini CLI writes the server to `.gemini/settings.json` in the current folder, and it is available only there. Either way, the entry looks like this:

```json
{
  "mcpServers": {
    "celigo": {
      "url": "https://api.integrator.io/celigo-mcp",
      "type": "http"
    }
  }
}
```

`"type": "http"` selects the Streamable HTTP transport. Older Gemini CLI releases read a bare `url` as the SSE transport and fail to connect, so update Gemini CLI if the server never comes up.

Then authenticate: start `gemini` and run `/mcp auth celigo`. Your browser opens the Celigo sign-in page. Sign in and pick the account and environment the agent should work in. Gemini CLI stores the session in `~/.gemini/mcp-oauth-tokens.json` and refreshes it automatically.

Confirm it connected:

```bash
gemini mcp list
```

The server shows as `✓ celigo: https://api.integrator.io/celigo-mcp (http) - Connected`.

> Gemini CLI disables MCP servers, including user-level ones, in folders you have not trusted. If `gemini mcp list` shows the server as `Disabled` with an untrusted-folder warning, start `gemini` in that folder and choose **Trust folder** when prompted, or run `/permissions trust` in a session.

### Use an API token instead

For headless use, or if you prefer a token, pass it as a header when adding the server.

> ⚠️ **Project scope saves your token to a checked-in file.** Without `-s user`, the `Authorization` header, including the token, is written to `.gemini/settings.json` in the current folder. Keep that file out of version control so you never commit a live token.

```bash
gemini mcp add -s user --transport http celigo \
  https://api.integrator.io/celigo-mcp \
  --header "Authorization: Bearer <YOUR_API_TOKEN>"
```

### Verify

In a `gemini` session, ask:

> List my Celigo connections.

Gemini CLI asks you to allow the `list_connections` call, then reports the result.

## Gemini Code Assist

The agent mode in [Gemini Code Assist](https://codeassist.google/) for VS Code reads MCP servers from the same `~/.gemini/settings.json` file, so a server added for Gemini CLI is available there too. Google documents the `Authorization` header as the way to authenticate a remote server in Code Assist, so use the API token form above.

Reload VS Code after editing the file. To verify, open the Gemini Code Assist chat, switch to **Agent** mode, and ask it to list your Celigo connections.

## Gemini app

In the Gemini app, custom MCP servers connect only through **Gemini Spark**, Google's agent for multi-step tasks. Google limits custom apps to:

* Accounts with Gemini Spark access (Google AI Pro or Ultra).
* Personal Google Accounts. Work and school accounts (Google Workspace) cannot add custom apps.
* Users 18 or over in the US, with the app in English and **Keep Activity** turned on.

If your Google Account does not meet these limits, connect from Gemini CLI or another client instead (see [Connect a client](/mcp/connect.md)).

### Connect

1. On a computer, go to [gemini.google.com](https://gemini.google.com) and open **Settings & help > Connected Apps**.
2. Under **Custom apps for Spark**, select **Add a custom app**.
3. Enter `https://api.integrator.io/celigo-mcp` and select **Next**.
4. Follow the prompts to the Celigo sign-in page. Sign in and pick the account and environment the agent should work in.

Leave **Advanced features** collapsed in step 3. Celigo supports Dynamic Client Registration, so no client ID or secret is needed. For another region, see [Pick your endpoint](/mcp/connect.md#pick-your-endpoint).

Custom apps are added in the web app only. Once connected, the app is available in Spark tasks in both the web and mobile apps.

> The Gemini app supports OAuth sign-in only — there is no field for a bearer token. To connect with an API token instead, use a client that lets you set request headers (see [Connect a client](/mcp/connect.md)).

### Verify

In a Spark task, ask:

> List my Celigo connections.

Spark calls `list_connections` through the connected app and reports the result.
