retrieval-only-RAG
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., "@retrieval-only-RAGWhat does the manual say about installation steps?"
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.
retrieval-only-RAG
A PDF retrieval tool wrapped as an MCP server. It handles the R in RAG — your IDE agent (Cursor, Kiro, Claude Code) handles generation.
PDFs ──> [ load → chunk → embed → store → retrieve ]
│
returns matching chunks
│
[ MCP server wraps the retriever ]
│
IDE agent calls it ──┘ → IDE agent writes the answerNo LLM inside this tool. Embeddings run locally (no cloud key needed).
Setup
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -r requirements.txtRelated MCP server: MyDocsMCP
Usage
Index your PDFs — drop PDF files into pdfs/ then run:
python -m pdf_rag.cli indexOnly new or changed PDFs are processed on subsequent runs — unchanged files are skipped. Deleted PDFs have their chunks removed automatically.
Search — retrieve the top-k chunks for a question:
python -m pdf_rag.cli search "What is the difference between ArrayList and LinkedList?"Output includes source filename, page number, and similarity score for each chunk.
MCP Server
Exposes one tool — search_pdfs(query) — that any MCP-compatible IDE agent can call.
python mcp_server.pyClaude Code (.mcp.json in project root)
A .mcp.json is already included in this repo:
{
"mcpServers": {
"pdf-rag": {
"command": "C:\\Projects\\Retrieval\\.venv\\Scripts\\python.exe",
"args": ["C:\\Projects\\Retrieval\\mcp_server.py"],
"cwd": "C:\\Projects\\Retrieval"
}
}
}Update the paths to match your machine, then Claude Code picks it up automatically.
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"pdf-rag": {
"command": "path/to/.venv/Scripts/python.exe",
"args": ["path/to/mcp_server.py"],
"cwd": "path/to/project"
}
}
}Once connected, ask your IDE agent a question about your PDFs — it calls search_pdfs, gets the chunks, and writes the answer. You own retrieval; the agent owns generation.
Configuration (config.yaml)
pdf_folder: pdfs # folder to scan for PDFs
vector_store: vector_store # where ChromaDB persists the index
embedding_model: BAAI/bge-small-en-v1.5 # local HuggingFace model
top_k: 5 # chunks returned per queryProject structure
pdf_rag/
config.py # load + validate config.yaml
indexer.py # PDF loading, chunking, embedding, ChromaDB persistence
retriever.py # similarity search + result formatting
cli.py # index / search commands
mcp_server.py # MCP wrapper exposing search_pdfs()
config.yaml
requirements.txt
.mcp.json # Claude Code MCP config (update paths for your machine)
pdfs/ # drop your PDFs here (not committed)
vector_store/ # ChromaDB index + manifest.json (not committed)How the RAG split works
Layer | Who does it | How |
Retrieval | This tool | LlamaIndex + ChromaDB + local embeddings |
Augmentation | MCP protocol | Retrieved chunks injected into agent context |
Generation | IDE agent | Cursor / Kiro / Claude Code answers from chunks |
The MCP server is editor-agnostic — swap Cursor for Kiro (or any MCP client) by changing only the connection config, no code changes needed.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.-
- FlicenseAqualityDmaintenanceMCP server that enables semantic search over local PDF collections using local RAG, with automatic indexing of new documents.5-
- AlicenseAqualityDmaintenanceA local-first MCP server that ingests PDFs, extracts structure, and provides semantic search and sequential navigation tools for AI clients to query and learn from documents.10MIT
- FlicenseNot gradedqualityCmaintenanceMCP server for retrieving answers from local PDFs using RAG with FAISS and OpenAI.-