Skip to main content
Glama
antigravity-desktop-live-quota-mcp

antigravity-desktop-live-quota-mcp

by Mefamex

antigravity-desktop-live-quota-mcp

Author

Mefamex (Mehmet Akif Akkoç)

Website

https://www.mefamex.com

License

MIT

Created

2026-11-07

Updated

2026-11-08

Stack

Python ≥ 3.10 (Sıfır Harici Bağımlılık / Pure Python Stdlib)

Platform

Linux (Arch Linux, KDE Plasma 6, Wayland, X11)

Status

✅ Production Ready

Google Antigravity Desktop (2.0) uygulamasında menüler altında gizli kalan canlı yapay zekâ model kotalarını, sıfırlanma geri sayımlarını ve aktif seçili modeli doğrudan pencerenin üst başlık çubuğuna ([data-testid="title-menu-bar"]) enjekte eden, sıfır bağımlılıklı hafif bir Model Context Protocol (MCP) sunucusudur. Harici bir sistem servisi veya paket yöneticisi yükü getirmeden yapay zekâ ajanlarına anlık kota telemetrisi sağlar.


1. Mimari ve Görsel Önizleme (Architecture & Preview)

Sistem Veri Akış Şeması

[ Antigravity Desktop Window ]
         │
         ├── DevToolsActivePort ──> [ discovery.py ] ──> [ cdp_client.py (RFC-6455) ]
         │                                                      │
         └── language_server   ──> [ quota_client.py ] ────────┴──> [ title-menu-bar ]
              (ConnectRPC)           (forceRefresh=true)               (Canlı Rozet)

Arayüz Önizlemesi

Kritik Mimari Metrikleri

  • Soğuk Başlangıç Gecikmesi: 68.0 ms — 80.3 ms (Resmi Python MCP SDK'sına göre ~6 kat daha hızlı).

  • Bellek Tüketimi: ~9 — 12 MB RAM (Ekstra runtime veya sanal ortam yükü yoktur).

  • Harici Bağımlılık: 0 (Yalnızca Python standart kütüphanesi: socket, fcntl, struct, urllib).

  • Arayüz Etki Alanı: ~400 px genişlik, 24 px yükseklik (Başlık çubuğu kontrollerini sıkıştırmaz).


Related MCP server: antigravity

2. Belge Haritası (Repository Doc Map)

Belge

Amacı ve Sorumluluğu

README.md

Proje vitrini, mimari detaylar ve operasyonel kullanım kılavuzu

NOTES.md

Dahili teknik bellek, elenen yöntemler, sistem kısıtları ve Git referansı

TODO.md

5 seviyeli görev takibi, aktif sprint ve gelecek yol haritası

TODO.DONE.md

Tamamlanan ve doğrulanan adımların ters kronolojik teknik günlüğü

config.py

3 katmanlı ayar motoru (Ortam Değişkeni > config.py > Varsayılanlar)

Makefile

Marmelab self-documenting yaşam döngüsü yöneticisi (6 zorunlu hedef + testler)

install.sh

Tek komutla mcp_config.json kaydı ve otomatik enjeksiyon betiği


3. Temel Yetenekler ve Özellikler (Key Features)

  • 5 Kota Türünün Tam Entegrasyonu: ⚡G (Gemini Flash/Pro 5h ve haftalık), Ar (Gemini 4 Argon haftalık) ve C (Claude/GPT 5h ve haftalık) kotalarını eşzamanlı izler.

  • Dinamik Kalan Süre Sayacı: Statik etiketler yerine resetTime verisinden canlı hesaplanan geri sayımları gösterir (0:50h, 6.8d, 7.0d). Yerel DOM döngüsü (5 sn) ağ trafiği üretmeden süreyi akıtır.

  • Aktif Model Vurgusu: Sohbet oturumunda kullanılan modele göre ilgili etiketi (⚡G:, Ar:, C:) parlak arka plan kapsülü ve hafif ışıltı ile görsel olarak öne çıkarır.

  • Anında Zorlamalı Bulut Yenilemesi: Rozete tıklandığında { forceRefresh: true } parametresi gönderilerek yerel dil sunucusunun önbelleği (cache.ClearAndRefresh) temizlenir; güncel veri Google bulutundan anında çekilir.

  • Çift Katmanlı Çakışma Koruması: Linux çekirdek kilidi (fcntl.flock) ile birden fazla pencere/CLI açıldığında tek bir LEADER belirlenir. Diğer süreçler STANDBY modunda bekler; lider kapanırsa otomatik devir (failover) gerçekleşir.

  • Adaptif ve Responsive Stil: HiDPI ve fractional scaling ekranlar için clamp(6px, 1vw, 12px) ve flex-shrink: 0 CSS kuralları ile pencere genişliğine uyum sağlar.


4. Teknoloji Yığını ve Gereksinimler (Tech Stack & Prerequisites)

  • Çalışma Ortamı: Linux (Arch Linux, Ubuntu, Debian, Fedora vb. — Wayland veya X11).

  • Yorumlayıcı: Python ≥ 3.10 (Sanal ortam gerektirmez, sistem Python'u ile çalışır).

  • Hedef Uygulama: Google Antigravity Desktop (2.0) sürümü.

  • Harici Bağımlılıklar: dependencies = [] (Harici hiçbir pip veya npm paketi gerekmez).


5. Kurulum ve Hızlı Başlangıç (Installation & Quick Start)

1. Depoyu Klonlayın ve Dizine Girin

# Depoyu yerel diskinize indirin
cd /mnt/DiskD/SOFTWARE/Github-repos/antigravity-desktop-live-quota-mcp

2. Tek Komutla Otomatik Kurun

# MCP kaydını yapar, izinleri ayarlar ve açık pencereye rozeti enjekte eder
make install

3. Manuel Kurulum Alternatifi

Dilerseniz ~/.gemini/config/mcp_config.json dosyası içerisindeki "mcpServers" bloğuna doğrudan şu girdiyi ekleyebilirsiniz:

"antigravity-desktop-live-quota-mcp": {
  "command": "python3",
  "args": [
    "-B",
    "/mnt/DiskD/SOFTWARE/Github-repos/antigravity-desktop-live-quota-mcp/main.py"
  ],
  "disabled": false
}

6. Yapılandırma (Configuration Guide)

config.py dosyası 3 katmanlı ayar önceliği uygular:

Ortam Değişkeni (ENV)  ──>  config.py Sabitleri  ──>  Kod İçi Güvenli Varsayılanlar

Hassas veriler veya geçici ayarlar kod değiştirilmeden ortam değişkenleri üzerinden ezilebilir:

Değişken

Varsayılan

Açıklama

AGY_BROWSER_FETCH_MS

30000

Tarayıcı JS döngüsünün yerel kota sorgulama periyodu (milisaniye)

AGY_WATCHER_CHECK_SEC

8

Lider sürecin pencere varlığını ve rozet durumunu denetleme sıklığı (saniye)

AGY_THRESHOLD_HIGH

50

Yeşil gösterge eşik yüzdesi (> %50)

AGY_THRESHOLD_LOW

20

Sarı gösterge eşik yüzdesi (> %20, altı kırmızı)

AGY_PULSE_ALERT_THRESHOLD_PCT

15

Kritik kota kırmızı nabız animasyonu eşiği (≤ %15)

AGY_ENABLE_PULSE_ALERT

true

Nabız animasyonunu etkinleştirme bayrağı


7. Kullanım ve Komutlar (Usage & CLI Reference)

7.1. Terminal ve Makefile Komutları

# Kullanılabilir tüm hedefleri renkli ve açıklamalı listeler
make help

# Canlı kota raporunu ve açık pencereleri JSON olarak terminale basar
make status

# Açık olan Antigravity Desktop penceresine rozeti anında zorla enjekte eder
make inject

# Soğuk başlangıç, liderlik kilidi, failover ve enjeksiyon testlerini koşturur
make test

# Commit/Push öncesi derleme kalıntılarını temizler ve test zincirini doğrular
make verify

# Ortamdaki bytecode ve önbellek kalıntılarını siler
make clean

7.2. Sunulan Model Context Protocol (MCP) Araçları

Yapay zekâ ajanları (gemini, claude, codex) stdio üzerinden bu araçları çağırabilir:

Araç Adı

Parametreler

Görev ve Açıklama

get_quota_status

include_raw: boolforce_refresh: bool

Gemini, Claude/GPT ve Argon kota yüzdelerini, kalan sıfırlanma sürelerini ve ham language_server çıktısını döndürür.

reinject_badge

force: bool

Antigravity Desktop penceresindeki rozeti yeniden oluşturur ve tıklandığı andaki verilerle tazeler.

get_instance_status

(yok)

Sürecin PID numarasını, LEADER / STANDBY rolünü ve aktif kilit dosya yolunu bildirir.


8. Güvenlik, Gizlilik ve Kırmızı Çizgiler (Safety & Privacy)

  • Sıfır Dış Ağ Trafiği: Bu sunucu ve enjekte edilen tarayıcı scripti, hiçbir harici sunucuya veya üçüncü taraf analitik servisine veri göndermez.

  • Sadece Yerel İletişim (Localhost-Only): Tüm iletişim yerel makinedeki 127.0.0.1 soketleri ve language_server süreciyle sınırlıdır.

  • Stdout Akış İzolasyonu: JSON-RPC 2.0 protokol bütünlüğünü bozmamak için stdout akışına kesinlikle log basılmaz; tüm operasyonel loglar sys.stderr üzerinden yürütülür.

  • Sıfır İkili Dosya Değişikliği: Antigravity Desktop ikili dosyalarına (binary patch) dokunulmaz; yalnızca Chrome DevTools Protocol (Runtime.evaluate) üzerinden arayüz manipülasyonu yapılır.


9. Lisans ve Katkı (License)

Bu proje MIT Lisansı altında açık kaynak olarak yayınlanmıştır.
Tüm hakları saklıdır © 2026 Mefamex.

Available Tools

3 tools
get_instance_statusB

Çalışan MCP sunucusunun PID, çoklu-örnek liderlik (Leader/Standby) ve kilit durumu bilgilerini döndürür.

NameRequiredDescriptionDefault

No parameters

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only describes the data returned and does not mention whether the operation is read-only, idempotent, requires authentication, has rate limits, or any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no redundant or filler content. Every word contributes to specifying the returned data.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter status getter with no output schema, the description lists the returned fields and is largely sufficient. It could be strengthened by noting the read-only nature of the call, but the core informational need is met.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is no parameter semantics to clarify beyond the schema. The baseline for zero parameters is 4, and the description appropriately does not waste words on nonexistent inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('döndürür' – returns) and enumerates the exact information returned: PID, multi-instance leadership (Leader/Standby), and lock status. This clearly differentiates it from siblings like get_quota_status and reinject_badge by resource, though it never explicitly names or contrasts them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions. It simply states what is returned, leaving the agent to infer appropriate usage contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_quota_statusB

Antigravity yerel language_server üzerinden canlı AI model kota ve kullanım durumunu (Gemini 5h/weekly, Claude/GPT, Argon) sorgular.

NameRequiredDescriptionDefault
include_rawNoTrue ise sunucudan gelen saf ham yanıtı da ekler.
force_refreshNoTrue ise yerel dil sunucusu önbelleğini temizleyip doğrudan buluttan anlık çeker.

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It discloses that results come from the local language_server and are 'canlı' (live), but it says nothing about what happens when the server is not running, whether the call is read-only, latency/rate-limit expectations, or the shape of the returned quota data (for example 5-hour vs weekly windows). It also omits the cache-clearing side effect that force_refresh causes, which is left entirely to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that identifies the source (local language_server) and the queried data without filler. It is appropriately sized for a two-optional-parameter read tool, losing a point only because the parenthetical provider list is somewhat compressed and unexplained.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description should compensate more than it does: it never says what the response contains beyond listing providers, nor how quota windows are represented. For a simple read-only status query it is adequate, but an agent still cannot predict failure modes or return structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both include_raw and force_refresh are already documented in the input schema, which sets the baseline at 3. The description adds only that data is live, and it does not explain how include_raw or force_refresh alter the returned quota figures beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (sorgular = queries) and a specific resource (live AI model quota and usage status), and it enumerates the covered providers (Gemini 5h/weekly, Claude/GPT, Argon). That is enough for an agent to distinguish it from status-oriented siblings like get_instance_status or reinject_badge, though it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose implies when the tool is relevant (checking remaining model quota/usage), but there is no explicit when-to-use/when-not-to-use statement and no routing to the sibling tools. An agent can infer the trigger from the name and description alone, which is the definition of minimum-viable guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

reinject_badgeC

Antigravity Desktop penceresinin üst menü çubuğuna canlı kota göstergesini (rozetini) anında yeniden enjekte eder ve tazeler.

NameRequiredDescriptionDefault
forceNoZaten rozet varsa bile zorla yeniden kurar.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden. It hints that the action mutates the host application's UI ('üst menü çubuğuna ... enjekte eder'), which is useful, but it never states side effects, required permissions, what happens if a badge already exists (left to the schema's 'force' field), or what the tool returns on success or failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the action and target stated immediately. The parenthetical gloss of 'rozet' is mildly redundant but helpful for a non-obvious term, so there is little waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (0 required params, no output schema, no annotations) and the description conveys the core action. However, for a UI-mutating operation with no structured safety metadata, the absence of preconditions and expected outcomes leaves a meaningful gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single optional 'force' parameter is already explained in the schema ('Zaten rozet varsa bile zorla yeniden kurar'). The description adds no parameter-level information, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and object in Turkish: re-injecting and refreshing the live quota badge ('canlı kota göstergesi (rozetini)') in the top menu bar of the Antigravity Desktop window. That is concrete enough to distinguish it from the read-only siblings get_quota_status and get_instance_status, though it does not explicitly name them as alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the word 'yeniden' (again) and 'tazeler' (refreshes) – one can infer the tool is for repairing a missing or stale badge. There is no explicit statement of when to call it versus get_quota_status, and no prerequisites or exclusions (for example, whether the desktop app must be running).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedget_instance_status
    • First observedget_quota_status
    • First observedreinject_badge

TDQS

B3.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a clearly distinct object: quota data (get_quota_status), the UI badge element (reinject_badge), and the server process itself (get_instance_status). There is no plausible way to confuse one for another.

Naming Consistency5/5

All three names are snake_case verb_noun constructions (get_*, reinject_*), and the nouns map directly to the resource being acted on. Minor variation in verb choice (reinject vs get) is semantically meaningful, not inconsistent.

Tool Count4/5

Three tools is on the thin side, but this is a narrow single-purpose server (live quota monitoring for a desktop app) and each tool covers a genuinely separate concern. Nothing is redundant or filler.

Completeness3/5

The surface covers querying quota, refreshing the badge, and inspecting instance leadership, but the badge lifecycle is one-directional — there is no way to hide/disable the badge or configure its refresh behavior, and no tool to reset or re-acquire leadership. These are notable gaps an agent would hit when trying to fully manage the display state.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to monitor and debug browser runtime errors, console logs, and page diagnostics in real time via a Chrome extension and local MCP server.
    4
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables local AI agents to generate code and interact with Google Antigravity (Gemini Pro) via MCP, consuming zero API tokens.
    -
  • A
    license
    A
    quality
    C
    maintenance
    Lets an AI agent check its own Claude and Codex usage limits — used percentages and exact reset times for session and weekly windows — so it can plan long-running work around resets instead of dying mid-task. It reads local, credential-free sources by default, always reports which source answered, and ships a hook that pushes quota state into context automatically.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to query live 5-hour and 7-day quota limits, per-model allowances, and user plan tiers from the local Google Antigravity 2.0 Language Server. It also forecasts planned task consumption and self-learns from real pre/post measurements, isolating parallel-chat noise.
    7 npm
    MIT