Powers the modern web interface with a React-based UI component library for document management and querying
Provides the backend framework that handles API requests, PDF processing, and vector storage operations
Supports version control for the project installation process
Serves as the core programming language for the backend implementation and PDF processing capabilities
Drives the frontend interface for document management, uploading PDFs, and semantic searching
Handles frontend build configuration and optimization for the web interface
PDF RAG MCP Server
A powerful document knowledge base system that leverages PDF processing, vector storage, and MCP (Model Context Protocol) to provide semantic search capabilities for PDF documents. This system allows you to upload, process, and query PDF documents through a modern web interface or via the MCP protocol for integration with AI tools like Cursor.
Features
- PDF Document Upload & Processing: Upload PDFs and automatically extract, chunk, and vectorize content
- Real-time Processing Status: WebSocket-based real-time status updates during document processing
- Semantic Search: Vector-based semantic search across all processed documents
- MCP Protocol Support: Integrate with AI tools like Cursor using the Model Context Protocol
- Modern Web Interface: React/Chakra UI frontend for document management and querying
- Fast Dependency Management: Uses uv for efficient Python dependency management
System Architecture
The system consists of:
- FastAPI Backend: Handles API requests, PDF processing, and vector storage
- React Frontend: Provides a user-friendly interface for managing documents
- Vector Database: Stores embeddings for semantic search
- WebSocket Server: Provides real-time updates on document processing
- MCP Server: Exposes knowledge base to MCP-compatible clients
Quick Start
Prerequisites
- Python 3.8 or later
- uv - Fast Python package installer and resolver
- Git
- Cursor (optional, for MCP integration)
Quick Installation and Startup with uv and run.py
- Clone the repository:
- Install uv if you don't have it already:
- Install dependencies using uv:
- Start the application with the convenient script:
- Access the web interface at http://localhost:8000
- Using with Cursor
Go Settings -> Cursor Settings -> MCP -> Add new global MCP server, paste below into your Cursor ~/.cursor/mcp.json file. See Cursor MCP docs for more info.
You could also change localhost into the host ip you deployed the service. After this confige added to the mcp json, you will see the mcp server showes at the Cursor mcp config page, switch it on to enable the server:
Building the Frontend (For Developers)
If you need to rebuild the frontend, you have two options:
Option 1: Using the provided script (recommended)
This script will automatically:
- Install frontend dependencies
- Build the frontend
- Copy the build output to the backend's static directory
Option 2: Manual build process
After building the frontend, you can start the application using the run.py script.
Simple Production Setup
For a production environment where the static files have already been built:
- Place your pre-built frontend in the
backend/static
directory - Start the server:
Development Setup (Separate Services)
If you want to run the services separately for development:
Backend
- Navigate to the backend directory:
- Install the dependencies with uv:
- Run the backend server:
Frontend
- Navigate to the frontend directory:
- Install the dependencies:
- Run the development server:
Usage
Uploading Documents
- Access the web interface at http://localhost:8000
- Click on "Upload New PDF" and select a PDF file
- The system will process the file, showing progress in real-time
- Once processed, the document will be available for searching
Searching Documents
- Use the search functionality in the web interface
- Or integrate with Cursor using the MCP protocol
MCP Integration with Cursor
- Open Cursor
- Go to Settings → AI & MCP
- Add Custom MCP Server with URL:
http://localhost:8000/mcp/v1
- Save the settings
- Now you can query your PDF knowledge base directly from Cursor
Troubleshooting
Connection Issues
- Verify that port 8000 is not in use by other applications
- Check that the WebSocket connection is working properly
- Ensure your browser supports WebSockets
Processing Issues
- Check if your PDF contains extractable text (some scanned PDFs may not)
- Ensure the system has sufficient resources (memory and CPU)
- Check the backend logs for detailed error messages
Project Structure
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A document knowledge base system that enables users to upload PDFs and query them semantically through a web interface or via the Model Context Protocol, allowing integration with AI tools like Cursor.
Related MCP Servers
- AsecurityAlicenseAqualityA powerful Model Context Protocol framework that extends Cursor IDE with tools for web content retrieval, PDF processing, and Word document parsing.Last updated -89PythonMIT License
- -security-license-qualityA Retrieval-Augmented Generation server that enables semantic PDF search with OCR capabilities, allowing users to query document content through any MCP client and receive intelligent answers.Last updated -1PythonApache 2.0
- -security-license-qualityA TypeScript-based document processing server that supports various document formats (.docx, .pdf, .xlsx) and integrates with Model Context Protocol SDK for efficient document context management.Last updated -TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) based server that efficiently manages PDF files, allowing AI coding tools like Cursor to read, summarize, and extract information from PDF datasheets to assist embedded development work.Last updated -Apache 2.0