# Connect Gemini CLI

> Add PromptGale to Gemini CLI as a remote MCP server with gemini mcp add, sign in with /mcp auth, and ask AI answer engines from the terminal.

Add PromptGale to Gemini CLI as a remote MCP server at `https://promptgale.com/mcp`. It signs in with OAuth in the browser, so there is no key to paste.

## How to connect Gemini CLI to PromptGale

1. Add the server from a terminal.
2. In Gemini CLI, run /mcp auth promptgale and approve in the browser.
3. Gemini CLI loads MCP servers only in trusted folders: trust the folder when it asks.

**Terminal**

```bash
gemini mcp add --transport http --scope user promptgale https://promptgale.com/mcp
```

**In Gemini CLI**

```bash
/mcp auth promptgale
```

**~/.gemini/settings.json (same thing by hand)**

```json
{
  "mcpServers": {
    "promptgale": {
      "httpUrl": "https://promptgale.com/mcp"
    }
  }
}
```

## Where the config lives

- `--scope user` saves the server in `~/.gemini/settings.json` for every folder. Without it, Gemini CLI uses the project scope.
- For a Streamable HTTP server the key is `httpUrl` (`url` is for SSE servers).

## How sign-in works

- `/mcp auth promptgale` opens the browser; Gemini CLI registers itself with PromptGale and stores the tokens in `~/.gemini/mcp-oauth-tokens.json`.
- Run `/mcp auth promptgale` again when the tokens expire. `/mcp auth` alone lists servers that need sign-in.

## Check that it works

Ask Gemini CLI: "Use PromptGale to check who I am connected as, then list the engines." It should call `whoami` and `get_capabilities`. Neither costs credits.

## Try it

Then ask: "Use PromptGale to ask ChatGPT in the US: what is the best CRM for a small agency? List the sources it cited and tell me whether Acme is mentioned." That runs one task and costs ChatGPT's price in credits.

## What Gemini CLI can do with PromptGale

Once connected, Gemini CLI can ask ChatGPT, Gemini, Perplexity, Bing Copilot Search, Meta AI, Google AI Overview, and Google AI Mode a prompt from the country you pick, and read the answer, its cited sources and where each brand ranks. For example:

- "Ask ChatGPT and Perplexity in the US for the best CRM for a small agency, and tell me which brands they name first."
- "Check whether Gemini mentions Acme when asked for project management tools in Germany."
- "Run these 20 prompts on every engine as a batch and list the sites they cite most."

Running a prompt costs that engine's price in credits; reading results, credits and countries is free. The tools are listed in [Connect an agent](https://promptgale.com/docs/mcp.md).

## Troubleshooting

- `/mcp` shows each server and its status. Start Gemini CLI with `--debug` for more detail.
- Trust the folder when Gemini CLI asks (`gemini trust`); servers are not loaded in untrusted folders.
- Google notes that Gemini CLI was replaced by Antigravity CLI for unpaid tier and Google One users on June 18, 2026.

Checked against [Gemini CLI docs: MCP servers](https://geminicli.com/docs/tools/mcp-server/) on 2026-11-27. Menu names in Gemini CLI can change; the vendor page is the reference.

## Next

- Every tool and what it costs: [Connect an agent](https://promptgale.com/docs/mcp.md).
- What a result contains: [Results](https://promptgale.com/docs/results.md).
- The engines and their prices: [Engines](https://promptgale.com/docs/engines.md).

---

Docs index: https://promptgale.com/llms.txt · Full reference: https://promptgale.com/llms-full.txt · OpenAPI: https://promptgale.com/v1/openapi.json
