> 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)

Connect the Gradient Works MCP server to Gemini Web, the Gemini macOS app, 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-9386c2d33a096e884e266cf135e00188310d554b%2Fmcp-gemini-connected-apps.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-4f9d523be22e67f0a1e247bb62fca7d688daf6af%2Fmcp-gemini-add-custom-app.png?alt=media" 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-ccd17741872737ae8cf7c4f630f4d88d1dda430e%2Fmcp-gemini-custom-app-link.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-d6005113106527cb229505a3a7b3cd263334edf6%2Fmcp-gemini-save-custom-app.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-d821e3175cf46f7c55ef1750d0da00e262fe1789%2Fmcp-gw-sign-in.png?alt=media" alt=""><figcaption></figcaption></figure>

6. Select your account and permission settings as needed.

<figure><img src="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-cb538956e4fcb5a80d2f44a82fa5bbe979f1f37c%2Fmcp-gw-account-permissions.png?alt=media" 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-b860256fe1dbd4debe2c2108c6b6e5ea46a35164%2Fsettings-api-keys.png?alt=media" 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-ebeb8e5328ae42dd2b6ade5235be1dcc70fe5a24%2Fapi-key-created.png?alt=media" 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="https://2378295204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUYXbv7c6RsZzQ00WCDTM%2Fuploads%2Fgit-blob-215f1b3ed64642ba6040fdd89e96a13961d522f5%2Fmcp-antigravity-customizations.png?alt=media" 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.
