# Ragmir [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/jcode-works/jcode-ragmir  
**GitHub Stars:** 6  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/jcode-labs-ragmir

## Description
Open-source retrieval for agentic RAG: local document search, exact citations, OCR, CLI, MCP, and TypeScript.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ragmir": {
    "command": "npx",
    "args": ["-y","rgr"]
  }
}
```

## Documentation

## What Ragmir does

Ragmir creates a local retrieval index for code and documents used by coding agents. Supported material includes source files, specifications, Office documents, PDFs, EPUBs, and scanned documents when local OCR is configured. Agents can query the index through MCP, while developers can also use the `rgr` command-line interface or the TypeScript API.

Search results are designed to remain verifiable. Citations can identify source lines, PDF pages, presentation slides, spreadsheet cells, or EPUB sections. Results also report whether a file changed after indexing and can mark evidence as weak. When indexed sources do not support an answer, retrieval can return no result rather than unrelated passages.

Ragmir keeps project bases separate and can warn or refuse work against an unrelated workspace. Local state is stored under `.ragmir/`, while a committed `ragmir.config.json` can share source and indexing settings with a team.

## How it works

The search system combines BM25 and vector retrieval. It accounts for paths and camelCase identifiers and gives additional weight to code that defines the requested behavior. The default `local-hash` provider works offline without downloading a model. Semantic retrieval can be enabled with local Hugging Face Transformers and an approved model download.

Run `rgr doctor` to compare files on disk with the index. Git hooks installed with `rgr hooks install` can refresh the index after commits, merges, and checkouts. Ragmir normalizes cited paths across Linux, macOS, and Windows, including Unicode forms used in exclusions.

A typical query flow uses `ragmir_search` for compact cited results and `ragmir_expand` when the agent needs one exact passage. The consuming agent or application decides where retrieved source text is sent.

## Setup and configuration

Ragmir requires Node.js 22.12 or later. Install the package as a development dependency with the project’s package manager, then initialize it for selected agents:

```bash
pnpm add -D @jcode.labs/ragmir
pnpm exec rgr setup --no-ingest --agents claude,codex
pnpm exec rgr sources add "docs/**/*.md" "specs/**/*.docx" "src/**/*.ts"
pnpm exec rgr ingest
```

The setup command accepts `claude`, `codex`, `kimi`, `opencode`, and `cline`, or a comma-separated list. `rgr setup` can also connect selected agents after indexing. Use `rgr preview --json` and `rgr audit --unsupported` to inspect source coverage, skipped files, duplicates, chunk structure, and citation coordinates before ingestion.

Configure narrow relative source globs and exclusions for credentials, generated files, dependencies, caches, logs, vendored code, and Ragmir storage. Scanned PDFs require local OCR setup through `rgr ocr doctor` and `rgr ocr setup`. Ragmir preserves indexed source text without masking, so client, transport, model, and log access should be controlled for confidential repositories.

## Tools and capabilities

- Search indexed project content with `ragmir_search` and receive compact citations.
- Expand a result into one exact passage with `ragmir_expand`.
- Index code, Markdown, Office files, PDFs, EPUBs, and other configured sources.
- Retrieve evidence tied to lines, pages, slides, spreadsheet cells, or EPUB sections.
- Inspect the owning base with `rgr bases --json` or `ragmir_status`.
- Refresh indexes after Git operations with installed hooks.
- Use the CLI, MCP interface, or TypeScript API for retrieval.

Ragmir runs on Linux, macOS, and Windows. It has no account, telemetry, or hosted storage in its default local setup. The project is available under AGPL-3.0-only, with a separate commercial license option.

_Full upstream README: https://allmcps.com/mcp/jcode-labs-ragmir/readme_

