All work
Search engine · MCP server

KBÜ MCP — University search engine

An open-source hybrid search engine that indexes 140+ Karabük University websites and thousands of documents, exposed to AI assistants via MCP.

My role
Design, development, evaluation and docs — solo
Year
2026
Stack
Python · PostgreSQL · pgvector · bge-m3
%96
accuracy (recall@5)
140+
indexed sites
10
MCP tools
MIT
open source

The problem

University information is scattered across dozens of sub-sites, scanned PDFs and spreadsheets. Finding a cafeteria fee or a regulation clause takes minutes, and general AI assistants answer these questions by making things up.

What I built

  1. A resumable job queue crawling every *.karabuk.edu.tr domain, documents, academic profiles (UNIS) and news.
  2. Extractors that turn everything into clean Markdown: template chrome removed, PDF tables preserved, scanned documents OCR’d ahead of time.
  3. Hybrid search combining keyword (Turkish stemming, BM25F) and semantic search (pgvector, bge-m3), ranked by relevance and recency.
  4. A remote MCP server for Claude, Cursor, Codex or an in-house model, with tools for search, document reading, academic profiles, menus, calendar and phone directory.
  5. Grounding rules that make the model answer only from sources, with links and dates.

How it works

  1. 140+ sitespages, PDF, Excel
  2. Job queuerate-limited, resumable
  3. ExtractorsMarkdown + OCR
  4. PostgreSQLBM25F + pgvector
  5. MCP serverClaude · Cursor · Codex

Key decisions

  1. I merged both search methods with Reciprocal Rank Fusion: keyword wins for exact phrases, vectors win for meaning.
  2. OCR runs at index time, not query time, so users never wait on scanned documents.
  3. Accuracy is measured, not guessed: recall@5 = 96% on an evaluation set I built.
  4. Production-ready with API-key auth, rate limits and error logs; one-command setup with Docker Compose.

Stack

PythonPostgreSQLpgvectorbge-m3OCRMCPDocker Compose

Need something similar?

Let's talk about your project