Phone notifications from Google Antigravity and Gemini agents

Updated October 17, 2026

Add the @nextmsg/mcp server to Google Antigravity and its agents get a notify_human tool: one push to your phone when a task is finished, failed or waiting on you. The same server works in Gemini CLI. It is open source: source on GitHub, package on npm.

First, install the NextMsg app and copy your send key from Settings.

Antigravity (app, IDE and CLI)

Antigravity's app, IDE and CLI share one MCP configuration file, ~/.gemini/config/mcp_config.json. Older versions use ~/.gemini/antigravity/mcp_config.json; you can also open it from Settings → Customizations → MCP Servers. Add:

{
  "mcpServers": {
    "nextmsg": {
      "command": "npx",
      "args": ["-y", "@nextmsg/mcp"],
      "env": { "NEXTMSG_KEY": "nextmsg_live_YOUR_KEY" }
    }
  }
}

If the file already has servers, add "nextmsg" next to them inside mcpServers. Then refresh the list under Installed MCP Servers in the app, or run /mcp in the CLI (agy) to check that nextmsg is listed.

Ask for it

Agents call notify_human when told to. Add this to your rules so long tasks end with a ping:

When you finish a task that took more than a few minutes, or you are blocked
and need my input, call notify_human with a one-line summary.

The key stays in the configuration file and is passed to the server as an environment variable. It is never part of the conversation, so the model can't see or leak it.

Gemini CLI

Gemini CLI has been succeeded by Antigravity CLI, but if you still use it, the same server goes in ~/.gemini/settings.json:

{
  "mcpServers": {
    "nextmsg": {
      "command": "npx",
      "args": ["-y", "@nextmsg/mcp"],
      "env": { "NEXTMSG_KEY": "nextmsg_live_YOUR_KEY" }
    }
  }
}

For a ping after every reply instead, Gemini CLI also supports an AfterAgent hook in the same file (it needs NEXTMSG_KEY set in your shell, and must print JSON):

{
  "hooks": {
    "AfterAgent": [{ "hooks": [{ "type": "command", "name": "nextmsg",
      "command": "curl -s -d 'Gemini CLI finished' \"https://api.nextmsg.app/p/$NEXTMSG_KEY?channel=gemini\" >/dev/null; echo '{}'" }] }]
  }
}

From your own Gemini API code

Building an agent with the Gemini API or the Agent Development Kit? Give it a tool that makes one HTTP request:

import os, requests

def notify_human(message: str, channel: str = "agents") -> str:
    """Send a short push notification to the user's phone."""
    r = requests.post(
        "https://api.nextmsg.app/v1/send",
        headers={"Authorization": f"Bearer {os.environ['NEXTMSG_KEY']}"},
        json={"message": message[:640], "channel": channel},
        timeout=10,
    )
    return "sent" if r.ok else f"failed: {r.status_code} {r.text}"

Pass notify_human to the model as a function tool. The docstring becomes the tool description.

More guides