Qdrant-SerpAPISearch-MCP-Server

raj-dash/Qdrant-SerpAPISearch-MCP-Server

3.2

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!