Easy MCP 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., "@Easy MCP RAGsearch legal_docs for termination clause"
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.
Easy MCP RAG ๐
A high-performance Model Context Protocol (MCP) server for RAG using Qdrant. Built for UV/UVX with CPU/GPU support and HTTP transport.
โจ Features
๐ Automatic Document Indexing - Scan directories and index all documents
๐ Smart Organization - Each subdirectory becomes its own searchable dataset
๐ ๏ธ Dynamic MCP Tools - Auto-generated tools for each collection
๐ Multi-Format Support - PDF, DOCX, CSV, XLSX, TXT, Markdown, and more
โก GPU Acceleration - Optional CUDA/MPS support for faster embeddings
๐ HTTP Transport - Run as HTTP server or stdio
๐ฆ UV/UVX Ready - Install and run with a single command
๐ Verbose Logging - Detailed query tracking and monitoring
Related MCP server: mcp-rag-server
๐ Quick Start
Install with UVX (Recommended)
Run directly from GitHub without installation:
uvx --from git+https://github.com/yourusername/easy_mcp_rag.git easy_mcp_rag --data-dir ./documentsInstall with UV
# Install from GitHub
uv pip install git+https://github.com/yourusername/easy_mcp_rag.git
# Or clone and install locally
git clone https://github.com/yourusername/easy_mcp_rag.git
cd easy_mcp_rag
uv pip install -e .๐ Prerequisites
Start Qdrant (using Docker):
docker run -p 6333:6333 qdrant/qdrantPrepare your documents:
documents/
โโโ legal_docs/
โ โโโ contract.pdf
โ โโโ terms.docx
โโโ research/
โ โโโ paper1.pdf
โ โโโ notes.txt
โโโ data/
โโโ analysis.csv๐ป Usage
Basic Usage (stdio)
# With UVX
uvx --from git+https://github.com/yourusername/easy_mcp_rag.git easy_mcp_rag --data-dir ./documents
# With UV
uv run easy_mcp_rag --data-dir ./documents
# After installation
easy_mcp_rag --data-dir ./documentsHTTP Mode
easy_mcp_rag --data-dir ./documents --transport http --http-port 8000GPU Acceleration
# Auto-detect GPU
easy_mcp_rag --data-dir ./documents --device auto
# Force CUDA (NVIDIA GPU)
easy_mcp_rag --data-dir ./documents --device cuda
# Force MPS (Apple Silicon)
easy_mcp_rag --data-dir ./documents --device mps
# Force CPU
easy_mcp_rag --data-dir ./documents --device cpuAdvanced Configuration
easy_mcp_rag \
--data-dir ./documents \
--qdrant-host localhost \
--qdrant-port 6333 \
--device cuda \
--embedding-model all-mpnet-base-v2 \
--chunk-size 1024 \
--chunk-overlap 100 \
--top-k 10 \
--batch-size 64 \
--verbose \
--force-reindex๐ง Configuration Options
Flag | Description | Default |
| Directory with document subdirectories | Required |
| Qdrant server host |
|
| Qdrant server port |
|
| Device: auto, cpu, cuda, mps |
|
| Transport type: stdio, http |
|
| HTTP server host |
|
| HTTP server port |
|
| Sentence transformer model |
|
| Text chunk size (chars) |
|
| Chunk overlap (chars) |
|
| Results per search |
|
| Embedding batch size |
|
| Enable verbose logging |
|
| Log level |
|
| Force reindex all docs |
|
๐ฏ MCP Client Configuration
Claude Desktop / Cline / Other MCP Clients
Add to your MCP client config:
{
"mcpServers": {
"rag-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/yourusername/easy_mcp_rag.git",
"easy_mcp_rag",
"--data-dir",
"/path/to/your/documents",
"--device",
"auto",
"--verbose"
]
}
}
}With HTTP Transport
{
"mcpServers": {
"rag-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/yourusername/easy_mcp_rag.git",
"easy_mcp_rag",
"--data-dir",
"/path/to/your/documents",
"--transport",
"http",
"--http-port",
"8000"
]
}
}
}๐ ๏ธ How It Works
Scan - Discovers all subdirectories in your data directory
Load - Extracts text from all supported file types
Chunk - Splits documents into overlapping chunks
Embed - Generates vector embeddings (CPU or GPU)
Index - Stores in Qdrant (one collection per subdirectory)
Serve - Creates MCP tools for each collection
Example
documents/
โโโ legal_docs/ โ Creates "legal_docs_search" tool
โโโ research/ โ Creates "research_search" tool
โโโ data/ โ Creates "data_search" tool๐ Supported File Types
Category | Extensions |
Text |
|
| |
Word |
|
Spreadsheet |
|
๐จ Embedding Models
Choose based on your needs:
Model | Dimensions | Speed | Quality | Use Case |
| 384 | โกโกโก | Good | Default, fast |
| 384 | โกโก | Better | Balanced |
| 768 | โก | Best | Quality |
๐ Troubleshooting
Qdrant Connection Failed
# Check if Qdrant is running
curl http://localhost:6333
# Start Qdrant
docker run -p 6333:6333 qdrant/qdrantGPU Not Detected
# Check PyTorch GPU support
python -c "import torch; print(torch.cuda.is_available())"
# Install with GPU support
uv pip install -e ".[gpu]"Out of Memory
# Use smaller model
--embedding-model all-MiniLM-L6-v2
# Reduce batch size
--batch-size 16
# Use CPU
--device cpu๐ Logging
Enable verbose logging to see detailed information:
easy_mcp_rag --data-dir ./documents --verboseOutput includes:
โ Tool access events
๐ Query details
๐ Result counts
๐ฏ Relevance scores
๐ Source files
Example:
2024-01-20 10:30:15 - easy_mcp_rag.server - INFO - Tool accessed: legal_docs_search
2024-01-20 10:30:15 - easy_mcp_rag.server - INFO - Query: contract terms
2024-01-20 10:30:15 - easy_mcp_rag.server - INFO - Results returned: 5
2024-01-20 10:30:15 - easy_mcp_rag.server - DEBUG - Result 1: score=0.8542๐ Security Notes
HTTP mode exposes the server on the network
Use
--http-host 127.0.0.1for local-only accessConsider authentication for production deployments
๐ Development
# Clone repository
git clone https://github.com/yourusername/easy_mcp_rag.git
cd easy_mcp_rag
# Install with dev dependencies
uv pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/
# Lint
ruff src/๐ค Contributing
Contributions welcome! Please:
Fork the repository
Create a feature branch
Make your changes
Submit a pull request
๐ License
MIT License - see LICENSE file
๐ Credits
Built with:
MCP - Model Context Protocol
Qdrant - Vector database
Sentence Transformers - Embeddings
UV - Package manager
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for agentverse documentation, generated by doc2mcp.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseDqualityCmaintenanceA lightweight RAG system that provides an MCP server for searching and interacting with vector-based knowledge bases. It enables users to perform retrieval-augmented generation and search across Qdrant collections through a standardized interface.12MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).2837MIT
- AlicenseBqualityAmaintenanceA production-grade MCP server for integrating RAG into AI agents, supporting multiple vector databases with enterprise security and dynamic tool selection.215MIT
- FlicenseNot gradedqualityDmaintenanceAn enterprise-ready MCP server that exposes a RAG tool for retrieving relevant context and metadata from a Qdrant vector database using natural language queries.2-