Skip to content

Dimokat/Antigravity_Optimizer_MCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

🛠 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.

About

A local RAG-powered Model Context Protocol (MCP) server using Qdrant and FastEmbed to help AI coding agents navigate, understand, and optimize large codebases.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages