---
title: "How to Connect Gemini CLI and Antigravity to Chatfuel"
description: "Run gemini mcp add with the Chatfuel MCP link and /mcp auth, or add it to ~/.gemini/config/mcp_config.json in Antigravity and click Authenticate."
canonical_url: https://chatfuel.com/docs/mcp/connect-gemini-cli-and-antigravity-to-chatfuel
markdown_url: https://chatfuel.com/docs/mcp/connect-gemini-cli-and-antigravity-to-chatfuel.md
last_updated: 2026-10-26
lang: en
site: https://chatfuel.com/docs
llms_txt: https://chatfuel.com/docs/llms.txt
---

# How to Connect Gemini CLI and Antigravity to Chatfuel

Run gemini mcp add with the Chatfuel MCP link and /mcp auth, or add it to ~/.gemini/config/mcp_config.json in Antigravity and click Authenticate.

Gemini CLI and Antigravity connect to Chatfuel through the Chatfuel MCP server. Gemini CLI adds it with `gemini mcp add`, Antigravity reads it from `~/.gemini/config/mcp_config.json`, and both then sign in with your Chatfuel account.

## How to connect Gemini CLI [#how-to-connect-gemini-cli]

1. Run this command to add the developer server with the full Chatfuel GraphQL API:

   ```
   gemini mcp add --scope user --transport http chatfuel-api https://mcp.chatfuel.com/panel/api
   ```

2. Start Gemini CLI and run `/mcp auth chatfuel-api` to sign in to Chatfuel.

For the ready-made tools for everyday bot management, add `chatfuel` with `https://mcp.chatfuel.com/panel` the same way and run `/mcp auth chatfuel`. The two servers are separate connections, as explained in [MCP or API MCP: which Chatfuel link to use](https://chatfuel.com/docs/mcp/which-chatfuel-mcp-link-to-use).

## How to connect Antigravity [#how-to-connect-antigravity]

1. Add the server to `~/.gemini/config/mcp_config.json`:

   ```json
   {
     "mcpServers": {
       "chatfuel-api": { "serverUrl": "https://mcp.chatfuel.com/panel/api" }
     }
   }
   ```

2. In Antigravity, open **Agent settings** → **Customizations**, click **Authenticate** next to the server and sign in to Chatfuel.

The same steps work in the Antigravity CLI and IDE.

## How to connect with a CLI token [#how-to-connect-with-a-cli-token]

If the browser sign-in isn't available, pass a Chatfuel CLI token in a header. Gemini CLI:

```
gemini mcp add --scope user --transport http --header "Authorization: Bearer <token>" chatfuel-api https://mcp.chatfuel.com/panel/api
```

Antigravity, in `~/.gemini/config/mcp_config.json`:

```json
{
  "mcpServers": {
    "chatfuel-api": {
      "serverUrl": "https://mcp.chatfuel.com/panel/api",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}
```

Replace `<token>` with your token and keep it secret. Where to create it is in [Chatfuel MCP sign-in, read-only access and CLI token](https://chatfuel.com/docs/mcp/mcp-sign-in-read-only-and-cli-token).

## What can I ask Gemini CLI or Antigravity? [#what-can-i-ask-gemini-cli-or-antigravity]

Examples:

* *"Show me my bots and which ones have AI turned on."*
* *"What appointments do I have this week?"*
* *"Find the GraphQL query that lists my bot's chats and run it."*

More requests are in [Chatfuel MCP example prompts](https://chatfuel.com/docs/mcp/chatfuel-mcp-example-prompts).

## Common issues [#common-issues]

### Gemini CLI says the server is disconnected or unauthenticated [#gemini-cli-says-the-server-is-disconnected-or-unauthenticated]

Run `/mcp auth chatfuel-api` and sign in to Chatfuel again. The sign-in may have expired or been revoked in **Connected apps** in the Chatfuel dashboard.

### Antigravity doesn't show the Chatfuel server [#antigravity-doesnt-show-the-chatfuel-server]

Check that `~/.gemini/config/mcp_config.json` is valid JSON and uses the `serverUrl` key, then reopen **Agent settings** → **Customizations**.
