Antigravity PDF MCP Server

Antigravity PDF MCP Server

Enables intelligent ingestion and querying of PDF, Markdown, and text files using hybrid search that combines keyword matching and semantic embeddings with citations.

Category
Visit Server

README

Antigravity PDF MCP Server

A powerful Model Context Protocol (MCP) server that enables intelligent document ingestion and querying capabilities for AI agents and IDEs. This server allows you to build a persistent knowledge base from PDFs, Markdown, and Text files, and query them using advanced hybrid search techniques.

Features

  • Multi-Format Ingestion: Support for .pdf, .md, and .txt files.
  • Smart Chunking: Recursive character splitting preserves document structure (paragraphs, headers).
  • Persistent Storage: Uses SQLite (antigravity.db) to store documents and vectors across restarts.
  • Advanced Retrieval:
    • Hybrid Search: Combines TF-IDF (keyword) and OpenAI Embeddings (semantic) using Reciprocal Rank Fusion (RRF).
    • Filtering: Scope searches to specific documents.
    • Citations: Returns page numbers (e.g., [Page 5]) for easy verification.
  • User Experience: Real-time progress notifications during ingestion.
  • MCP Protocol: Fully compliant with the Model Context Protocol over Stdio.

Prerequisites

  • Node.js (v18 or higher)
  • npm

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd antigravity-pdf-mcp
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Configuration

To enable Semantic Search (Embeddings), create a .env file in the root directory:

OPENAI_API_KEY=sk-your-api-key-here

If no API key is provided, the server will fallback to local TF-IDF search only.

Tools

The server exposes the following MCP tools:

  • ingest_document: Ingest a file (PDF, TXT, MD) into the knowledge base.
    • path: Absolute path to the file.
  • query_knowledge_base: Search the knowledge base.
    • query: The search query.
    • document_id (Optional): Filter results to a specific document ID.
  • list_documents: List all ingested documents.
  • reset_library: Clear the entire database.
  • ingest_pdf (Deprecated): Alias for ingest_document.

Usage with IDEs

This server uses the Stdio transport, making it compatible with any MCP-compliant client or IDE.

Antigravity IDE

  1. Open Settings > MCP Servers.
  2. Click Add Server.
  3. Configure the server:
    • Name: antigravity-pdf
    • Command: node
    • Arguments:
      /absolute/path/to/antigravity-pdf-mcp/dist/server.js
      
    • Environment Variables:
      • OPENAI_API_KEY: Your OpenAI API key.

VSCode / Claude Desktop

Add to your MCP configuration file (e.g., claude_desktop_config.json):

{
  "mcpServers": {
    "antigravity-pdf": {
      "command": "node",
      "args": [
        "/absolute/path/to/antigravity-pdf-mcp/dist/server.js"
      ],
      "env": {
        "OPENAI_API_KEY": "your-api-key-if-needed"
      }
    }
  }
}

Contributing

  1. Fork & Clone: Clone your fork locally.
  2. Branch: Create a feature branch (git checkout -b feature/amazing-feature).
  3. Develop: Make your changes.
  4. Verify:
    • Run npm run build to check for errors.
    • Use npx ts-node verify_ux.ts to test ingestion and retrieval.
  5. Commit & Push: Push changes to your fork.
  6. Pull Request: Open a PR against the main repository.

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured