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

# Connect Gemini CLI to ChatSyncs

> Step-by-step: add ChatSyncs to Google's Gemini CLI with gemini mcp add --scope user --transport http and your API key in an Authorization header, or the equivalent mcpServers entry with httpUrl in ~/.gemini/settings.json, check it with /mcp, and remove it with gemini mcp remove. Also covers browser sign-in with /mcp auth chatsyncs as the alternative that keeps the key out of settings.json. Use when a customer asks how to connect Gemini CLI to ChatSyncs, or gets a Missing issuer parameter error.

Use ChatSyncs from Gemini CLI, Google's AI agent for the terminal.

## Before you start

* **Gemini CLI installed and signed in.** Run `gemini --version`. If it isn't found, install it
  from [geminicli.com](https://geminicli.com).
* **A terminal.** On a Mac, open the **Terminal** app (Applications → Utilities). On Windows,
  open **PowerShell** from the Start menu. In paths below, `~` means your home folder.
* **Your ChatSyncs API key**, from the
  [API Developer Console](https://platform.chatsyncs.com/api/developer/console).
  [How to find it](/mcp/api-key).

<Note>
  This page connects Gemini CLI with your **API key directly**: one command and you're done.
  If you'd rather not store the key in a file, ChatSyncs also supports Gemini CLI's browser
  sign-in. See [Can I sign in through the browser instead?](#frequently-asked).
</Note>

## Connect

<Steps>
  <Step title="Open a terminal">
    Mac: the **Terminal** app. Windows: **PowerShell**. Check Gemini CLI is there by running
    `gemini --version`: it should print a version number.
  </Step>

  <Step title="Add ChatSyncs with your key">
    In a terminal, run this command, with `YOUR_CHATSYNCS_API_KEY` replaced by your key (keep the
    word `Bearer` and the space after it):

    ```bash theme={null}
    gemini mcp add --scope user --transport http --header "Authorization: Bearer YOUR_CHATSYNCS_API_KEY" chatsyncs https://mcp.chatsyncs.com/mcp
    ```

    `--scope user` makes ChatSyncs available in every folder, not just the current one.
  </Step>

  <Step title="Check it's listed">
    Run `gemini`, then type `/mcp` and press Enter. **chatsyncs** is listed as connected, with
    its tools.
  </Step>
</Steps>

### Prefer editing the file?

The command above edits `~/.gemini/settings.json` for you, which is the easiest way. If you'd
rather edit the file yourself, the ChatSyncs part looks like this. If the file already has other
settings, put `"mcpServers"` next to them inside the outer `{ }`, separated by a comma:

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

## Check it worked

In Gemini CLI, ask:

> **"List my WhatsApp templates."**

Gemini asks you to confirm the ChatSyncs tool call, then lists your templates.

## Disconnect

```bash theme={null}
gemini mcp remove --scope user chatsyncs
```

Your key was stored in `~/.gemini/settings.json`; removing the server deletes it from there.
If the key may have been seen by anyone else, [regenerate it](/mcp/api-key#revoke-access-regenerate-the-key).

## Frequently asked

<AccordionGroup>
  <Accordion title="Is it safe to put my key in that file?">
    It's stored in plain text in `settings.json` (in the `.gemini` folder in your home folder),
    and the command you typed may be kept in your terminal's list of past commands. That's fine on your own computer. Don't
    share or sync the file, and regenerate the key if you stop using Gemini CLI or the computer
    is shared.
  </Accordion>

  <Accordion title="Can I make Gemini skip the confirmations?">
    Gemini CLI has a `"trust": true` setting that skips every confirmation for a server.
    **Don't use it with ChatSyncs:** it would let Gemini send WhatsApp messages without asking.
  </Accordion>

  <Accordion title="Can I sign in through the browser instead?">
    Yes. Add ChatSyncs **without** the header:

    ```bash theme={null}
    gemini mcp add --scope user --transport http chatsyncs https://mcp.chatsyncs.com/mcp
    ```

    Then run `gemini`, type `/mcp auth chatsyncs` and press Enter. The ChatSyncs page opens in
    your browser: paste your API key and click **Authorize**. Your key is then never written
    into `settings.json`. If the sign-in ever fails, use the header method above instead.
  </Accordion>
</AccordionGroup>

## Gotchas

<Warning>
  * **"Missing issuer parameter in response."** ChatSyncs sends this detail since 5 October
    2026\. Run `/mcp auth chatsyncs` again. If it still appears, remove ChatSyncs and add it back
    with the `--header` command above.
  * **Added it but it's missing in another folder.** You left out `--scope user`, so it was
    saved only for the folder you were in. Remove it with `gemini mcp remove chatsyncs` and add
    it again with `--scope user`.
  * **Every action says the key is missing or invalid.** Check the header reads exactly
    `Authorization: Bearer ` followed by your key, with nothing else and no extra spaces.
</Warning>


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