> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini CLI

> Add Spiral to Gemini CLI as a remote MCP server: one command, sign in, no API key.

**1. Add the server**

```bash theme={null}
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
```

Or add it to `~/.gemini/settings.json` yourself:

```json theme={null}
{
  "mcpServers": {
    "spiral": {
      "httpUrl": "https://api.spiral.ai/mcp"
    }
  }
}
```

No header and no client ID or secret: Gemini CLI registers itself with Spiral.

**2. Sign in**

Start `gemini` and run:

```text theme={null}
/mcp auth spiral
```

Your browser opens. Sign in to Spiral, pick the organization and click **Authorize**, then return to the terminal.
No API key.

**3. Check it**

In Gemini CLI, run `/mcp`. From your shell:

```bash theme={null}
gemini mcp list
```

**4. Try a starter prompt**

```text theme={null}
Find a text-to-image tool, tell me what one image costs, then generate a lighthouse at dawn.
```

> [accordion] With an API key instead
>
> Create a key in the [console](https://spiral.ai/start) under **API keys**, keep it in `SPIRAL_API_KEY`, and
> put this in `~/.gemini/settings.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "spiral": {
>       "httpUrl": "https://api.spiral.ai/mcp",
>       "headers": { "Authorization": "Bearer $SPIRAL_API_KEY" }
>     }
>   }
> }
> ```

If something does not work, see [Troubleshooting](/docs/mcp-server.md#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.