Sign In

FieldCure.Mcp.Rag

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

FieldCure.Mcp.Rag

MCP RAG server with hybrid BM25 + vector search and AI-powered chunk contextualization. Chunks documents, enriches chunks with AI-generated context and keywords, generates embeddings, and performs keyword (FTS5) and semantic (cosine similarity) search with Reciprocal Rank Fusion.

Source
nugetNuGet
Version
2.5.1
Version published
Total downloads
5K
Maintainers
1
Created
Source

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)

ToolDescription
list_knowledge_basesList all KBs with status
search_documentsHybrid BM25 + vector search (auto, bm25, vector)
get_document_chunkRetrieve full chunk content by ID
start_reindexQueue indexing request (scope merge, force/deferred, orchestrator spawn)
cancel_reindexRemove pending queue entry
get_index_infoIndex metadata + queue state (status/position/deferred/error)
check_changesDry-run filesystem scan. No API calls

config.json Reference

FieldDescription
idKnowledge base identifier
nameDisplay name
sourcePathsFolders to index
contextualizer.provider"anthropic", "openai", "ollama", or empty
contextualizer.modelModel ID
contextualizer.apiKeyPresetEnv var mapping: "OpenAI"OPENAI_API_KEY
embedding.*Same structure as contextualizer
embedding.keepAliveOllama: VRAM retention (default "5m")
embedding.numCtxOllama: context window (default 8192, contextualizer only)
systemPromptCustom 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

See Also

Part of the AssistStudio ecosystem.

Keywords

mcp

FAQs

Package last updated on 25 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts