mcp-local-rag
Local-first RAG server for developers with semantic and keyword search capabilities.
GraphCanon updated 2d · GitHub synced 2d
Decision brief
mcp-local-rag is designed for developers who prioritize privacy and ease of setup when performing semantic and keyword searches on local codebases and technical documents through MCP or CLI integration.
Good fit when
- When you need to perform both semantic and keyword-based search operations within a local, privacy-focused environment tailored specifically for handling codebases and technical documentation.
- If your project requires minimal setup yet offers robust search capabilities using the MCP or CLI methods of interaction with RAG services.
Avoid when
- When you do not require a privacy-first approach and are willing to rely on cloud-based solutions that might offer more extensive feature sets beyond just keyword and semantic searches.
- If your use case involves scaling search capabilities across multiple remote databases or servers, as mcp-local-rag is best suited for local data only.
Observed Jul 17, 2026 · Source: enrich:decision_facts
Verify the decision
Adoption
Package downloads where a registry match exists. GitHub stars (370) are secondary evidence.
- npm downloads (30d)
- 14,021·npm downloads API·2d
Maintenance and security
Full trust report- Maintenance
- Very active (0d since push)
- As of 2d
- Provenance
- Not a fork · Personal account
- As of 2d
- Security (OSV)
- No criticals
- As of 2w
Public GitHub metadata and optional OSV scans. Signals, not a guarantee. Trust methodology.
Install
npm install mcp-local-rag npmHow it fits your stack(1)
Typed graph edges - alternatives, integrations, successors, and dependencies. Ranked by relationship type, not raw GitHub stars.
Relationship graph
Optional deeper exploration of typed edges and category neighbours.
Similar tools
Same-category neighbours not already linked as typed edges.
Evidence and technical details
Sourced facts, taxonomy, compatibility claims, README excerpt, and machine-readable endpoints.
Overview
Provides a privacy-focused, easy-to-setup environment for semantic and keyword-based searches within codebases and technical documents. Supports integration through MCP or CLI.
Capability facts
- CLI
- CLI entrypoint
Source: package.json:bin|scripts · Aug 23, 2026
- MCP server
- Ships MCP server
Source: package.json:@modelcontextprotocol/* · Aug 23, 2026
- Languages
- typescript, javascript
Source: github.language+package.json · Aug 23, 2026
Categories
Compatibility
Sourced claims from the README excerpt - not unsourced marketing copy.
Source: README excerpt (regex_v1, Aug 23, 2026)
- Node.js 22 or laterSource link
Source: README excerpt (regex_v1, Aug 23, 2026)
mcp-local-rag uses the standard MCP protocol over a local stdio server, so it works with AISource link
Source: README excerpt (regex_v1, Aug 23, 2026)
**For Cursor:** Add to `~/.cursor/mcp.json`:Source link
Tags
README
Requirements
- Node.js 22 or later
- Internet access on first use to download the npm package and embedding model
- A directory containing the documents you want to search
Set BASE_DIR to that directory. It is also the security boundary for file operations. Replace
/absolute/path/to/your/documents below with the directory's absolute path.
mcp-local-rag uses the standard MCP protocol over a local stdio server, so it works with AI coding tools and other MCP hosts that support local MCP servers.
Use one of the examples below, or register npx -y mcp-local-rag and set BASE_DIR using your
client's MCP configuration format.
For Claude Code: Run this command:
claude mcp add local-rag --scope user --env BASE_DIR=/absolute/path/to/your/documents -- npx -y mcp-local-rag
For Codex: Add to ~/.codex/config.toml:
[mcp_servers.local-rag]
command = "npx"
args = ["-y", "mcp-local-rag"]
[mcp_servers.local-rag.env]
BASE_DIR = "/absolute/path/to/your/documents"
For OpenCode: Add to ~/.config/opencode/opencode.json (or opencode.jsonc):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"local-rag": {
"type": "local",
"command": ["npx", "-y", "mcp-local-rag"],
"environment": {
"BASE_DIR": "/absolute/path/to/your/documents"
}
}
}
}
For Cursor: Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"local-rag": {
"command": "npx",
"args": ["-y", "mcp-local-rag"],
"env": {
"BASE_DIR": "/absolute/path/to/your/documents"
}
}
}
}
Restart the client, then ask it to build the index:
Sync all documents in the configured root and wait until it finishes.
The first sync downloads the default embedding model (about 90 MB) and may take 1–2 minutes before ingestion starts. Later runs use the local cache.
Once the sync completes:
What does the API documentation say about authentication?
CLI Quick Start
To use the CLI without an MCP client:
npx mcp-local-rag ingest ./docs/
npx mcp-local-rag query "authentication API"
The CLI uses the current directory as its document root by default. Run both commands from the
same directory so they use the same default index, or set BASE_DIR and DB_PATH explicitly.
License
MIT License. Free for personal and commercial use.
For agents
This page has a .md twin and JSON over the API.