PDF RAG

v1.0.0Search & Data Extractionstable

Enables intelligent search and question-answering over PDF documents using semantic similarity and keyword search. Supports OCR for scanned PDFs, persistent vector storage with ChromaDB, and maintains source tracking with page numbers.

cursormcpmcp-serverpythonrag
Share:
43
Stars
0
Downloads
0
Weekly
0/5

What is PDF RAG?

PDF RAG is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables intelligent search and question-answering over pdf documents using semantic similarity and keyword search. supports ocr for scanned pdfs, persistent vector storage with chromadb, and maintains...

Enables intelligent search and question-answering over PDF documents using semantic similarity and keyword search. Supports OCR for scanned PDFs, persistent vector storage with ChromaDB, and maintains source tracking with page numbers.

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables intelligent search and question-answering over PDF d

Use Cases

Search PDF documents with semantic similarity and keyword matching.
Extract information from scanned PDFs using OCR.
Maintain source tracking with page numbers for citations.
hyson666

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx pdf-rag-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use PDF RAG

The PDF RAG MCP server provides intelligent search and question-answering over PDF documents using semantic similarity and keyword search, with OCR support for scanned PDFs, persistent vector storage via ChromaDB, and full source tracking including page numbers. It connects to Cursor and other MCP-compatible AI tools through an HTTP-based MCP endpoint, making it easy to query large document libraries, research papers, or technical manuals without manually searching page by page. Source citations with page numbers ensure you can verify every answer the AI provides.

Prerequisites

  • Python 3.8 or higher installed
  • uv package manager (install via 'curl -sS https://astral.sh/uv/install.sh | bash')
  • Tesseract OCR installed on your system (needed for scanned PDF support; e.g. 'brew install tesseract' on macOS)
  • Git to clone the repository
  • Cursor or another MCP-compatible client that supports HTTP-based MCP endpoints
1

Clone the repository

Clone the pdf-rag-mcp-server repository to your local machine.

git clone https://github.com/hyson666/pdf-rag-mcp-server.git
cd pdf-rag-mcp-server
2

Install Python dependencies

Initialize a uv environment, activate it, and install all backend dependencies including ChromaDB, the PDF processing libraries, and OCR support.

uv init .
uv venv
source .venv/bin/activate
uv pip install -r backend/requirements.txt
3

Launch the server

Start the full application stack using run.py. This launches the FastAPI backend, MCP server, and WebSocket processing pipeline together.

uv run run.py
4

Upload PDFs via the web interface

Navigate to http://localhost:8000 in your browser. Upload your PDF documents and wait for the real-time processing indicator to show completion. ChromaDB will persist the vector embeddings across restarts.

5

Add the MCP server to Cursor

Open Cursor Settings > Cursor Settings > MCP, click 'Add new global MCP server', and paste the configuration pointing to the local HTTP MCP endpoint at port 7800.

{
  "mcpServers": {
    "pdf-rag": {
      "url": "http://localhost:7800/mcp"
    }
  }
}

PDF RAG Examples

Client configuration

Cursor mcp.json configuration to connect to the PDF RAG MCP server's HTTP endpoint for semantic PDF search.

{
  "mcpServers": {
    "pdf-rag": {
      "url": "http://localhost:7800/mcp"
    }
  }
}

Prompts to try

Example prompts for querying your PDF knowledge base once the server is running and documents are processed.

- "Find all mentions of 'data retention policy' in my uploaded PDFs and show the page numbers."
- "What does section 4.2 of the architecture document say about caching?"
- "Search for information about JWT token expiry across all my documents."
- "Which PDF and page number discusses the error code E-404?"
- "Give me a summary of Chapter 3 from the API specification PDF."

Troubleshooting PDF RAG

OCR extraction fails for scanned PDFs

Install Tesseract OCR on your system: 'brew install tesseract' on macOS, 'apt-get install tesseract-ocr' on Ubuntu. Also install the pytesseract Python wrapper: 'uv pip install pytesseract'. Restart the server after installation.

ChromaDB errors on restart — vector store seems empty

ChromaDB persists data to a local directory. Check that the backend has write permissions to its working directory. If the database is corrupted, delete the chroma_db folder in the backend directory and re-upload your documents.

Cursor shows the server as inactive after adding the config

Make sure 'uv run run.py' is running in a terminal before enabling the server in Cursor. The MCP toggle in Cursor requires the HTTP endpoint at localhost:7800 to be reachable at the moment you enable it.

Frequently Asked Questions about PDF RAG

What is PDF RAG?

PDF RAG is a Model Context Protocol (MCP) server that enables intelligent search and question-answering over pdf documents using semantic similarity and keyword search. supports ocr for scanned pdfs, persistent vector storage with chromadb, and maintains source tracking with page numbers. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install PDF RAG?

Follow the installation instructions on the PDF RAG GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with PDF RAG?

PDF RAG works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is PDF RAG free to use?

Yes, PDF RAG is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "pdf-rag-mcp-server": { "command": "npx", "args": ["-y", "pdf-rag-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use PDF RAG?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides