Antigravity Monitor MCP
by super-juejue
README.md
<div align="center">
<img src="./assets/logo.png" alt="Antigravity Monitor MCP" width="120" height="120" />
<h1>Antigravity Monitor MCP</h1>
<p>
<strong>Local-first MCP App for real-time Antigravity Desktop telemetry.</strong><br />
Track tokens, cache efficiency, models, subagent rollups, tool calls, and storage—100% on-device.
</p>
<p>
<img src="https://img.shields.io/badge/MCP_Apps-SEP--1865-0EA5E9?style=flat-square" alt="MCP Apps SEP-1865" />
<img src="https://img.shields.io/badge/Node.js-22.5%2B-10B981?style=flat-square&logo=node.js&logoColor=white" alt="Node.js 22.5+" />
<img src="https://img.shields.io/badge/TypeScript-5.x-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" />
<img src="https://img.shields.io/badge/Privacy-100%25_Local-6366F1?style=flat-square" alt="100% Local" />
<a href="./LICENSE"><img src="https://img.shields.io/badge/License-MIT-64748B?style=flat-square" alt="MIT License" /></a>
</p>
<p>
<strong>English</strong> ·
<a href="./docs/README.zh-CN.md">简体中文</a> ·
<a href="./docs/README.de.md">Deutsch</a> ·
<a href="./docs/README.fr.md">Français</a> ·
<a href="./docs/README.ja.md">日本語</a> ·
<a href="./docs/README.ko.md">한국어</a>
</p>
<p>
<a href="#quick-start">Quick Start</a> ·
<a href="#preview">Preview</a> ·
<a href="#features">Features</a> ·
<a href="#usage">Usage</a> ·
<a href="#privacy">Privacy</a> ·
<a href="#reference">Reference</a>
</p>
<br />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./assets/screenshots/overview-dark.png" />
<source media="(prefers-color-scheme: light)" srcset="./assets/screenshots/overview-light.png" />
<img src="./assets/screenshots/overview-dark.png" alt="Antigravity Monitor MCP Overview Dashboard" width="100%" />
</picture>
</div>
---
## Preview
<table>
<tr>
<td width="64%" align="center" valign="top">
<img src="./assets/screenshots/overview-light.png" alt="Light Mode Overview" width="100%" /><br />
<sub><strong>Adaptive Light Mode</strong> — auto-syncs with Antigravity host theme</sub>
<br /><br />
<img src="./assets/screenshots/tools-storage-dark.png" alt="Tools and Local Storage" width="100%" /><br />
<sub><strong>Tools & Local Storage</strong> — tool call frequency & disk footprint</sub>
</td>
<td width="36%" align="center" valign="top">
<img src="./assets/screenshots/side-pane-dark.png" alt="Auxiliary Side Pane View" width="100%" /><br />
<sub><strong>Side Pane (<code>aux_pane</code>)</strong> — compact 2×2 KPIs & Attach Snapshot</sub>
</td>
</tr>
</table>
---
## Features
| | Capability | Details |
| :-: | :--- | :--- |
| **📊** | **Token & Cache Telemetry** | Uncached input, cache read, output tokens, and live **Cache Hit Rate %** across `24h`, `7d`, `30d`, and `all`. |
| **🧠** | **Models & Cost Estimates** | Per-model turn counts, token shares, cache ratios, and optional user-configurable USD rates. |
| **🌿** | **Sessions & Subagent Rollups** | Rolls child subagents into parent conversations with expandable trees and a turn-by-turn **Session Inspector**. |
| **🧰** | **Tools & Disk Footprint** | Tool invocation rankings (`read_file`, `edit_file`, `run_command`, …) and `~/.gemini/antigravity` storage breakdown. |
| **🎨** | **Native Antigravity UI** | Opens in **Left Sidebar** (`global`) or **Side Pane** (`aux_pane`), live-syncing Light/Dark host themes. |
| **⚡** | **Zero Native Addons** | Built-in read-only `node:sqlite` + incremental `(mtime, size)` transcript cache for sub-30 ms refreshes. |
---
## Quick Start
**Requirements:** Antigravity Desktop · Node.js `>= 22.5` · macOS / Linux / WSL
### 1. One-Prompt Install *(Recommended)*
Copy and paste this prompt into **Antigravity Desktop**:
```text
Install the Antigravity Monitor MCP plugin from https://github.com/super-juejue/antigravity_monitor_mcp.git: clone it into ~/.gemini/config/plugins/antigravity-monitor, verify Node.js >= 22.5, run `npm install && npm run build`, and refresh the `antigravity-monitor_monitor` MCP server so I can open Monitor from the sidebar.
```
### 2. Manual Install
```bash
mkdir -p ~/.gemini/config/plugins
git clone https://github.com/super-juejue/antigravity_monitor_mcp.git ~/.gemini/config/plugins/antigravity-monitor
cd ~/.gemini/config/plugins/antigravity-monitor
npm install && npm run build
```
Antigravity Desktop auto-discovers plugins under `~/.gemini/config/plugins/`—no config file edits needed.
<details>
<summary><strong>Developer install (clone anywhere + symlink / copy)</strong></summary>
```bash
git clone https://github.com/super-juejue/antigravity_monitor_mcp.git
cd antigravity_monitor_mcp
npm install && npm run build
npm run install:plugin # Symlink into ~/.gemini/config/plugins/antigravity-monitor
# or
npm run install:plugin:copy # Copy standalone bundle
```
</details>
---
## Usage
Open **Monitor** from any of three native entrypoints:
1. **Left Sidebar** — Click **Monitor** for the full-page view.
2. **Side Pane** — Click **`+`** in the auxiliary pane and select **Monitor** *(supports **Attach Snapshot** to chat)*.
3. **Chat** — Ask naturally: *"Open Monitor for the last 7 days"* or *"What's my cache hit rate today?"*
> **Not showing up right away?** Open **Settings → MCP Servers**, refresh `antigravity-monitor_monitor`, or reload the window (`Cmd + R` / `Ctrl + R`).
---
## Privacy
**100% local, zero telemetry, zero outbound requests.**
| Local Path | Mode | Purpose |
| :--- | :--- | :--- |
| `~/.gemini/antigravity/brain/<id>/.system_generated/logs/transcript.jsonl` | Read-only | Planner tokens, models, tool calls, errors |
| `~/.gemini/antigravity/conversation_summaries.db` | Read-only | Titles, workspaces, live status, subagent links |
| `~/.gemini/antigravity/*` | Read-only | Directory size scan on demand |
| `${PLUGIN_DATA}/preferences.json` | Plugin-owned | Budgets, auto-refresh, custom model rates |
---
## Reference
<details>
<summary><strong>MCP Tools & UI Resource</strong></summary>
| Name | Visibility | Role |
| :--- | :--- | :--- |
| `ui://antigravity-monitor/dashboard.html` | UI Resource | Single-file React bundle (`text/html;profile=mcp-app`) |
| `open_usage_monitor` | Model + App | Launches dashboard (`aux_pane` & `global` entrypoints) |
| `get_usage_summary` | Model | Text + structured summary for quick chat Q&A |
| `app_get_dashboard_data` | App only | Filtered time-series, models, workspaces, sessions, tools |
| `app_get_session_detail` | App only | Per-turn progression, tools, and errors for one session |
| `app_get_storage_stats` | App only | Local `~/.gemini/antigravity` disk usage scan |
| `app_save_preferences` | App only | Eager preference persistence to `${PLUGIN_DATA}` |
</details>
<details>
<summary><strong>Updating & Uninstalling</strong></summary>
#### Update
```bash
cd ~/.gemini/config/plugins/antigravity-monitor
git pull && npm install && npm run build
```
Then restart `antigravity-monitor_monitor` from **Settings → MCP Servers**.
#### Uninstall
Disable/uninstall from **Skills & Customizations → Monitor**, or run:
```bash
rm -rf ~/.gemini/config/plugins/antigravity-monitor
# Or, if installed via developer script:
npm run uninstall:plugin
```
</details>
<details>
<summary><strong>Development & Troubleshooting</strong></summary>
```bash
npm run typecheck # TypeScript check
npm test # Unit + MCP protocol integration tests
npm run build # Build dist/index.html + dist/server.mjs
```
- **UI hot-reload**: Set `ANTIGRAVITY_MONITOR_HTML=/path/to/dist/index.html`, run `npm run build:app`, and reopen the view.
- **Custom data path**: Set `ANTIGRAVITY_DATA_DIR=/path/to/antigravity`.
- **Launcher self-check**: Run `bash ~/.gemini/config/plugins/antigravity-monitor/bin/antigravity-monitor --help`.
</details>
---
<div align="center">
<sub>MIT License · Built with <a href="https://github.com/modelcontextprotocol/ext-apps">@modelcontextprotocol/ext-apps</a> & <a href="https://github.com/modelcontextprotocol/typescript-sdk">@modelcontextprotocol/sdk</a></sub>
</div>
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues