> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/antigravity.md).

# Antigravity

Add fastn to Google Antigravity through its MCP config file, sign in, and build integrations from the Antigravity agent.

Google Antigravity has no install button for custom MCP servers: its **Add MCP** button only opens Google's MCP store. Add fastn to Antigravity's MCP config file instead, then sign in from **Customizations**. The Antigravity app, the Antigravity IDE and the Antigravity CLI all read the same file.

## Add fastn

{% stepper %}
{% step %}

#### Add fastn to the config file

Open `~/.gemini/config/mcp_config.json` in any editor (create it if it does not exist) and add fastn under `mcpServers`. Keep any servers already in the file.

```json
{
  "mcpServers": {
    "fastn": {
      "serverUrl": "https://mcp.fastn.dev/fastn-workspace"
    }
  }
}
```

The key must be `serverUrl`. Antigravity does not read `url` or `httpUrl`, and a server written with them silently loads no tools.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-eb1db982a631a42e4e5448c90e3bf611a980dcfb%2Fmcp-fastn-tab-antigravity.webp?alt=media" alt="fastn&#x27;s MCP server page with the Antigravity tile selected, showing a note that Antigravity&#x27;s remote field is serverUrl and a ~/.gemini/config/mcp_config.json snippet with a fastn serverUrl entry"><figcaption><p>The Antigravity tile under <strong>Connect AI tools</strong> in fastn has the same snippet with a Copy button.</p></figcaption></figure>

In the Antigravity IDE you can open the same file from the agent panel: the **…** menu at the top, then **MCP Servers** → **Manage MCP Servers** → **View raw config**. For one workspace only, use `.agents/mcp_config.json` in that folder.
{% endstep %}

{% step %}

#### Load it and click Authenticate

In Antigravity, open **Customizations** in the sidebar (in the IDE: **Antigravity User Settings** → **Customizations**). Under **MCP Servers**, click refresh if fastn is not listed yet.

fastn shows a red dot and an *Unauthorized* error until you sign in. Click **Authenticate**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-a23926a72bf65b441eb4e18e55f01832e788ecad%2Fmcp-antigravity-authenticate.webp?alt=media" alt="Antigravity&#x27;s MCP Servers section listing fastn with a red status dot, an Authenticate button, the error calling initialize: Unauthorized, and an Enter authorization code field with Submit and Cancel"><figcaption><p>The <em>Unauthorized</em> error is expected before you sign in.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Pick the workspace

fastn opens in your browser. Sign in if asked. If you belong to more than one fastn org, pick the workspace Antigravity works in and click **Connect**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-76d800525cea1188433fc466a0f2b286ed2b5fd3%2Fmcp-antigravity-choose-workspace.webp?alt=media" alt="fastn&#x27;s page titled Which workspace should Google Antigravity (antigravity.google) use?, with The org selected in fastn chosen, a list of orgs and a Connect button"><figcaption><p><strong>The org selected in fastn</strong> follows whichever org you have open in the fastn dashboard; picking a named org pins Antigravity to it.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Paste the code back into Antigravity

Google shows *Paste this code into your application to complete authentication*. Click **Copy to Clipboard**, go back to Antigravity, paste the code into **Enter authorization code…** and click **Submit**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-98fd58d60b246181810b43245a97a6aeb6f7c660%2Fmcp-antigravity-code.webp?alt=media" alt="Google Antigravity&#x27;s callback page reading Paste this code into your application to complete authentication, with a code box and a Copy to Clipboard button"><figcaption><p>The code works once and expires quickly. Paste it straight away.</p></figcaption></figure>

fastn's dot turns green and the row shows its tools.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-993db9722704fc605a191e5e1bec6776d023d625%2Fmcp-antigravity-connected.webp?alt=media" alt="Antigravity&#x27;s MCP Servers section listing fastn with a green status dot, a Sign out button and 178 tools enabled"><figcaption><p>fastn is connected. <strong>Sign out</strong> on this row disconnects it.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Use it

Start a **New Conversation** and ask for the outcome in one sentence. To check the connection first, ask *Who am I in fastn?*

The first time the agent calls a fastn tool, Antigravity asks **Allow using this MCP tool?** Pick **Yes, allow this time**, or one of the always-allow options, and click **Submit**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-7d65786b93ed6e889d6227310b862f844c9cb706%2Fmcp-antigravity-tool-approval.webp?alt=media" alt="Antigravity asking Allow using this MCP tool? for fastn/fastnPlatform__whoami, with options Yes allow this time, Yes and always allow in this conversation, Yes and always allow when not in a project, Yes and always allow, and No, plus Skip and Submit buttons"><figcaption><p>The prompt names the server and the tool.</p></figcaption></figure>

From here Antigravity works through the same steps as every agent: see [Building from your AI agent](https://docs.fastn.ai/build/building-from-your-ai-agent.md).

## Antigravity CLI

The CLI reads the same `~/.gemini/config/mcp_config.json`. Run `agy`, then type `/mcp` to check fastn is listed.

## Troubleshooting

* **fastn never appears in Customizations.** Check the file uses `serverUrl` and is valid JSON, then click refresh under **MCP Servers**.
* **The code is rejected.** Codes are single use. Click **Authenticate** again and paste the new code.
* **Antigravity works on the wrong org.** Click **Sign out** on the fastn row, then **Authenticate** and pick the workspace again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/antigravity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
