Skip to main content
Glama
Antigravity Optimizer MCP

Antigravity Optimizer MCP

by Dimokat

Antigravity Optimizer MCP (Model Context Protocol)

A powerful, local RAG-powered Model Context Protocol (MCP) server designed to supercharge AI coding agents, specifically was made for Google Antigravity, but can work with VS Code too.

Antigravity Optimizer provides tools for agents to deeply understand, navigate, and optimize large codebases using local vector search via Qdrant and FastEmbed.

🚀 Features

  • Local RAG for Projects: Instantly embed and index source code, documentation, and architecture down to the function and method level.

  • Agentic Style Analysis: Check if your TypeScript/JavaScript and Python code provides the best context for AI agents (checking for missing types, docstrings, and blocking I/O constraints).

  • Git Context Awareness: Automatically partitions indices based on the active Git branch and commit, allowing seamless switching and rollback.

  • IDE Friendly: Safely shields the JSON-RPC pipe from standard output noise (e.g. progress bars, library logging), allowing reliable integration with IDEs like Cursor or VSCode embeddings.

Related MCP server: Codebase RAG MCP Server

🛠 Prerequisites

  • Python 3.10+

  • Git (if checking git status dynamically)

📦 Installation

  1. Clone the repository

    git clone https://github.com/Dimokat/Antigravity_Optimizer_MCP
    cd Antigravity_Optimizer_MCP
  2. Set up a virtual environment (recommended)

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Prewarm Embedding Models (Optional but highly recommended) Running this downloads the necessary FastEmbed models locally so your IDE doesn't time out during the first index operation.

    python prewarm.py
  5. Verify System Health Ensure all dependencies and the embedding cache are properly configured.

    python health_check.py

🔌 Using with an MCP Client (e.g., Claude Desktop, Cursor)

Add the Antigravity server to your MCP client configuration file (e.g., mcp-settings.json).

🪟 Windows Note: You must use double backslashes in your JSON configuration (e.g., "C:\\path\\to\\Antigravity_Optimizer_MCP\\server.py"). If you are using a virtual environment, set the command to your .venv\\Scripts\\python.exe.

{
  "mcpServers": {
    "antigravity-optimizer": {
      "command": "python",
      "args": ["/absolute/path/to/Antigravity_Optimizer_MCP/server.py"] // edit this to your path
    }
  }
}

🧰 Available Tools

When connected, the AI agent gains access to these primary tools:

  • document_and_index_code: Parse, explain, and index a single file into the vector DB.

  • index_local_directory: Recursively index an entire directory or project.

  • query_local_knowledge & search_local_docs: Search the local RAG knowledge base.

  • git_diff_summary: Get a summary of all uncommitted changes in the git tree.

  • compare_files: Diff two files to understand precise changes.

  • get_function_source: Extract the precise implementation of just one method or function recursively.

  • find_todos_and_fixmes: Surface technical debt comments across the repository.

  • analyze_project_health: Get a high-level summary of the codebase's file composition.

  • check_agentic_style: Check if your code is easy for other agentic tools/LLMs to parse.

🙏 Acknowledgments

Special thanks to @max-logvyniuk for creating the initial version of this MCP server, which served as the foundation for the current improvements.

📄 License

This project is licensed under the MIT License.

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
      Not graded
      quality
      D
      maintenance
      Enables semantic search across your codebase using Google's Gemini embeddings and Qdrant Cloud vector storage. Supports 15+ programming languages with smart code chunking and real-time file change monitoring.
      65 npm
      20
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables semantic and hybrid search over documents and codebases backed by a Qdrant vector database, with collection management, document CRUD, metadata filtering, and AST-aware code indexing using local or cloud embedding providers. Supports natural language queries, incremental re-indexing of changed files, and custom configurable prompts for guided workflows.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables semantic and keyword search over a local codebase by chunking source files along function and class boundaries, embedding them offline, and fusing vector and BM25 results. Runs entirely on your machine in a single SQLite file, so AI coding agents can find relevant code with no API keys, telemetry, or cloud calls.
      7
      17 npm
      MIT