FieldCure.Mcp.Rag
2.3.1
See the version list below for details.
{ "servers": { "FieldCure.Mcp.Rag": { "type": "stdio", "command": "dnx", "args": ["FieldCure.Mcp.Rag@2.3.1", "--yes"] } } }
.vscode/mcp.json settings file.
dotnet tool install --global FieldCure.Mcp.Rag --version 2.3.1
dotnet new tool-manifest
dotnet tool install --local FieldCure.Mcp.Rag --version 2.3.1
#tool dotnet:?package=FieldCure.Mcp.Rag&version=2.3.1
nuke :add-package FieldCure.Mcp.Rag --version 2.3.1
FieldCure.Mcp.Rag
Requires Ollama 0.4.0 or later when using Ollama for embedding or contextualization.
MCP RAG server with hybrid BM25 + vector search and AI-powered chunk contextualization — indexes documents from configured source paths, enriches chunks with AI-generated context and keywords, generates embeddings, and performs keyword (FTS5) and semantic (cosine similarity) search with Reciprocal Rank Fusion.
Install
dotnet tool install -g FieldCure.Mcp.Rag
Commands
fieldcure-mcp-rag
├── serve --base-path <path> # Multi-KB MCP search server (stdio)
├── exec --path <kb-path> [--force] [--partial ...] # Headless indexing
├── exec-queue --queue-file <path> [--sweep-all] # Sequential queue orchestrator
└── prune-orphans --base-path <path> # Delete orphan KB folders
- serve — read-only MCP server serving all KBs under the base path. Lazy-loads per KB.
- exec — headless indexing with 2-commit model, binary-split failure isolation, deferred retry.
- exec-queue — sequential orchestrator for queued indexing requests. No GPU contention.
- prune-orphans — deletes GUID-named folders without config.json. Protects backups.
API keys:
serve(stdio) — environment variable (OPENAI_API_KEY,ANTHROPIC_API_KEY, etc.) → MCP Elicitation fallback on the first tool call that needs a key. Session cache, max 2 re-elicits.exec/exec-queue(headless batch) — environment variable only. If unset, the run soft-fails with a clear message.
Quick Start
{
"id": "my-kb-001",
"name": "Project Docs",
"sourcePaths": ["C:\\Users\\me\\Documents\\project-docs"],
"embedding": {
"provider": "openai",
"model": "text-embedding-3-small",
"apiKeyPreset": "OpenAI"
}
}
# Index
fieldcure-mcp-rag exec --path "%LOCALAPPDATA%\FieldCure\Mcp.Rag\my-kb-001"
# Serve
fieldcure-mcp-rag serve --base-path "%LOCALAPPDATA%\FieldCure\Mcp.Rag"
Claude Desktop
{
"mcpServers": {
"rag": {
"command": "fieldcure-mcp-rag",
"args": ["serve", "--base-path", "C:\\Users\\me\\AppData\\Local\\FieldCure\\Mcp.Rag"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}
Tools (7)
| Tool | Description |
|---|---|
list_knowledge_bases |
List all KBs with status |
search_documents |
Hybrid BM25 + vector search (auto, bm25, vector) |
get_document_chunk |
Retrieve full chunk content by ID |
start_reindex |
Queue indexing request (scope merge, force/deferred, orchestrator spawn) |
cancel_reindex |
Remove pending queue entry |
get_index_info |
Index metadata + queue state (status/position/deferred/error) |
check_changes |
Dry-run filesystem scan. No API calls |
config.json Reference
| Field | Description |
|---|---|
id |
Knowledge base identifier |
name |
Display name |
sourcePaths |
Folders to index |
contextualizer.provider |
"anthropic", "openai", "ollama", or empty |
contextualizer.model |
Model ID |
contextualizer.apiKeyPreset |
Env var mapping: "OpenAI" → OPENAI_API_KEY |
embedding.* |
Same structure as contextualizer |
embedding.keepAlive |
Ollama: VRAM retention (default "5m") |
embedding.numCtx |
Ollama: context window (default 8192, contextualizer only) |
systemPrompt |
Custom contextualization prompt |
Supported Formats
DOCX, HWPX, XLSX, PPTX, PDF, TXT, MD. Scanned PDFs without a text layer fall back to Tesseract OCR on Windows only — see "Platform support" below.
Platform support
Cross-platform on Windows, Linux, macOS. Text extraction from all supported document formats works everywhere. The optional OCR package (FieldCure.DocumentParsers.Ocr, ships Tesseract native binaries) is referenced conditionally in the server's .csproj via $([MSBuild]::IsOSPlatform('Windows')), so Linux and macOS builds are pure managed code and scanned-PDF pages on those platforms yield empty text.
Requirements
- .NET 8.0 Runtime or later
See Also
Part of the AssistStudio ecosystem.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.5.1 | 41 | 5/25/2026 |
| 2.5.0 | 100 | 5/7/2026 |
| 2.4.4 | 98 | 5/6/2026 |
| 2.4.3 | 96 | 5/6/2026 |
| 2.4.2 | 108 | 4/28/2026 |
| 2.4.1 | 97 | 4/28/2026 |
| 2.4.0 | 84 | 4/28/2026 |
| 2.3.2 | 91 | 4/27/2026 |
| 2.3.1 | 96 | 4/27/2026 |
| 2.3.0 | 96 | 4/27/2026 |
| 2.2.0 | 103 | 4/25/2026 |
| 2.1.1 | 102 | 4/21/2026 |
| 2.1.0 | 96 | 4/20/2026 |
| 2.0.0 | 109 | 4/17/2026 |
| 1.5.0 | 100 | 4/16/2026 |
| 1.4.2 | 105 | 4/15/2026 |
| 1.4.1 | 104 | 4/15/2026 |
| 1.4.0 | 104 | 4/14/2026 |
| 1.3.1 | 114 | 4/8/2026 |
| 1.3.0 | 103 | 4/8/2026 |
v2.3.1: Republished against FieldCure.DocumentParsers.Audio v0.2.1. WhisperModelSize.Large now resolves to large-v2 instead of large-v3 to escape long-form transcription repetition loops. No Mcp.Rag code changes — but because Mcp.Rag is a dotnet tool that bundles its dependencies at pack time, the republish is required to deliver the Audio fix; v2.3.0 installations keep the large-v3 mapping. First indexing run after upgrade triggers a one-time download of ggml-large-v2.bin (~3 GB); the previous ggml-large-v3.bin cache is orphaned and can be deleted manually from {UserProfile}/.fieldcure/whisper-models/.