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

# Gemini CLI

> Connect Keupera to the Gemini CLI over native Streamable HTTP.

The [Gemini CLI](https://github.com/google-gemini/gemini-cli) has native
**Streamable HTTP** support, so it connects to the Keupera MCP server directly —
no bridge needed. Authorize with OAuth (browser sign-in) or an API key.

## Option A — OAuth (sign in)

<Steps>
  <Step title="Add the server">
    Add Keupera to `~/.gemini/settings.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "keupera": { "httpUrl": "https://mcp.keupera.com/mcp" }
      }
    }
    ```
  </Step>

  <Step title="Authorize">
    Run `gemini`, then `/mcp` to confirm the server and sign in to Keupera in the
    browser when prompted.
  </Step>
</Steps>

## Option B — API key

```json theme={null}
{
  "mcpServers": {
    "keupera": {
      "httpUrl": "https://mcp.keupera.com/mcp",
      "headers": { "Authorization": "Bearer sk_live_your_key" }
    }
  }
}
```

Get your key from **Settings → API Keys** in the
[dashboard](https://app.keupera.com).

## Verify and use

Run `/mcp` to confirm `keupera` is connected, then ask, for example:
*"Show my top keyword opportunities and outline an article for the best one."*

## Troubleshooting

<AccordionGroup>
  <Accordion title="Server not listed after editing settings">
    Ensure `settings.json` is valid JSON and uses `httpUrl` (not `url`). Restart
    the Gemini CLI to reload.
  </Accordion>

  <Accordion title="401 or 'unauthorized' errors">
    For OAuth, re-run `/mcp` and sign in again. For an API key, confirm the
    `sk_live_…` value and that your plan includes API access.
  </Accordion>
</AccordionGroup>
