Ragmir
Searches your own code, PDFs and Office files and returns exact source citations
- Pricing
- Open source
- Platforms
- CLI, self-hosted, macOS
- Runs
- Locally
- Version
- 6.15.2
- Listing updated
- 3 days ago
About Ragmir
Ragmir is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
Ragmir builds a local index of the files you choose and answers retrieval requests with the passages and where they came from. The README says it does not bundle a chat model or host documents; your agent writes the answer with the model you pick.
The MCP server exposes four read-only tools. Search handles one question or up to five related ones sharing a budget, expand opens more context, status describes the base, and audit checks it. Passages already returned in a session come back as short stubs, and the server warns or refuses when an agent works outside the project it serves.
Search is hybrid BM25 plus vectors, aware of paths and camelCase names. The project reports 94% of real developer questions finding the right file in the top 10, with a 36 ms median on a 30,171-chunk monorepo. It needs Node.js 22.12 or newer and runs offline by default.
Install
Run in a terminal
claude mcp add ragmir --env RAGMIR_PROJECT_ROOT='<RAGMIR_PROJECT_ROOT>' -- npx -y @jcode.labs/ragmirAdd to claude_desktop_config.json
{
"mcpServers": {
"ragmir": {
"command": "npx",
"args": [
"-y",
"@jcode.labs/ragmir"
],
"env": {
"RAGMIR_PROJECT_ROOT": "<RAGMIR_PROJECT_ROOT>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"ragmir": {
"command": "npx",
"args": [
"-y",
"@jcode.labs/ragmir"
],
"env": {
"RAGMIR_PROJECT_ROOT": "<RAGMIR_PROJECT_ROOT>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"ragmir": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@jcode.labs/ragmir"
],
"env": {
"RAGMIR_PROJECT_ROOT": "<RAGMIR_PROJECT_ROOT>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"ragmir": {
"command": "npx",
"args": [
"-y",
"@jcode.labs/ragmir"
],
"env": {
"RAGMIR_PROJECT_ROOT": "<RAGMIR_PROJECT_ROOT>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"ragmir": {
"command": "npx",
"args": [
"-y",
"@jcode.labs/ragmir"
],
"env": {
"RAGMIR_PROJECT_ROOT": "<RAGMIR_PROJECT_ROOT>"
}
}
}
}Configuration
RAGMIR_PROJECT_ROOTAbsolute path of the project whose Ragmir base the server readsRequired
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
- ragmir_search
- Search one question or up to five related ones with citations
- ragmir_expand
- Expand a returned passage
- ragmir_status
- Report on the served knowledge base
- ragmir_audit
- Audit the index
What it does
- Exact citations
- Results point to source lines or page, slide, sheet and cell positions.
- Hybrid search
- BM25 and vectors that understand paths and identifiers.
- Weak-evidence flags
- Marks thin support and changed files instead of padding answers.
- Local and offline
- Index and search run in one Node.js process.
- Four read-only tools
- Search, expand, status and audit; nothing is modified.
- Git hooks
- Optional hooks refresh the index after commits and checkouts.
Good for
- Ground a coding agent in specs and ADRs
- Diagnose an incident from runbooks and source
- Prepare an API migration with cited constraints
- Run private retrieval on an offline server
Pricing
Open source
Open source; no account, key or telemetry
Prices change. Check ragmir.com before you buy.
Ragmir FAQ
What file types can it index?
Code, PDFs, Word and other Office files, plus EPUB, with citations by native location.
Does it need an API key or account?
No. Local-hash retrieval needs no account, key or model download.
What does it need to run?
Node.js 22.12 or later, and the RAGMIR_PROJECT_ROOT environment variable pointing at the project.
Can I use it outside MCP?
Yes, through the rgr command line or a TypeScript library.
Is Ragmir free?
Yes. Ragmir is open source, so you can use and self-host it for free.
How do I add Ragmir to Claude Code?
Run this command in your terminal: claude mcp add ragmir --env RAGMIR_PROJECT_ROOT='<RAGMIR_PROJECT_ROOT>' -- npx -y @jcode.labs/ragmir
What are the best alternatives to Ragmir?
The closest alternatives to Ragmir are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to Ragmir

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools