MCP RAG server with hybrid search, multi-KB support, and AI-powered chunk contextualization.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Model Context Protocol (MCP) server for indexing and searching local document collections. Supports DOCX, HWPX, PDF (with OCR), Excel, PowerPoint, and audio (Whisper transcription, Windows-only), with hybrid keyword + semantic search optimized for Korean and English.
Built with C# and the official MCP C# SDK.
kb_id parameter. Can run while exec is indexing (SQLite WAL).--partial re-runs only downstream stages when models change, preserving OCR output.--sweep-all processes deferred entries too (used at app shutdown).., _ prefix, -backup-) are never touched.0 on a non-empty result. Surfaces DllNotFoundException / BadImageFormatException distinctly so a missing or arch-mismatched native is immediately visible. Useful for verifying that the OCR native path is wired correctly on a given host (notably win-arm64 dnx installs).System.Numerics.Vector[math: LaTeX] blocks.mp3, .wav, .m4a, .ogg, .flac, .webm) via Whisper.net โ Windows-only. Model size (TinyโLarge) is auto-selected from detected GPU/RAM/cores at startup; each transcript chunk records audio.model_size and audio.transcribed_at for future reindex auditingstart_reindex MCP tool โ no direct exec spawnorchestrator.lock)prune-orphans physical cleanup--sweep-all)cancel fileconfig.json with provider configuration/api/embed, contextualization via /api/chat with keep_alive and num_ctx support. Requires Ollama 0.4.0+./v1/embeddings, contextualization via /v1/chat/completions. Works with OpenAI, Azure OpenAI, Groq, LM Studio, Together AI./v1beta/models/{model}:embedContent with task_type asymmetric retrieval (RETRIEVAL_DOCUMENT / RETRIEVAL_QUERY) and Matryoshka dimension truncation (768 / 1536 / 3072). gemini-embedding-2, multilingual, 8k token input./v1/messages.OPENAI_API_KEY, ANTHROPIC_API_KEY, etc. Batch indexing commands (exec, exec-queue) are env-var-only. Interactive MCP search can fall back to MCP elicitation when the client supports it.Standard RAG chunking loses context โ a sentence about "the protocol" becomes ambiguous when ripped from its surrounding paragraphs. This server addresses that with Unified Chunk Contextualization: a single LLM call per chunk that produces both contextual framing and bilingual (Korean + English) keywords in one pass.
The result is stored alongside the original chunk text:
This is enabled by setting contextualizer in config.json. It can be disabled (set provider/model to empty) if you prefer raw chunk indexing.
The exec command runs a 5-stage pipeline per file:
For large files, Stage 1 alone can take 20+ minutes โ OCR on a 596-page scanned PDF, or Whisper transcription of a multi-hour audio recording. The first audio file in any KB also pays a one-time ggml model download (cached under {UserProfile}/.fieldcure/whisper-models/). To prevent expensive upstream work from being lost when later stages fail, the pipeline uses a 2-commit model:
Why this matters: A 25-minute OCR result is persisted on disk before any embedding API call. If Stage 4 fails (network error, rate limit, token limit, process crash, even power loss), the chunks survive. The next exec hash-skips the file (no OCR re-run) and the deferred retry pass attempts only Stage 4.
If a single chunk in a file exceeds the embedding model's token limit (e.g., a math-dense page in a textbook), the binary split algorithm isolates that one chunk:
Result: 1249 chunks indexed, only chunk 846 marked Failed. The file's status becomes Degraded โ partially searchable instead of completely missing.
Each exec ends with a retry pass over any chunks left in PendingEmbedding state from previous runs:
Failed| Status | Meaning | Hash-skip behavior |
|---|---|---|
Ready | Fully indexed | Skip if hash matches |
Degraded | Some chunks failed (binary-split isolated) | Skip if hash matches |
PartiallyDeferred | Chunks pending embedding retry | Main loop skips; deferred pass picks up |
Failed | Extraction or repeated embedding failure | Skip; requires --force to retry |
NeedsAction | User intervention required | Skip with separate counter |
Each KB DB carries a PRAGMA user_version tag. The exec command migrates older schemas automatically as part of InitializeSchema(). The serve command opens DBs read-only and never triggers migration โ older-schema KBs continue to serve search queries correctly while their new-feature columns remain unused.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/rag)<a href="https://allmcps.com/mcp/rag"><img src="https://allmcps.com/api/badge/rag?style=directory" alt="Rag on AllMCPs" /></a>