FieldCure.Mcp.Rag
2.4.1
See the version list below for details.
{ "servers": { "FieldCure.Mcp.Rag": { "type": "stdio", "command": "dnx", "args": ["FieldCure.Mcp.Rag@2.4.1", "--yes"] } } }
.vscode/mcp.json settings file.
dotnet tool install --global FieldCure.Mcp.Rag --version 2.4.1
dotnet new tool-manifest
dotnet tool install --local FieldCure.Mcp.Rag --version 2.4.1
#tool dotnet:?package=FieldCure.Mcp.Rag&version=2.4.1
nuke :add-package FieldCure.Mcp.Rag --version 2.4.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 | 99 | 5/25/2026 |
| 2.5.0 | 103 | 5/7/2026 |
| 2.4.4 | 101 | 5/6/2026 |
| 2.4.3 | 100 | 5/6/2026 |
| 2.4.2 | 111 | 4/28/2026 |
| 2.4.1 | 100 | 4/28/2026 |
| 2.4.0 | 87 | 4/28/2026 |
| 2.3.2 | 94 | 4/27/2026 |
| 2.3.1 | 99 | 4/27/2026 |
| 2.3.0 | 99 | 4/27/2026 |
| 2.2.0 | 106 | 4/25/2026 |
| 2.1.1 | 104 | 4/21/2026 |
| 2.1.0 | 98 | 4/20/2026 |
| 2.0.0 | 111 | 4/17/2026 |
| 1.5.0 | 102 | 4/16/2026 |
| 1.4.2 | 109 | 4/15/2026 |
| 1.4.1 | 110 | 4/15/2026 |
| 1.4.0 | 108 | 4/14/2026 |
| 1.3.1 | 116 | 4/8/2026 |
| 1.3.0 | 105 | 4/8/2026 |
v2.4.1: Republished against FieldCure.DocumentParsers.Audio v0.3.1 to ship the WAVE_FORMAT_EXTENSIBLE fix — multi-channel WAV inputs (Windows capture pipelines, modern DAW exports, any WAV with more than two channels) now transcribe successfully where v2.4.0 threw ArgumentException at the resampler. PackAsTool freezes the Audio assembly into the tool nupkg, so v2.4.0's Audio="0.3.*" pin only takes effect at pack time on the maintainer side; end users must update to v2.4.1 to receive the fix. No code or behavior change in the Mcp.Rag layer itself.