Make Antigravity faster and cheaper: hands-on with agy-fast, the MCP accelerator that cuts turns by a third
Google Antigravity is free, but it is not fast: every one of your agent's turns costs seconds of waiting and a slice of quota. agy-fast, eleven days old and already past 2,800 stars, attacks that cost structurally — it batches searches, edits, and checks into single local calls. This tutorial installs it, wires it into any MCP host, and proves all five of its tools on a real repo.
doctor, then use the same five tools from Antigravity, any MCP host, or the terminal. Every command in this tutorial was run and its output quoted verbatim.- Why now: created November 19, 2026; 2,821 stars and 144 forks by November 30, with its best day (+222 stars) on November 25. npm package
agy-fastat version 0.3.3, MIT licensed, zero runtime dependencies. - The claim: the project reports 33.7% fewer LLM turns, 31.5% lower billable quota, and 39.7% less tool-return upload per logical action, measured across 55 of the author's own Antigravity sessions (8,446 turns). Self-reported — the tutorial shows you how to measure your own.
- What it is: five MCP tools (
batch_search,apply_edits,read_slices,quick_outline,run_checks) behind a local stdio server, plus a SessionStart hook that injects a sub-1.5 KB workspace snapshot once per session. - What you need: Node.js 20 or newer. Antigravity (CLI, Desktop 2.0, or IDE) for the full plugin; any MCP host — or no host at all — for the standalone server and direct CLI mode. ripgrep is optional and used automatically when present.

Most of an Antigravity session is not thinking. It is waiting: the model asks for one file, waits; asks for a search, waits; edits one hunk, waits; runs one command, waits. The project's own analysis of 55 real sessions puts numbers on that — a median turn spends about 79% of its time on time-to-first-token, and more than half of all edit_file calls are same-file splits, with nearly half of all run_command calls being read-only searches that a local rg answers in about 2 ms.
agy-fast does not make the model smarter. It removes the round trips. One MCP call runs up to 20 searches, edits up to 50 files, or runs up to 12 shell commands — and a SessionStart hook hands the agent a snapshot of the workspace (git state, two-level tree, scripts) in about 35–50 ms, so the first three turns stop being a 49-second directory tour. The result the project reports: 4.89 logical actions per MCP call, and a third fewer turns per unit of work.
That is the pitch. The rest of this tutorial is the proof: install, health-check, and drive all five tools against a small demo repo, with the actual outputs.
What you'll need#
- Node.js 20 or newer. Check with
node --version. This tutorial ran on Node v24.22.1; the health check confirms the version itself. - npm / npx, which ship with Node. No global install is required —
npx -y agy-fastfetches version 0.3.3 on demand. - ripgrep (
rg) — optional. Searches use it when installed and fall back to pure Node.js when it is not. The health check tells you which mode is active. - Google Antigravity — optional. The plugin (hook, routing rules, auto-updater) targets Antigravity CLI (
agy), Desktop 2.0, and IDE. Everything in steps 1–6 below works without it, through the standalone MCP server or the direct CLI. - A demo repo. Any small git repo works. The examples below use a two-file project: a Python task tracker (
app.py) and a TypeScript helper (utils.ts).
No account, no API key, no model download. The server runs locally and, per the project's docs, sends no code or transcript data anywhere.
1. Install it#
The one-command install puts the plugin in Antigravity's plugin directory and, when the agy CLI is installed, validates and enables it:
npx -y agy-fast install
That writes to ~/.gemini/config/plugins/agy-fast. If you want to inspect it first — or you do not have Antigravity installed — target a directory of your choosing and skip the enable step, exactly as this tutorial did:
npx -y agy-fast install --target /tmp/agyfast-test/plugin --no-enable
Expected output (version and paths will match your machine):
Installed agy-fast to /tmp/agyfast-test/plugin
agy-fast health check:
- Plugin path : /tmp/agyfast-test/plugin
- Version : v0.3.3
- Node.js : v24.22.1 (OK)
- ripgrep (rg): available (fast search active)
- MCP server : OK (5 tools: batch_search, apply_edits, read_slices, quick_outline, run_checks)
- Tool loading: eager (5/5 tools eager in mcp_config.json)
- Host compat : editsFormat=auto (active edits schema: array; host=auto)
- SessionStart: OK (115ms, 447 bytes)
- Auto-update : auto (interval: 4h, channel: release; not checked yet)
The installer runs that health check for you. Note the two numbers that matter: the MCP server answers with all five tools, and the SessionStart hook fires in 115 ms with a 447-byte snapshot — inside the project's stated budget of roughly 35–50 ms and at most 1.5 KB. (The 115 ms here includes first-run warm-up on a 2-core VM.)
Prefer a plain clone? git clone https://github.com/INK-Q/agy-fast.git, then node scripts/install.mjs install from inside it — the same subcommands work from the clone, and ./install.sh <command> wraps them on macOS and Linux.
2. Run the health check#
doctor (alias status) re-runs the same checks on demand — Node, ripgrep, a live MCP handshake, SessionStart latency, manifest validation, and local storage health:
node ~/.gemini/config/plugins/agy-fast/scripts/install.mjs doctor
Run from a clone or a custom target, pass --target <dir>. Against the test install above it printed:
agy-fast health check:
- Plugin path : /tmp/agyfast-test/plugin
- Version : v0.3.3
- Node.js : v24.22.1 (OK)
- ripgrep (rg): available (fast search active)
- MCP server : OK (5 tools: batch_search, apply_edits, read_slices, quick_outline, run_checks)
- Tool loading: eager (5/5 tools eager in mcp_config.json)
- Host compat : editsFormat=auto (active edits schema: array; host=auto)
- SessionStart: OK (123ms, 447 bytes)
- Auto-update : auto (interval: 4h, channel: release; not checked yet)
If you run doctor without installing first, it says so plainly — agy-fast is not installed at: /home/<you>/.gemini/config/plugins/agy-fast — which is the correct failure, not a crash. Run this check after every update; the updater stages a release, runs a live MCP smoke test, and only then swaps the files, so a broken release should never reach this output.
3. Wire the server into any MCP host#
Antigravity users get the plugin automatically after install: open Customizations → Installed in Desktop 2.0 or the IDE, confirm agy-fast is enabled, and start a new session so the SessionStart hook and MCP tools load. In the CLI, agy --dangerously-skip-permissions auto-approves the plugin's calls — use it only in repos you trust, or pair it with --sandbox.
Every other MCP host mounts the same server directly. The config snippet is:
{
"mcpServers": {
"agy-fast": {
"command": "npx",
"args": ["-y", "agy-fast", "mcp"]
}
}
}
Generate it — and the routing rules that teach a host when to use each tool — with:
npx -y agy-fast mcp-config --rules
That prints a routing table (batch independent operations; outline files over 800 lines before reading; batch searches; safe multi-file edits; concurrent checks) plus the CLI fallback for subagents and scripts, which step 6 covers. Optional flags narrow the server: --tools batch_search,quick_outline,run_checks exposes a subset, and --schema-compat=minimal strips numeric and array range keywords from tools/list for strict JSON Schema hosts. Runtime validation is unchanged either way.
One Antigravity-specific quirk worth knowing: under eager loading, the host injects a required toolSummary argument into every call. That is Antigravity behavior, not agy-fast's — lazy call_mcp_tool calls and standalone hosts do not need it. If your first call fails with missing property 'toolSummary', add a one-line summary of what the call does.

4. First working example: explore a repo in one call#
Start the standalone server and talk MCP to it. Any client works; the walkthrough below used a small Python script speaking JSON-RPC over stdio, with the working directory set to the demo repo:
npx -y agy-fast mcp
The handshake identifies the server as agy-fast version 0.3.3, and tools/list returns exactly five tools: batch_search, apply_edits, read_slices, quick_outline, run_checks.
Search and git status in a single call. batch_search takes up to 20 mixed queries — text, regex, glob, fuzzy, and read-only git — in one call:
{
"queries": [
{ "type": "regex", "pattern": "def find_tasks", "fileType": "python" },
{ "type": "git", "pattern": "status --short" }
]
}
## Query 1 [regex] def find_tasks
app.py
3: def find_tasks(tasks, query):
## Query 2 [git] status --short
(empty output)
Two logical actions, one round trip, and the git query is read-only by design — the allowed git subcommands are status, diff, log, show, branch, rev-parse, ls-files, blame, shortlog, describe, tag --list, and remote -v.
Map a file before reading it. quick_outline takes up to 40 file paths and returns flat symbol maps — no full-file dump:
{ "paths": ["app.py"] }
## Outline: app.py (22 lines)
L3-L8 [function] find_tasks
L10-L11 [function] count_open
Read only the lines you need. read_slices pairs outlines with targeted line ranges under the 8.8 KB inline cap:
{
"outlines": ["app.py"],
"slices": [{ "path": "app.py", "ranges": [[3, 8]] }]
}
## Outline: app.py (22 lines)
L3-L8 [function] find_tasks
L10-L11 [function] count_open
## Slice: app.py (22 lines)
--- L3-L8 (of 22) ---
3: def find_tasks(tasks, query):
4: results = []
5: for task in tasks:
6: if query.lower() in task["title"].lower():
7: results.append(task)
8: return results
Two details from the schema are easy to get wrong, and both surfaced while verifying this tutorial: slices entries need ranges as an array of [startLine, endLine] pairs — a bare startLine/endLine is rejected — and at least one of outlines, slices, or lineRanges must be present. The server answers both mistakes with a plain error message and an example, not a crash.

5. End to end: edit, verify, and check in one turn#
This is the loop the plugin exists for: change code, prove it still works, and run the checks — without the agent making three separate trips.
Dry-run first. apply_edits validates every hunk in memory before touching disk, and dryRun proves it:
{
"edits": [
{ "path": "utils.ts",
"hunks": [{ "target": "Hello, ${name}!", "replacement": "Hi, ${name}!" }] }
],
"dryRun": true
}
Dry run validated 1 file(s) (0 files modified):
- utils.ts: updated (1 match), lines +0
Apply it with an inline verify. The same call without dryRun, plus a verify command that runs right after writing:
{
"edits": [
{ "path": "utils.ts",
"hunks": [{ "target": "Hello, ${name}!", "replacement": "Hi, ${name}!" }] }
],
"verify": "python3 app.py"
}
Applied edits to 1 file(s):
- utils.ts: updated (1 match), lines +0
Verify [PASS in 35ms] `python3 app.py`:
[{'title': 'Write release notes', 'done': False}, {'title': 'Review release plan', 'done': False}] | 2
git diff confirmed the only change in the repo was the one-line edit in utils.ts. The tool preserves CRLF and mixed line endings, UTF-8 BOMs, file permissions, and symlinks, and it recovers automatically from globally unique drifts of up to 50 lines — so you can omit startLine/endLine on unique blocks. For batches touching three or more files, pass bestEffort: true so one mismatched hunk does not roll back the valid files.
Run the checks concurrently. run_checks takes up to 12 independent non-interactive commands in one call, with a shared 150-second budget:
{
"commands": [
{ "command": "python3 app.py" },
{ "command": "python3 -c \"print('check2 ok')\"" }
]
}
Checks: 2/2 passed (wall: 28ms)
- [PASS 27ms] check-1 (`python3 app.py`): [{'title': 'Write release notes', 'done': False}, {'title': 'Review release plan', 'done': False}] | 2
- [PASS 26ms] check-2 (`python3 -c "print('check2 ok')"`) : check2 ok
Passing commands collapse to one-line summaries; failures get head-tail folding so the first root-cause errors and the final summary both survive the 8.8 KB cap. Truncated output is spilled to a file under the local cache instead of being silently cut.
6. The no-host option: direct CLI mode#
Swarm workers and shell scripts cannot speak MCP. The same server binary has a direct CLI: node <plugin>/dist/mcp-server.mjs --cli <search|outline|slice|edit|check>. The npx path to the binary is printed by mcp-config --rules; every command also accepts --json, --file, or stdin JSON in the exact MCP tool schema. Verified on the demo repo:
node dist/mcp-server.mjs --cli search --regex "def find_tasks" --file-type python
node dist/mcp-server.mjs --cli outline app.py
node dist/mcp-server.mjs --cli check "python3 app.py"
## Query 1 [regex] def find_tasks
app.py
3: def find_tasks(tasks, query):
## Outline: app.py (22 lines)
L3-L8 [function] find_tasks
L10-L11 [function] count_open
Checks: 1/1 passed (wall: 36ms)
- [PASS 34ms] check-1 (`python3 app.py`): [{'title': 'Write release notes', 'done': False}, {'title': 'Review release plan', 'done': False}] | 2
This is the mode to reach for when an agent framework, a CI job, or a cron script needs the batching without an MCP host in the loop.
7. Measure it yourself#
The 33.7% / 31.5% figures are the author's measurements on their own sessions, and the honest move is to reproduce them on yours. The plugin ships an offline transcript analyzer for exactly that — nothing leaves your machine:
# Summarize all local Antigravity transcripts
node dist/benchmark.mjs analyze --local
# Only the 10 most recently modified transcripts
node dist/benchmark.mjs analyze --local --recent 10
# Compare two task runs, before vs. after
node dist/benchmark.mjs compare --before ./run-before/transcript.jsonl --after ./run-after/transcript.jsonl
On a machine with no Antigravity transcripts — this tutorial's VM — analyze --local exits 0 and reports zero sessions across every metric, rather than erroring. Run it before installing, work a week with the plugin, then run it again with --split-usage to see your own with-versus-without numbers. The project's methodology note is worth reading before you trust either set of numbers: one batch_search with five queries counts as five actions, an apply_edits touching six hunks plus verify counts as seven, and the quota weighting (1.0× uncached input, 0.1× cache read, 5.0× output) still shows a 25.8–29.4% saving under more conservative weightings.
When to use this vs alternatives#
| Situation | Use | Why |
|---|---|---|
| You live in Antigravity and pay quota or wait on turns | agy-fast (full plugin) | Hook, routing rules, and auto-updater are built for it; the reported savings are measured on Antigravity sessions |
| You use Claude Code, Codex, or another MCP host | agy-fast (standalone MCP server) | Same five tools over stdio via npx -y agy-fast mcp; no Antigravity needed |
| One small file, one known line range, one quick fix | Native read_file / edit_file | Locally allowlisted at ~7 ms; batching adds nothing when there is nothing to batch |
| Scripts, swarm workers, CI jobs | Direct CLI mode | Same tools without an MCP host in the loop |
| You want a different agent's built-in tools, or a custom tool server | Build your own MCP server | agy-fast optimizes Antigravity's workflow; it does not add new capabilities beyond batching local operations |
The honest limits: agy-fast makes an existing agent cheaper and faster; it does not make it better at reasoning, and its headline numbers come from one author's sessions. It also only batches what the agent already does — if your bottleneck is model quality or a 180-second MCP call limit, batching will not fix it. Updates deserve a glance too: the background updater checks GitHub every four hours by default (AGY_FAST_AUTO_UPDATE=off turns it off), and the routing rules add about 1.7k tokens once per session, cached from turn two onward — the project says avoiding a single redundant turn pays that back more than twenty times over.
The takeaway#
Install it with npx -y agy-fast install, confirm the health check shows all five tools, and let the agent batch its busywork. The standalone server means the value is not locked to Antigravity — the same batch_search, quick_outline, read_slices, apply_edits, and run_checks run from any MCP host or straight from the terminal, and every one of them was verified here on a real repo with the outputs quoted above. Then run benchmark.mjs analyze --local after a week of real sessions: the only percentage that matters is yours.