FieldCure.Mcp.Rag 1.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global FieldCure.Mcp.Rag --version 1.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local FieldCure.Mcp.Rag --version 1.3.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=FieldCure.Mcp.Rag&version=1.3.0
                    
nuke :add-package FieldCure.Mcp.Rag --version 1.3.0
                    

FieldCure.Mcp.Rag

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 via OpenAI-compatible APIs, and performs keyword (FTS5) and semantic (cosine similarity) search with Reciprocal Rank Fusion.

Install

dotnet tool install -g FieldCure.Mcp.Rag

Architecture

fieldcure-mcp-rag
├── exec  --path <kb-path> [--force]   # Headless indexing (single KB)
└── serve --base-path <path>           # Multi-KB MCP search server (stdio)
  • exec — headless indexing process. Scans source paths, chunks, contextualizes, embeds, stores.
  • serve — read-only MCP server serving all KBs under the base path. Tools accept kb_id parameter to target a specific KB. Lazy-loads KB instances on first access.

Both modes read config.json from the knowledge base folder and resolve API keys from Windows PasswordVault.

Quick Start

1. Create a knowledge base

Create %LOCALAPPDATA%\FieldCure\Mcp.Rag\{kb-id}\config.json:

{
  "id": "my-kb-001",
  "name": "Project Docs",
  "created": "2026-04-03T00:00:00Z",
  "sourcePaths": ["C:\\Users\\me\\Documents\\project-docs"],
  "contextualizer": {
    "provider": "anthropic",
    "model": "claude-haiku-4-5-20251001",
    "apiKeyPreset": "Claude"
  },
  "embedding": {
    "provider": "openai",
    "model": "text-embedding-3-small",
    "apiKeyPreset": "OpenAI"
  }
}

2. Index

fieldcure-mcp-rag exec --path "%LOCALAPPDATA%\FieldCure\Mcp.Rag\my-kb-001"

3. Search (MCP server)

fieldcure-mcp-rag serve --base-path "%LOCALAPPDATA%\FieldCure\Mcp.Rag"

A single serve process handles all knowledge bases under the base path.

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "rag": {
      "command": "fieldcure-mcp-rag",
      "args": ["serve", "--base-path", "C:\\Users\\me\\AppData\\Local\\FieldCure\\Mcp.Rag"]
    }
  }
}

Tools (5)

All tools (except list_knowledge_bases) require a kb_id parameter.

Tool Description
list_knowledge_bases List all available KBs with status (file/chunk counts, indexing status)
search_documents Hybrid BM25 + vector search with Reciprocal Rank Fusion
get_document_chunk Retrieve full content of a specific chunk by ID
get_index_info Returns index metadata (file/chunk counts, last indexed timestamp, prompt config, stale-index detection, indexing lock status). Internal — for host application use
check_changes Dry-run filesystem scan comparing source files against the index. Returns added/modified/deleted/failed file paths and counts. Internal — for host application use

Search Modes

Mode When Description
hybrid Embedding configured + query >= 3 chars BM25 keyword + vector semantic, fused via RRF
bm25_only No embedding configured FTS5 trigram keyword search only
vector_only Query tokens all < 3 chars Cosine similarity search only

Embedding is optional. Without it, BM25 keyword search still works.

Supported Formats

DOCX, HWPX, XLSX, PPTX, PDF (with OCR fallback for scanned pages), TXT, MD — auto-extends when new parsers are added to FieldCure.DocumentParsers.

config.json Reference

Field Description
id Knowledge base identifier
name Display name
sourcePaths Folders to index (multiple supported)
contextualizer.provider "anthropic", "openai", "ollama", or empty to disable
contextualizer.model Model ID, or empty to disable contextualization
contextualizer.apiKeyPreset PasswordVault preset name (e.g., "Claude", "OpenAI")
contextualizer.baseUrl API base URL override (null = provider default)
embedding.* Same structure as contextualizer
systemPrompt Custom system prompt (null = built-in default)

Data Storage

Knowledge base data at %LOCALAPPDATA%\FieldCure\Mcp.Rag\{kb-id}\:

  • config.json — knowledge base configuration (created by app)
  • rag.db — SQLite database (chunks, embeddings, FTS5 index, file hashes, indexing lock)

Requirements

See Also

Part of the AssistStudio ecosystem.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 104 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
Loading failed

v1.3.0: OCR fallback for scanned PDFs via DocumentParsers.Pdf.Ocr (Tesseract, eng+kor).