> For the complete documentation index, see [llms.txt](https://docs.datasentinel.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasentinel.io/manual/ai-connector/connect-a-cli-assistant/configure-antigravity-cli.md).

# Configure Google Antigravity CLI

Connect the Google Antigravity CLI and desktop app to your Datasentinel MCP server, sign in, and install the Datasentinel Skill.

This page shows how to wire the [Google Antigravity CLI](https://antigravity.google/docs/cli/overview) to your Datasentinel platform on a Linux host: add the **MCP server**, **sign in** once, install the **Skill** that tells the assistant how to use it, and check that everything is connected.

Antigravity CLI is Google's Go-based terminal coding agent (the `agy` command). It replaces the retired Gemini CLI and reuses the same `~/.gemini/` configuration tree. The same pattern applies to other MCP-and-Skill-capable assistants.

Google also ships **Antigravity 2.0**, a desktop app for Windows, macOS and Linux. It shares the MCP configuration with the CLI. See [Use the Antigravity desktop app](#use-the-antigravity-desktop-app) at the end of this page.

{% hint style="info" %}
The steps below follow Google's documentation, last checked on 6 October 2026. Google changes Antigravity often.
{% endhint %}

## Before you start

* The Antigravity CLI is installed and you can run `agy` from a terminal. If it is not yet installed, see the installation guide linked below.
* Your Datasentinel MCP server is reachable over HTTPS at `https://<public-host>/mcp`. See [MCP Server Setup](/manual/ai-connector/server-setup/mcp-server-setup.md) if it is not yet running.

## Install the Antigravity CLI

The Antigravity CLI is the `agy` command. For installation, authentication, and system requirements, follow the [Antigravity CLI installation guide](https://antigravity.google/docs/cli/install). On the first run, `agy` opens a Google Sign-In flow and caches the credentials, so you only sign in once. Once you can run `agy` from a terminal, return here to connect it to Datasentinel.

{% hint style="warning" %}
**Name MCP servers with a `datasentinel-` prefix.**

Every Datasentinel MCP server you register must be named starting with `datasentinel-`, for example `datasentinel-production` or `datasentinel-staging`. The Skill discovers Datasentinel servers by this prefix, so a server named otherwise will not be picked up. Use a distinct suffix per platform when you operate more than one (`datasentinel-prod`, `datasentinel-eu`, and so on).
{% endhint %}

## Set it up

{% stepper %}
{% step %}

#### Add the Datasentinel MCP server

For the full reference, see the [Antigravity MCP documentation](https://antigravity.google/docs/mcp).

Register the server from the terminal with its HTTPS URL. Antigravity detects the `http` type from the URL, so no transport flag is needed:

```bash
agy mcp add datasentinel-production https://<public-host>/mcp
```

The command answers `Added MCP server "datasentinel-production" (http)` and writes the server to the user-level file `~/.gemini/config/mcp_config.json`, which the CLI and the IDE share, so the server is available in every directory. `agy mcp list` shows the registered servers with their status; `agy mcp remove`, `agy mcp enable` and `agy mcp disable` manage them. Flags of `agy mcp add` go before the server name; `agy mcp add --help` lists them.

The same server written by hand, which is also the form to use in `.agents/mcp_config.json` inside a workspace to enable it for that project only:

```json
{
  "mcpServers": {
    "datasentinel-production": {
      "serverUrl": "https://<public-host>/mcp"
    }
  }
}
```

`serverUrl` selects the streamable-HTTP transport; it replaces the old Gemini CLI `httpUrl` field.

{% hint style="info" %}
**Sign in on first use.** The Datasentinel MCP server is protected by OAuth 2.1. Nothing else goes in the configuration: no token, no header, no `oauth` block (that block is only for servers without dynamic client registration, and Datasentinel supports it). The sign-in is the next step. See [How authentication works](/manual/ai-connector/server-setup/how-authentication-works.md).
{% endhint %}

**Self-signed or invalid certificate**

If your platform serves the `/mcp` endpoint with a self-signed or otherwise invalid TLS certificate, Antigravity rejects the connection by default. Using a valid TLS certificate is highly recommended. Antigravity validates against the host's system trust store, so provision a certificate from a public authority, or install your internal CA in the system trust store, to keep validation on. The sign-in below also opens the login page in a browser, so that browser must trust the certificate too.
{% endstep %}

{% step %}

#### Sign in to the platform

**With a browser**

Antigravity signs in to remote MCP servers with OAuth and registers itself with the server automatically (dynamic client registration), so there is nothing to configure. Inside an interactive `agy` session, open the MCP manager:

```
/mcp
```

Select the Datasentinel server (up and down arrows), cycle to the **Authenticate** action (left and right arrows) and confirm. Antigravity opens the Datasentinel login page in your browser: sign in with your **platform login and password**, the same ones as the Datasentinel web interface. The page names the assistant that is asking. Antigravity does not listen on a local port: after the sign-in, the browser lands on a Google-hosted page at `antigravity.google/oauth-callback` that displays an **authorization code**. Copy it, paste it into the CLI when asked, and the server shows as connected.

You sign in once. Antigravity stores the session in `~/.gemini/antigravity/mcp_oauth_tokens.json` and renews it by itself. It asks again only after ten days without using the server, or when an administrator ends the session. Your password goes to the login page only; Antigravity never sees it and never asks for a token.

**Without a browser**

On a server without a browser (an SSH session, a build machine), the same flow works without a tunnel, because the code comes back through the clipboard rather than through a local port. Start the sign-in from `/mcp` as above, open the authorization link on any machine with a browser, sign in, copy the code shown on the callback page and paste it into the CLI on the server. Print mode (`agy -p`) reads the code from the controlling terminal too, but a fully headless run without a terminal fails with an explicit message. See [How authentication works](/manual/ai-connector/server-setup/how-authentication-works.md#sign-in-from-a-server-without-a-browser) for the general procedure.

**For a script or a scheduled run**

Where nobody can sign in, register the server with a user token as an authorization header instead. The token is the platform's 24-hour [user token](https://app.gitbook.com/o/DaDQkGCM7r2TghFSBFLQ/s/yE16Xb3IemPxJWydtPOj/implementation/platform-usage/api-reference/access-token). Pass it with the `--header` flag, placed before the server name:

```bash
agy mcp add --header "Authorization: Bearer ${DS_TOKEN}" datasentinel-production https://<public-host>/mcp
```

Antigravity stores the header value as written, so `mcp_config.json` then holds the token: keep the file readable by you only (`chmod 600`) and let the job run the command again when the token is refreshed. The resulting entry:

```json
{
  "mcpServers": {
    "datasentinel-production": {
      "serverUrl": "https://<public-host>/mcp",
      "headers": {
        "Authorization": "Bearer <user token>"
      }
    }
  }
}
```

A server registered this way never opens the login page; when the token expires, the calls fail until a fresh one is written. See [Refresh the user token automatically](/manual/ai-connector/developers/refresh-user-token.md) to keep it current.
{% endstep %}

{% step %}

#### Install the Datasentinel Skill

The Datasentinel Skill is made of several files (a `SKILL.md` entrypoint plus supporting files) and ships as a single archive, `datasentinel-skill.zip`. Download it from <https://app.datasentinel.io/ds-api/download/datasentinel-skill.zip>.

Skills in Antigravity are file-based: there is no install command. The `/skills` panel inside a session lists the three locations the CLI reads, shown here as printed by version 1.2.6:

```
Create new skills
  Workspace: <workspace>/.agents/skills/{skill_name}/SKILL.md
  Global:    ~/.gemini/antigravity-cli/skills/{skill_name}/SKILL.md
  Shared:    ~/.gemini/skills/{skill_name}/SKILL.md
```

Create the directory of your choice if it does not exist yet, then unzip the archive into it so it produces a `datasentinel/` folder, and Antigravity discovers it on the next session. For how Antigravity discovers Skills, see the [Antigravity Skills documentation](https://antigravity.google/docs/skills).

{% tabs %}
{% tab title="Shared" %}

```bash
mkdir -p ~/.gemini/skills/
unzip datasentinel-skill.zip -d ~/.gemini/skills/
```

{% endtab %}

{% tab title="Global (CLI only)" %}

```bash
mkdir -p ~/.gemini/antigravity-cli/skills/
unzip datasentinel-skill.zip -d ~/.gemini/antigravity-cli/skills/
```

{% endtab %}

{% tab title="Workspace (one project)" %}

```bash
mkdir -p .agents/skills/
unzip datasentinel-skill.zip -d .agents/skills/
```

{% endtab %}
{% endtabs %}

You should end up with `~/.gemini/skills/datasentinel/SKILL.md` (or the equivalent under the other two locations) alongside the Skill's supporting files. Each Skill lives in its own directory whose `SKILL.md` is the entrypoint. Its frontmatter carries the `description` the assistant uses to decide when to apply the Skill:

```markdown
---
name: datasentinel
description: How to query Datasentinel metrics through the datasentinel-* MCP servers.
---

<instructions for using the Datasentinel MCP tools>
```

{% hint style="info" %}
**`.agents/skills` is the workspace location only.** It is the vendor-neutral directory other agents share, so a project-local `SKILL.md` folder can serve them too. For personal Skills Antigravity reads its own `~/.gemini/...` paths above and does **not** scan `~/.agents/skills` (that global alias is Gemini CLI's, not Antigravity's). Run `/skills` to see the paths your version reads.
{% endhint %}
{% endstep %}

{% step %}

#### Check your configuration

Inside an interactive `agy` session, use the `/mcp` command to list the configured servers and their connection status:

```
/mcp
```

A healthy server reports connected with its tools discovered. A server you have not signed in to yet is shown as needing authentication: go back to the sign-in step. If a server shows an error, check the `serverUrl` in `mcp_config.json` and that the server is up. If it reports `Unauthorized` right after a successful sign-in, upgrade the CLI: an early 1.0.0 build sent requests without the token ([issue #25](https://github.com/google-antigravity/antigravity-cli/issues/25)).

**Approve the Datasentinel tools**

MCP tools run in **Ask** mode by default: the first time the assistant calls a Datasentinel tool, Antigravity shows an approval card (`Allow calling this tool?`). To stop the prompts for good, add a permission rule for the whole server. Rules use the form `mcp(server/tool)`; `mcp(server/*)` covers every tool of a server. Add the rule from the `/permissions` panel inside a session, or write it in `~/.gemini/antigravity-cli/settings.json`:

```json
{
  "permissions": {
    "allow": ["mcp(datasentinel-production/*)"]
  }
}
```

The Datasentinel tools only read monitoring data, so allowing the whole server is safe. Antigravity also has permission modes cycled with `Shift+Tab`; the `always-proceed` mode, and the `--dangerously-skip-permissions` launch flag, approve every tool call of every kind, including shell commands and file edits, so use them with care. The rule syntax is in the [Antigravity permissions reference](https://antigravity.google/docs/permissions?tab=cli).
{% endstep %}
{% endstepper %}

Once the server reports connected and the Skill is in place, run through the checks below to confirm the end-to-end flow.

## How the Skill loads

The Datasentinel Skill loads on demand. Antigravity reads every Skill's name and `description` up front, and applies the full instructions automatically when your prompt relates to Datasentinel: asking about PostgreSQL performance, instances, sessions, or the platform itself is enough. One Skill serves every platform, because it discovers all the `datasentinel-*` MCP servers you registered, so adding a second platform needs no Skill change.

If the assistant answers generically instead (no Datasentinel tool calls in the response), load the Skill manually:

* Skills convert into slash commands in the TUI, so type `/datasentinel` followed by your request, for example `/datasentinel status`.
* Or name it in the prompt: `Use the datasentinel skill to check the platform status.`

If `/datasentinel` does not autocomplete at all, the Skill is not discovered: re-check the unzip location from the setup step and start a new session. See the [Antigravity CLI plugins and Skills](https://antigravity.google/docs/cli/plugins) reference for the details.

## Test the MCP server and Skill

Run these checks inside an interactive `agy` session.

You exercise the Skill by asking in plain language and letting it drive the MCP tools (see [How the Skill loads](#how-the-skill-loads) above). The Datasentinel Skill recognises four built-in checks. Run them in order:

| Ask Antigravity for…     | What it does                                                                          |
| ------------------------ | ------------------------------------------------------------------------------------- |
| `datasentinel help`      | Displays the Skill's help, listing the available commands.                            |
| `datasentinel platforms` | Lists every MCP server (platform) the Skill discovered by its `datasentinel-` prefix. |
| `datasentinel status`    | Checks the platform status, confirming the MCP server answers.                        |
| `datasentinel whoami`    | Shows who you are signed in as, your privilege and the session expiry.                |

These four are the setup checks. The full command list, with what each one needs, is in the [Skill commands reference](/manual/ai-connector/use-the-assistant/skill-commands.md).

Start with `datasentinel help` to confirm the Skill responds. Then run `datasentinel platforms` to verify your server is discovered: each `datasentinel-*` MCP server you registered should appear in the list. Then run `datasentinel status` to confirm the platform is reachable and the MCP tools return live data. Finally, `datasentinel whoami` confirms the session belongs to your platform user, with the privilege you expect.

{% hint style="success" %}
If `datasentinel status` reports a healthy platform, the MCP server and the Skill are wired together correctly. You can now ask the assistant questions about your instances in plain language.
{% endhint %}

{% hint style="info" %}
**Server not discovered? Ask the assistant to find the root cause.**

If `datasentinel platforms` lists nothing, or your server is missing from it, ask Antigravity to debug the setup rather than hunting by hand. It can run `/mcp`, read the `mcp_config.json` that applies to the session, and probe the endpoint itself, so it usually pinpoints the cause in one pass.

Ask it something like:

```
The datasentinel-production MCP server is not discovered. Investigate and find the root cause: check my MCP configuration, the connection status of the server, and whether the /mcp endpoint answers.
```

Typical causes it surfaces: a server name that misses the `datasentinel-` prefix, a typo in the `serverUrl`, an `mcp_config.json` in a location this session does not read, a server you have not signed in to, an untrusted TLS certificate, or a platform that is down.
{% endhint %}

## Use the Antigravity desktop app

**Antigravity 2.0** is Google's desktop agent app, for Windows, macOS and Linux. Download it from [antigravity.google/download](https://antigravity.google/download). It works with a private Datasentinel platform: the MCP calls come from your machine, like the CLI's.

{% hint style="info" %}
Antigravity 2.0 is not the **Gemini** desktop app. Gemini for desktop cannot add a custom MCP server: Gemini's custom apps are added in the Gemini web app, and only for personal Google accounts in the US. See [Configure the Google Gemini desktop app](/manual/ai-connector/connect-a-desktop-app/configure-gemini-desktop-app.md).
{% endhint %}

{% stepper %}
{% step %}

#### Add the Datasentinel MCP server

The desktop app reads the same `mcp_config.json` as the CLI: `~/.gemini/config/mcp_config.json`, or `%USERPROFILE%\.gemini\config\mcp_config.json` on Windows. A server added with `agy mcp add` is already there.

Otherwise, add the `datasentinel-production` entry shown in [Add the Datasentinel MCP server](#add-the-datasentinel-mcp-server) to that file. In the app, **Settings → Customizations → Installed MCP Servers** lists the servers; **Add MCP** opens the MCP Store, which offers catalog servers only.
{% endstep %}

{% step %}

#### Sign in

Antigravity handles OAuth itself for servers that support dynamic client registration, which the Datasentinel server does. Sign in on the Datasentinel login page when it opens, with your platform login and password. The session is stored in `~/.gemini/antigravity/mcp_oauth_tokens.json`.
{% endstep %}

{% step %}

#### Install the Datasentinel Skill

The desktop app reads its global Skills from `~/.gemini/config/skills/`, not from the CLI's locations. Unzip the archive there:

```bash
mkdir -p ~/.gemini/config/skills/
unzip datasentinel-skill.zip -d ~/.gemini/config/skills/
```

On Windows, extract `datasentinel-skill.zip` into `%USERPROFILE%\.gemini\config\skills\`, so that you get `%USERPROFILE%\.gemini\config\skills\datasentinel\SKILL.md`.

A Skill in a workspace's `.agents/skills/` folder serves both the desktop app and the CLI. See the [Antigravity Skills documentation](https://antigravity.google/docs/skills).
{% endstep %}

{% step %}

#### Test

Start a new conversation and run the checks of [Test the MCP server and Skill](#test-the-mcp-server-and-skill), starting with `datasentinel status`. You can also call the Skill with `/datasentinel`.
{% endstep %}
{% endstepper %}


---

# 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.datasentinel.io/manual/ai-connector/connect-a-cli-assistant/configure-antigravity-cli.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.
