MCP PDF Server
Provides tools for querying PDF documents using NVIDIA's AI models for embeddings and text generation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP PDF ServerWhat does the report say about revenue growth?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π MCP PDF Server
An MCP (Model Context Protocol) server that lets AI assistants query your PDF documents. Drop your PDFs, ingest them into a vector database, and ask questions β answers are grounded in your actual documents.
β¨ Features
π MCP-Compatible β Works with any MCP client (GitHub Copilot, Antigravity, etc.)
π Auto PDF Discovery β Automatically finds, extracts, chunks, and embeds all PDFs in your folder
π Vector Search β Retrieves the most relevant passages before generating answers
π³ Docker-Ready β Runs as a containerized server with one command
ποΈ Qdrant β Fast, open-source vector database for similarity search
Related MCP server: PDF RAG MCP Server
ποΈ How It Works
βββββββββββββββ MCP (stdio) βββββββββββββββββββββ HTTP ββββββββββββ
β AI Assistant ββββββββββββββββββββββΊβ MCP PDF Server βββββββββββββββΊβ Qdrant β
β β β β β Vector DBβ
βββββββββββββββ β 1. Embed question β ββββββββββββ
β 2. Search vectors β
β 3. Generate answerβ LLM API
β βββββββββββββββΊ
βββββββββββββββββββββ (Embeddings
+ Generation)You ask a question via your AI assistant.
The server embeds the question using your choice of embedding model.
It searches Qdrant for the top 5 most relevant text chunks from your PDFs.
It generates an answer using an LLM, grounded in the retrieved context.
π Quick Start
Prerequisites
Node.js 20+ (for ingestion only)
[LLM API Key]
1. Clone & Configure
git clone https://github.com/your-username/mcp-pdf-server.git
cd mcp-pdf-server
cp .env.example .envEdit .env and set your API key:
API_KEY=nvapi-your_key_here2. Start Qdrant
docker-compose up -d3. Add Your PDFs & Ingest
Place your PDF documents in the pdfs/ folder, then:
npm install # first time only
npm run ingestAll PDFs in the folder are automatically discovered and ingested.
4. Build the Server Image
docker build -t mcp-pdf-server .5. Connect to Your AI Assistant
Add to your AI assistant's MCP config (e.g., mcp_config.json):
{
"mcpServers": {
"pdf-docs": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--network",
"mcp-network",
"-e",
"API_KEY",
"-e",
"QDRANT_URL=http://mcp-qdrant:6333",
"-e",
"COLLECTION_NAME=documents",
"-e",
"EMBED_MODEL=nvidia/nv-embedqa-e5-v5",
"-e",
"GEN_MODEL=qwen/qwen2.5-coder-32b-instruct",
"mcp-pdf-server"
],
"env": {
"API_KEY": "your_nvapi_key_here"
}
}
}
}Done! Ask your AI assistant any question about your documents.
π§ Available Tools
Tool | Description |
| Ask any question. The server retrieves relevant context from your ingested PDFs and generates an answer. |
βοΈ Environment Variables
Variable | Description | Default |
| LLM API key | (required) |
| Embedding model |
|
| Generation model |
|
| Qdrant collection name |
|
| Qdrant connection URL |
|
| Chunks per embedding batch |
|
| Max retries on API failure |
|
| Cooldown between batches (ms) |
|
Note: The
.envfile is used for local ingestion. Themcp_config.jsonpasses env vars via Docker-eflags for the server.
π Project Structure
mcp-pdf-server/
βββ pdfs/ # Place your PDF documents here
βββ src/
β βββ server.ts # MCP server entry point
β βββ llm/
β β βββ provider.ts # LLM API client (embed + generate)
β βββ vector/
β β βββ qdrant.ts # Qdrant client config
β βββ ingest/
β βββ main.ts # Ingestion orchestrator (auto-discovers PDFs)
β βββ extract.ts # PDF text extraction
β βββ chunk.ts # Text chunking
β βββ embed.ts # Batch embedding & Qdrant insertion
βββ docker-compose.yml # Qdrant service
βββ Dockerfile # Server image
βββ .env.example # Env var template (safe to commit)
βββ .gitignore # Keeps secrets & binaries out of git
βββ package.jsonπ οΈ Development
For local development with hot-reloading:
npm install
docker-compose up -d # Start Qdrant
npm run dev # Server with hot-reloadTo use the local dev server with your AI assistant, change mcp_config.json to:
{
"mcpServers": {
"pdf-docs": {
"command": "npx",
"args": ["tsx", "src/server.ts"],
"cwd": "/path/to/mcp-pdf-server",
"env": {
"API_KEY": "your_nvapi_key_here",
"QDRANT_URL": "http://localhost:6333",
"COLLECTION_NAME": "documents",
"EMBED_MODEL": "nvidia/nv-embedqa-e5-v5",
"GEN_MODEL": "qwen/qwen2.5-coder-32b-instruct"
}
}
}
}π Use Cases
This server works with any PDF knowledge base:
π Technical books β Architecture, algorithms, system design
π Company docs β Wikis, runbooks, policies
π Research papers β Academic papers, whitepapers
π Legal documents β Contracts, compliance
π Course material β Textbooks, lecture notes
π Troubleshooting
Problem | Solution |
Server can't reach Qdrant |
|
Embeddings mismatch | Changed |
Rebuild server image |
|
Reset all data | Delete |
Rate limiting | Increase |
No PDFs found | Ensure |
π License
ISC
This server cannot be deployed
Maintenance
Related MCP Connectors
Ingest, manage, and retrieve documents for RAG-powered AI applications
Parse, extract, split, and ask over digital PDFs (text layer, no OCR) from Cursor and Claude.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and query PDF documents through a local RAG system with vector embeddings. Provides semantic document search capabilities while keeping all data stored locally without external dependencies.-
- AlicenseNot gradedqualityDmaintenanceEnables 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.6MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered querying of PDF documents using hybrid retrieval (BM25 + vector search) and retrieval-augmented generation, returning structured answers with source citations and confidence scores.-
- AlicenseNot gradedqualityDmaintenanceEnables AI applications to read and process PDF files with intelligent file search, text extraction, image processing, and optional OCR support for scanned documents.MIT