
hyson666/pdf-rag-mcp-server 是从 https://github.com/hyson666/pdf-rag-mcp-server. 导入的 MCP 候选服务器。
概览
hyson666/pdf-rag-mcp-server 是从 https://github.com/hyson666/pdf-rag-mcp-server. 导入的 MCP 候选服务器。
概述(AI 翻译)
一个强大的文档知识库系统,利用PDF处理、矢量存储和MCP(模型上下文协议)为PDF文档提供语义搜索功能。该系统允许您通过现代网页界面或MCP协议上传、处理和查询PDF文档,以便与Cursor等AI工具集成。
特色
- PDF 文档上传与处理:上传 PDF 并自动提取、分块和矢量化内容
- 实时处理状态:基于WebSocket的文档处理过程中的实时状态更新
- 语义搜索:基于向量的语义搜索,跨所有处理的文档
- MCP 协议支持:使用模型上下文协议与 Cursor 等 AI 工具集成
- 现代网页界面:React/Chakra UI前端,用于文档管理和查询
- 快速依赖管理:使用uv进行高效的Python依赖管理
系统架构
该系统包括:
- FastAPI 后端:处理 API 请求、PDF 处理和矢量存储
- React前端:提供用户友好的文档管理界面
- 向量数据库:存储语义搜索的嵌入
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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:
git clone https://github.com/yourusername/PdfRagMcpServer.git cd PdfRagMcpServer -
Install uv if you don’t have it already:
curl -sS https://astral.sh/uv/install.sh | bash -
Install dependencies using uv:
uv init . uv venv source .venv/bin/activate uv pip install -r backend/requirements.txt -
Start the application with the convenient script:
uv run run.py -
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.
{
"mcpServers": {
"pdf-rag": {
"url": "http://localhost:7800/mcp"
}
}
}
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:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"pdf-rag": {
"url": "http://localhost:7800/mcp"
}
}
}