Ragmir logo

Ragmir

Indexes local code and documents for MCP agents, returning searchable passages with file, line, page, slide, cell, or section citations.

Install Ragmir

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "jcode-labs-ragmir": {
      "command": "npx",
      "args": [
        "-y",
        "rgr"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command didn't complete successfully in our automated test.

npx -y rgr

m error 404 npm error 404 'rgr@*' is not in this registry. npm error 404 npm error 404 Note that you can also install from a npm error 404 tarball, folder, http url, or git url. npm notice npm notice New major version of npm available! 10.9.9 -> 12.2.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.2.1 npm notice To update run: npm install -g npm@12.2.1 npm notice npm error A complete log of this run can be found in: /home/user/.npm/_logs/2026-11-04T14_19_17_148Z-debug-0.log

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Ragmir MCP server builds a local search index across source code, specifications, and office documents, then exposes retrieval through MCP, the `rgr` CLI, or a TypeScript API. Its results include citations that agents can verify against source lines, PDF pages, slides, spreadsheet cells, or EPUB sections. Hybrid BM25 and vector search, optional local OCR, and local status checks support repositories where code and surrounding documents need to be searched together. Reach for Ragmir when an agent needs project-scoped, offline-first retrieval with compact evidence instead of repeatedly injecting whole files.

Use cases

  • Index code and specifications for project-scoped agent questions
  • Search scanned PDFs with locally configured OCR
  • Return citations an agent can verify before using retrieved evidence
  • Refresh a repository index after commits, merges, and checkouts
  • Inspect source coverage and unsupported files before ingestion

Key features

  • Hybrid BM25 and vector retrieval
  • Citations for lines, pages, slides, cells, and EPUB sections
  • Local indexing with offline-first defaults
  • Optional local OCR for scanned PDFs
  • MCP, CLI, and TypeScript access
  • Workspace status and Git hook refresh support

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 41d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · rgr (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Install checkInconclusiveInstall command did not finish in our automated test.

How Ragmir works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Ragmir

Ragmir is an MCP server that connects agents to a local index of project code, specifications, and documents. Its main tools are `ragmir_search` for compact cited results and `ragmir_expand` for retrieving an exact passage. Citations can identify lines, pages, slides, spreadsheet cells, or EPUB sections.

Install Ragmir as a development dependency with your project’s package manager, then run its setup command. With pnpm, use `pnpm add -D @jcode.labs/ragmir` followed by `pnpm exec rgr setup --no-ingest --agents claude,codex`. Node.js 22.12 or later is required.

Add source globs, ingest them, and then query the index. For example, run `rgr sources add "docs/**/*.md" "specs/**/*.docx" "src/**/*.ts"`, followed by `rgr ingest`. Use `rgr preview --json` and `rgr audit --unsupported` to review coverage before ingestion.

Yes, Ragmir supports Claude through its setup workflow and exposes retrieval over MCP. Run `rgr setup --no-ingest --agents claude`, select project sources, ingest them, and connect the generated MCP helper or native retrieval skill for the project.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRagmir AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/jcode-labs-ragmir?style=directory)](https://allmcps.com/mcp/jcode-labs-ragmir)
HTML Embed
<a href="https://allmcps.com/mcp/jcode-labs-ragmir"><img src="https://allmcps.com/api/badge/jcode-labs-ragmir?style=directory" alt="Ragmir on AllMCPs" /></a>