fieldcure-mcp-rag: Instructions file for Claude Code

CLAUDE.md

fieldcure-mcp-rag CLAUDE.md is an instructions file for Claude Code from fieldcure/fieldcure-mcp-rag. It costs 2,834 tokens per session, scanned A, original, MIT.

Repository instructions for a C# MCP server that indexes documents and provides keyword and meaning-based search. A knowledge base is a searchable collection of documents, and MCP connects the server to AI applications.

In plain words
What is it for?
It is for building, testing, packaging, indexing, and serving the FieldCure document-search server.
Why use it?
It gives the coding agent the project's purpose, separate indexing and serving modes, build commands, and test commands in one place.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is fieldcure/fieldcure-mcp-rag's own configuration. It tells Claude Code how to work on fieldcure-mcp-rag itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything fieldcure-mcp-rag configures →

Reuse

Borrowing it

Nothing to install: this file belongs to fieldcure/fieldcure-mcp-rag. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/fieldcure/fieldcure-mcp-rag/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/fieldcure/fieldcure-mcp-rag

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fieldcure-mcp-rag CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/fieldcure/fieldcure-mcp-rag/claude-md/github.svg)](https://agentmods.dev/instructions/fieldcure/fieldcure-mcp-rag/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/fieldcure/fieldcure-mcp-rag/claude-md"><img src="https://agentmods.dev/badge/instructions/fieldcure/fieldcure-mcp-rag/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fieldcure-mcp-rag CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/fieldcure/fieldcure-mcp-rag/claude-md"><img src="https://agentmods.dev/badge/instructions/fieldcure/fieldcure-mcp-rag/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,834 This file is loaded in full into every session.
When invoked 2,834 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02834 $0.02834
Opus 5 $0.01417 $0.01417
Sonnet 5 $0.00567 $0.00567
Haiku 4.5 $0.00283 $0.00283

Measured 9d ago against content hash 5e53e2d903fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

fieldcure-mcp-rag CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

FieldCure.Mcp.Rag is a C# MCP server distributed as a dotnet tool (PackAsTool). It indexes a folder of documents into a per-KB SQLite store with FTS5 + vector embeddings, then serves hybrid keyword + semantic search to MCP-compatible hosts (Claude Desktop, AssistStudio, etc.) over stdio.

Two execution modes:

  • fieldcure-mcp-rag exec --path <kb-path> [--force] — headless indexing process
  • fieldcure-mcp-rag serve --path <kb-path> — search-only MCP server

Indexing and serving are deliberately separate processes: indexing is heavy (AI contextualization, embedding generation, optional audio transcription) and an MCP host is not a sensible place to run it. The two modes share the same on-disk store.

Build & test commands

# Build
dotnet build

# Run all tests (185 tests, MSTest)
dotnet test

# Run a single test project
dotnet test tests/FieldCure.Mcp.Rag.Tests

# Run a single test by name
dotnet test --filter "FullyQualifiedName~HybridSearcherTests.SearchAsync_ReturnsRrfRanked"

# Pack the tool nupkg (artifacts/)
dotnet pack -c Release -o artifacts

net8.0 only (downstream FieldCure.DocumentParsers multi-targets net8.0/net10.0; the tool is pinned to net8.0 to match the broadest dotnet-tool installation footprint).

Repository layout

fieldcure-mcp-rag/
├── src/FieldCure.Mcp.Rag/
│   ├── Program.cs                     ← exec / serve dispatch
│   ├── ExecQueueRunner.cs             ← headless indexing loop
│   ├── OrphanCleanupRunner.cs         ← removes chunks for files no longer present
│   ├── MultiKbContext.cs              ← per-KB path + config resolution
│   ├── McpJson.cs                     ← MCP envelope helpers
│   ├── LazyAudioTranscriber.cs        ← deferred Whisper init (Windows-only)
│   ├── LazyOcrEngine.cs               ← deferred Tesseract init (Windows-only)
│   ├── Configuration/                 ← config.json schema, CredentialService (Windows PasswordVault)
│   ├── Chunking/                      ← Korean-aware sentence splitter
│   ├── Contextualization/             ← IChunkContextualizer + OpenAI / Anthropic / Null impls
│   ├── Embedding/                     ← OpenAI-compatible embedding client
│   ├── Storage/                       ← Sqlite schema, migrations, chunk store
│   ├── Search/                        ← BM25 (FTS5), vector cosine, RRF, HybridSearcher
│   ├── Indexing/                      ← IndexingEngine, file discovery, SHA-256 incremental
│   └── Tools/                         ← MCP tool handlers (search_documents, get_document_chunk, get_index_info)
├── tests/FieldCure.Mcp.Rag.Tests/     ← MSTest, 185 tests
├── scripts/publish-nuget.ps1          ← pack → sign → push
├── RELEASENOTES.md                    ← per-release changelog
└── design/                            ← internal design docs (gitignored)

Read the full file on GitHub · 151 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 151 lines · 2,834 tokens per session scan A 5e53e2d903fc

Subscribe to this mod's changes

fieldcure-mcp-rag CLAUDE.md is an instructions file published in the GitHub repository fieldcure/fieldcure-mcp-rag (0 stars, last pushed 3mo ago), licensed MIT. It adds 2,834 tokens to every session, about $0.0142 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories