Skip to main content
Glama
weatherills

MCP-PersonalSearch

by weatherills

MCP-PersonalSearch

An MCP server designed to give the model access to the same data the operator has available during their normal interactive sessions.

Currently implemented: Phase 1 of the project PRD — the local documentation pipeline (raw store → markdown extraction → chunking → FTS5 index → CLI) for GitLab-hosted docs-as-code repositories. The MCP server itself (Streamable HTTP, search_docs/get_section/etc.) is Phase 2 and not yet built.

Setup

python -m venv .venv
.venv/Scripts/activate   # or `source .venv/bin/activate` on Linux/macOS
pip install -e ".[dev]"

Copy config.example.toml to config.toml and point [[sources]] at your repo(s):

[[sources]]
id = "eng-docs"
type = "gitlab_repo"
repo_url = "https://gitlab.example.com/team/docs.git"
branch = "main"
globs = ["docs/**/*.md", "README.md"]

Related MCP server: Gemini Docs MCP Server

Usage

docsrag ingest --source eng-docs        # clone/fetch + index; safe to re-run, skips unchanged files
docsrag search "your question here"     # lexical (BM25) search over the indexed corpus
docsrag reindex                         # rebuild sections/chunks/FTS from the raw store, fully offline
docsrag status                          # per-source document counts and last run
docsrag eval --set eval/questions.json  # recall@k / MRR against a labelled question set (PRD §7.2)

corpus.db (the indexed documentation) and instance.db (query log, job history) are written under data/ by default and are gitignored — see PRD §12 on why the corpus must never be shared, exported, or synced.

eval/questions.json is also gitignored, for the same reason: real questions are grounded in whatever you actually ingested and can embed internal content. Copy eval/questions.example.json to eval/questions.json and fill it in with {"query": ..., "section_id": ...} pairs from your own corpus (section_id values come from docsrag search output).

Tests

pytest

Related MCP Connectors

Related MCP Servers