modelscope·@hyson666/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.
The system consists of:
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:
<img width="742" alt="image" src="https://github.com/user-attachments/assets/d9b2c97c-c535-4d2a-bcf1-2d2c6343aeb3" />If you need to rebuild the frontend, you have two options:
# Make the script executable if needed
chmod +x build_frontend.py
# Run the script
./build_frontend.py
This script will automatically:
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Build the frontend
npm run build
# Create static directory if it doesn't exist
mkdir -p ../backend/static
# Copy build files
cp -r dist/* ../backend/static/
After building the frontend, you can start the application using the run.py script.
For a production environment where the static files have already been built:
backend/static directorycd backend
uv pip install -r requirements.txt
python -m app.main
If you want to run the services separately for development:
Navigate to the backend directory:
cd backend
Install the dependencies with uv:
uv pip install -r requirements.txt
Run the backend server:
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
Navigate to the frontend directory:
cd frontend
Install the dependencies:
npm install
Run the development server:
npm run dev
http://localhost:8000/mcp/v1PdfRagMcpServer/
backend/ # FastAPI backend
app/
__init__.py
main.py # Main FastAPI applica…
暂无描述。
暂无描述。
一种模型上下文协议服务器,它将Wireshark的网络分析能力与Claude等人工智能系统集成在一起,允许在无需手动复制的情况下直接分析网络数据包。
通过SearchAPI.site将AI助手连接到外部数据源(如Google、Bing等),并通过模型上下文协议(MCP)实现对网络信息的安全和上下文访问。
暂无描述。
暂无描述。