> For the complete documentation index, see [llms.txt](https://docs.gradient.works/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gradient.works/kb/mcp/setup_gemini.md).

# Setup: Gemini (Web, macOS, or Antigravity)

## Gemini Web or macOS

The steps below are the same in Gemini Web and the Gemini macOS app. Screenshots show the macOS app.

{% hint style="info" %}
Custom MCP apps in Gemini are added as **Custom Apps for Spark**, and are available in Gemini Spark conversations.
{% endhint %}

1. Go to **Settings > Connected Apps**.

<figure><img src="/files/u0RHFmKJGaJuFAnQqiDf" alt=""><figcaption></figcaption></figure>

2. Scroll to **Custom Apps for Spark** and click **Add custom app**.

<figure><img src="/files/OgohcFYEl2sizdMNHwR2" alt=""><figcaption></figcaption></figure>

3. Enter the Gradient Works MCP server URL and click **Next**.
   * **Add a custom app link:** `https://agents.gradient.works/mcp`

<figure><img src="/files/X8JCGFdi40bkI7xCF26G" alt=""><figcaption></figcaption></figure>

4. Give the app a name (for example, Gradient Works), review the available functions, and click **Connect**.

<figure><img src="/files/1gjqDDFaN7FJfzxBfiDv" alt=""><figcaption></figcaption></figure>

5. When prompted, sign into Gradient Works with your Gradient Works credentials.

<figure><img src="/files/TT7cTlgSSLWu6rEDbMIf" alt=""><figcaption></figcaption></figure>

6. Select your account and permission settings as needed.

<figure><img src="/files/xAUq9BPrB0JrKYl3m7kJ" alt=""><figcaption></figcaption></figure>

7. Click **Connect Now** to return to Gemini.

***

## Antigravity (API Key)

{% hint style="info" %}
Antigravity connects to the Gradient Works MCP server with an API key, so create your key first.
{% endhint %}

The Antigravity app, CLI, and IDE share the same MCP config file, so this setup only needs to be done once. Screenshots show the app.

### Get a Gradient Works API Key

1. In Gradient Works, go to **Settings > Security > API Keys**.

<figure><img src="/files/32URXMGbK9Qc8sGmQukk" alt=""><figcaption></figcaption></figure>

2. Click **Create API Key**, optionally give your key a name and set the access level, then click **Generate Key**.
3. Copy and store your API key securely — it will only be shown once.

<figure><img src="/files/ZeRA5J5qP0qiQRob82j7" alt=""><figcaption></figcaption></figure>

### Add the MCP server

1. Go to **Settings > Customizations**.
2. Under **Installed MCP Servers**, click **Open MCP Config**.

<figure><img src="/files/yaEXE4oQsk1FY5LkRPNp" alt=""><figcaption></figcaption></figure>

3. Antigravity opens `mcp_config.json` in the editor. Add the Gradient Works server, replacing `gw_live_YOUR_KEY_HERE` with the API key you created:

```json
{
  "mcpServers": {
    "gradient-works": {
      "serverUrl": "https://agents.gradient.works/mcp",
      "headers": {
        "Authorization": "Bearer gw_live_YOUR_KEY_HERE"
      }
    }
  }
}
```

4. Save the file and click **Refresh** in the **Installed MCP Servers** section. Gradient Works will appear in the list with its available tools.
