Qdrant-SerpAPISearch-MCP-Server

raj-dash/Qdrant-SerpAPISearch-MCP-Server

3.1

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

  1. Clone the Repository
git clone https://github.com/raj-dash/Qdrant-SerpAPISearch-MCP-Server.git
cd Qdrant-SerpAPISearch-MCP-Server
  1. Create a Virtual Environment
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
  1. Install Dependencies
pip install -r requirements.txt
  1. 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!