Skip to main content
Glama
antigravity

antigravity

by Snake76500

Serveur MCP Antigravity pour Hermes & Agents IA Locaux

Ce projet fournit un serveur MCP (Model Context Protocol) permettant d'interconnecter les agents IA exécutés sur Hermes (pilotés par des modèles LLM locaux sur Ollama) avec Google Antigravity (agy).

🎯 Objectif et Philosophie

  • 0 Token Consommé en API payante : Les agents locaux Hermes (sur Ollama) orchestrent le projet et délèguent la génération lourde de code à Antigravity, qui dialogue directement avec Gemini Pro via votre abonnement Antigravity/Gemini Pro actif sur votre MiniPC Debian (sans clés d'API payantes à l'usage).

  • 100% Headless / Ligne de Commande : Fonctionne parfaitement sur une installation Debian CLI sans interface graphique.

  • Automatisable & Sécurisé : Exécution autonome du code avec auto-validation (--dangerously-skip-permissions) ou mode planification (--mode plan).


Related MCP server: agent-antigravity-mcp

🏗️ Architecture

┌────────────────────────────────┐
│      Agents IA Hermes          │  (LLM local sur Ollama : Mistral, Llama 3, Qwen...)
└──────────────┬─────────────────┘
               │ Protocole MCP (stdio ou SSE)
               ▼
┌────────────────────────────────┐
│   Serveur MCP Antigravity      │  (server.py / FastMCP)
└──────────────┬─────────────────┘
               │ Exécution asynchrone non-interactive
               ▼
┌────────────────────────────────┐
│   Antigravity CLI (`agy`)      │  (Abonnement Gemini Pro - 0 token API)
└────────────────────────────────┘

🛠️ Outils MCP Exposés

Le serveur MCP met à disposition des agents Hermes les outils suivants :

Outil MCP

Description

Exemples de paramètres

antigravity_generate_code

Génère du code ou effectue une tâche de dev complète dans un projet.

prompt, workspace_dir, model, effort, auto_approve

antigravity_continue_conversation

Poursuit une session ou répond à une question de suivi.

prompt, conversation_id, workspace_dir

antigravity_plan_code

Crée un plan d'architecture/conception sans modifier les fichiers.

prompt, workspace_dir, model, effort

antigravity_list_models

Liste l'ensemble des modèles Gemini disponibles (gemini-3.6-flash-high, gemini-3.1-pro-high...).

aucun

antigravity_check_status

Vérifie le bon fonctionnement et l'authentification de la CLI Antigravity.

aucun


🚀 Installation & Démarrage

1. Prérequis

  • Python 3.10+

  • Antigravity CLI (agy) installé et authentifié sur le MiniPC Debian.

2. Installation du serveur MCP

Dans le dossier du projet /home/fabien/ragnarlab/projects/mcp_antigravity :

pip install -r requirements.txt
chmod +x server.py

3. Tester le serveur MCP

Vous pouvez valider le bon fonctionnement de tous les outils en lançant la suite de tests :

python3 test_server.py

⚙️ Configuration pour Hermes

Mode STDIO (Recommandé pour exécution sur la même machine Debian)

Ajoutez la configuration du serveur MCP dans votre fichier de configuration MCP d'Hermes (ex: hermes_config.json ou mcp.json) :

{
  "mcpServers": {
    "antigravity": {
      "command": "python3",
      "args": [
        "/home/fabien/ragnarlab/projects/mcp_antigravity/server.py"
      ],
      "env": {
        "PYTHONUNBUFFERED": "1"
      }
    }
  }
}

Mode SSE (Server-Sent Events / HTTP)

Si Hermes tourne dans un conteneur ou une autre machine sur le réseau local, vous pouvez lancer le serveur MCP en mode SSE :

python3 server.py --transport sse --host 0.0.0.0 --port 8000

Puis configurez Hermes avec le serveur HTTP SSE http://<IP_DU_MINIPC>:8000/sse.


💡 Exemple d'utilisation par un Agent Hermes

Quand votre agent local Hermes sur Ollama reçoit une demande comme :

"Crée une API FastAPI dans /home/fabien/projets/my_api avec la gestion des utilisateurs."

L'agent Hermes appellera automatiquement l'outil MCP antigravity_generate_code :

{
  "name": "antigravity_generate_code",
  "arguments": {
    "prompt": "Crée une structure d'application FastAPI dans le workspace avec endpoints d'authentification et gestion des utilisateurs.",
    "workspace_dir": "/home/fabien/projets/my_api",
    "model": "gemini-3.6-flash-high",
    "effort": "high",
    "auto_approve": true
  }
}

Antigravity exécutera alors la génération du code directement via Gemini Pro, créera les fichiers dans le dossier /home/fabien/projets/my_api, et renverra le rapport final à l'agent Hermes sans dépenser le moindre token d'API payante.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Enables MCP-compatible AI clients like Claude Code, Cursor, and Codex to invoke Google Antigravity's Gemini coding agent for repository-aware file operations, command execution, code review, test generation, and quota checks, while also providing a standalone dual-mode CLI.
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A local MCP server that lets an agent hand real coding tasks to the signed-in Google Antigravity CLI, with background runs, follow-ups, live status, cancellation, independently collected change evidence, execution traces, model listing, login, and quota-based account rotation. It requires no API key, relying instead on the existing Antigravity login and optionally exposing agy models through a bundled local model gateway.
      MIT