FieldCure.Mcp.Rag
2.5.0
{ "servers": { "FieldCure.Mcp.Rag": { "type": "stdio", "command": "dnx", "args": ["FieldCure.Mcp.Rag@2.5.0", "--yes"] } } }
.vscode/mcp.json settings file.
dotnet tool install --global FieldCure.Mcp.Rag --version 2.5.0
dotnet new tool-manifest
dotnet tool install --local FieldCure.Mcp.Rag --version 2.5.0
#tool dotnet:?package=FieldCure.Mcp.Rag&version=2.5.0
nuke :add-package FieldCure.Mcp.Rag --version 2.5.0
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.0 | 92 | 5/7/2026 |
| 2.4.4 | 94 | 5/6/2026 |
| 2.4.3 | 94 | 5/6/2026 |
| 2.4.2 | 105 | 4/28/2026 |
| 2.4.1 | 94 | 4/28/2026 |
| 2.4.0 | 83 | 4/28/2026 |
| 2.3.2 | 90 | 4/27/2026 |
| 2.3.1 | 94 | 4/27/2026 |
| 2.3.0 | 93 | 4/27/2026 |
| 2.2.0 | 99 | 4/25/2026 |
| 2.1.1 | 99 | 4/21/2026 |
| 2.1.0 | 94 | 4/20/2026 |
| 2.0.0 | 107 | 4/17/2026 |
| 1.5.0 | 99 | 4/16/2026 |
| 1.4.2 | 102 | 4/15/2026 |
| 1.4.1 | 103 | 4/15/2026 |
| 1.4.0 | 102 | 4/14/2026 |
| 1.3.1 | 111 | 4/8/2026 |
| 1.3.0 | 99 | 4/8/2026 |
| 1.2.1 | 101 | 4/8/2026 |
v2.5.0: ARM64 dnx support + Audio 0.4 effective-model reporting. Picks up FieldCure.DocumentParsers.Ocr 1.2.0 which adds the multi-arch tool layout (tools/<tfm>/any/x64/ + tools/<tfm>/any/arm64-platform/x64/) and a runtime CustomSearchPath router, so this tool nupkg now installs and runs cleanly under dnx on both win-x64 and win-arm64 from a single package. Picks up FieldCure.DocumentParsers.Audio 0.4 and has LazyAudioTranscriber implement the new IModelSizeReporting capability — the rendered transcript header now reflects the effective model size that was actually used (e.g., "| Model | large |") instead of the caller-requested size we were reporting through 2.4.4. Chunk-level audio metadata (audio.model_size in the chunk JSON) is unchanged — the fix is the in-transcript header only. Adds a smoke-ocr diagnostic CLI mode (fieldcure-mcp-rag smoke-ocr --pdf <scanned.pdf>) used by the new manual arm64-dnx-smoke.yml workflow to validate the cross-arch deployment path on a windows-11-arm runner. The OCR PackageReference Version is now parameterizable via the OcrPackageVersion MSBuild property (default "1.*") so future preview pins can be supplied without csproj edits.