raj-dash/Qdrant-SerpAPISearch-MCP-Server
If you are the rightful owner of Qdrant-SerpAPISearch-MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Qdrant-SerpAPISearch-MCP-Server is a multi-tenant document and web search service that integrates semantic search, web data retrieval, and LLM-powered reasoning.
๐ง Qdrant-SerpAPISearch-MCP-Server
This project implements a multi-tenant document and web search service combining semantic search (via Qdrant), web data retrieval (via SerpAPI), and LLM-powered reasoning (via MCP). It supports hybrid indexing of tenant-specific documents and real-time web results with powerful natural language querying capabilities.
๐ Features
- ๐ Hybrid Search: Combine vector-based document search with real-time web search.
- ๐งพ Multi-Tenant Support: Each tenant has isolated indexes and search scopes.
- ๐ค MCP Integration: Augments LLM agents with document and web knowledge via MCP endpoints.
- ๐ File Ingestion: Upload and index documents (PDF, TXT, etc.) per tenant.
- ๐ Modular & Extensible: Clean API design built with FastAPI.
๐ Prerequisites
- Python 3.10+
- Docker (for Qdrant)
- SerpAPI key
- Qdrant with GPU support (optional)
- An LLM agent supporting MCP (e.g.,
fastmcp
,mcp[cli]
,Autogen
, etc.)
๐ฆ Installation
- Clone the Repository
git clone https://github.com/raj-dash/Qdrant-SerpAPISearch-MCP-Server.git
cd Qdrant-SerpAPISearch-MCP-Server
- Create a Virtual Environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
- Install Dependencies
pip install -r requirements.txt
- Set Environment Variables
Create a .env
file:
SERPAPI_KEY=your_serpapi_key
QDRANT_HOST=localhost
QDRANT_PORT=6333
๐ณ Running Qdrant (via Docker)
docker run --rm --gpus=all -p 6333:6333 -p 6334:6334 \
-v "$(pwd)/qdrant_storage:/qdrant/storage" \
-e QDRANT__GPU__INDEXING=1 \
qdrant/qdrant:gpu-nvidia-latest
๐ก On Windows PowerShell, use
$(pwd)
or provide the absolute path.
๐ฆ Starting the Server
fastmcp run main.py --host 0.0.0.0 --port 4200 --transport http
๐ง Integration with MCP
This server is designed to serve as a custom MCP server backend.
In your MCP-compatible LLM agent config (e.g., fastmcp
), define the MCP server as:
{
"name": "hybrid_search",
"url": "http://localhost:4200/query",
"description": "Search documents and the web",
"input_schema": {
"tenant_id": "string",
"query": "string"
}
}
๐ Project Structure
Qdrant-SerpAPISearch-MCP-Server/
โ
โโโ main.py # FastAPI app entry point
โโโ controller/ # Handles ingestion and querying logic
โโโ services/ # Document parser, Qdrant interface, SerpAPI fetcher
โโโ models/ # Pydantic models
โโโ utils/ # Utility functions
โโโ .env # Environment variables
โโโ requirements.txt
โโโ README.md
๐งช Running Tests
(Tests not yet implemented) โ You can add Pytest-based unit tests under a /tests
directory.
๐ TODO
- Add authentication and rate-limiting
- Stream response support for LLM-friendly output
- File type validation and conversion pipeline
- Improve ranking of hybrid results
๐ค Acknowledgements
๐ฌ Contact
Built by @raj-dash. Feel free to open issues or pull requests!