freshcrate
Skin:/
Home > MCP Servers > mcp-local-rag

mcp-local-rag

Local-first RAG server for developers. Semantic + keyword search for code and technical docs. Works with MCP or CLI. Fully private, zero setup.

Why this rank:Strong adoptionRecent releaseHealthy release cadence

Description

Local-first RAG server for developers. Semantic + keyword search for code and technical docs. Works with MCP or CLI. Fully private, zero setup.

README

MCP Local RAG — Search below the surface.

MCP Local RAG

GitHub starsnpm version License: MIT TypeScript MCP Registry

Local RAG for developers via MCP or CLI. Semantic search with keyword boost for exact technical terms — fully private, zero setup.

Features

  • Semantic search with keyword boost Vector search first, then keyword matching boosts exact matches. Terms like useEffect, error codes, and class names rank higher—not just semantically guessed.

  • Smart semantic chunking Chunks documents by meaning, not character count. Uses embedding similarity to find natural topic boundaries—keeping related content together and splitting where topics change.

  • Quality-first result filtering Groups results by relevance gaps instead of arbitrary top-K cutoffs. Get fewer but more trustworthy chunks.

  • Runs entirely locally No API keys, no cloud, no data leaving your machine. Works fully offline after the first model download.

  • Zero-friction setup One npx command. No Docker, no Python, no servers to manage. Use via MCP, CLI, or both. Optional Agent Skills help AI assistants form better queries and interpret results.

Quick Start

Set BASE_DIR to the folder you want to search. Documents must live under it.

Add the MCP server to your AI coding tool:

For Cursor — Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "local-rag": {
      "command": "npx",
      "args": ["-y", "mcp-local-rag"],
      "env": {
        "BASE_DIR": "/path/to/your/documents"
      }
    }
  }
}

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 = "/path/to/your/documents"

For Claude Code — Run this command:

claude mcp add local-rag --scope user --env BASE_DIR=/path/to/your/documents -- npx -y mcp-local-rag

Restart your tool, then start using it:

You: "Ingest api-spec.pdf"
Assistant: Successfully ingested api-spec.pdf (47 chunks created)

You: "What does the API documentation say about authentication?"
Assistant: Based on the documentation, authentication uses OAuth 2.0 with JWT tokens.
          The flow is described in section 3.2...

Or use directly as CLI — no MCP server needed:

npx mcp-local-rag ingest ./docs/
npx mcp-local-rag query "authentication API"

That's it. No Docker, no Python, no server setup.

Why This Exists

You want AI to search your documents—technical specs, research papers, internal docs. But most solutions send your files to external APIs.

Privacy. Your documents might contain sensitive data. This runs entirely locally.

Cost. External embedding APIs charge per use. This is free after the initial model download.

Offline. Works without internet after setup.

Code search. Pure semantic search misses exact terms like useEffect or ERR_CONNECTION_REFUSED. Keyword boost catches both meaning and exact matches.

Agent reality. In practice, many AI environments mainly use tool calling. CLI support and Agent Skills make the same workflows available even without full MCP integration.

Usage

mcp-local-rag provides two interfaces: an MCP server for AI coding tools and a CLI for direct use from the terminal.

Using with MCP

The MCP server provides 6 tools: ingest_file, ingest_data, query_documents, list_files, delete_file, status.

Ingesting Documents

"Ingest the document at /Users/me/docs/api-spec.pdf"

Supports PDF, DOCX, TXT, and Markdown. The server extracts text, splits it into chunks, generates embeddings locally, and stores everything in a local vector database.

Re-ingesting the same file replaces the old version automatically.

Ingesting HTML Content

Use ingest_data to ingest HTML content retrieved by your AI assistant (via web fetch, curl, browser tools, etc.):

"Fetch https://example.com/docs and ingest the HTML"

The server extracts main content using Readability (removes navigation, ads, etc.), converts to Markdown, and indexes it. Perfect for:

  • Web documentation
  • HTML retrieved by the AI assistant
  • Clipboard content

HTML is automatically cleaned—you get the article content, not the boilerplate.

Note: The RAG server itself doesn't fetch web content—your AI assistant retrieves it and passes the HTML to ingest_data. This keeps the server fully local while letting you index any content your assistant can access. Please respect website terms of service and copyright when ingesting external content.

Searching Documents

"What does the API documentation say about authentication?"
"Find information about rate limiting"
"Search for error handling best practices"

Search uses semantic similarity with keyword boost. This means useEffect finds documents containing that exact term, not just semantically similar React concepts.

Results include text content, source file, document title, and relevance score. The document title provides context for each chunk, helping identify which document a result belongs to. Adjust result count with limit (1-20, default 10).

Managing Files

"List all files in BASE_DIR and their ingested status"   # See what's indexed
"Delete old-spec.pdf from RAG"     # Remove a file
"Show RAG server status"           # Check system health

Using as CLI

All MCP tools are also available as CLI commands — no MCP server needed:

npx mcp-local-rag ingest ./docs/               # Bulk ingest files
npx mcp-local-rag query "authentication API"    # Search documents
npx mcp-local-rag list                          # Show ingestion status
npx mcp-local-rag status                        # Database stats
npx mcp-local-rag delete ./docs/old.pdf         # Remove content
npx mcp-local-rag delete --source "https://..."  # Remove by source URL

query, list, status, and delete output JSON to stdout for piping (e.g., | jq). ingest outputs progress to stderr. Global options (--db-path, --cache-dir, --model-name) go before the subcommand. Run npx mcp-local-rag --help for details.

⚠️ The CLI does not read your MCP client config (mcp.json, config.toml, etc.). Configure the CLI via flags or environment variables as shown below.

Configuration

CLI flags — global options go before the subcommand, subcommand options go after:

npx mcp-local-rag --db-path ./my-db query "auth" --base-dir ./docs

Environment variables — set in your shell:

export DB_PATH=./my-db
export BASE_DIR=./docs
npx mcp-local-rag query "auth"

Sharing config between MCP and CLI — if your MCP client inherits shell environment variables, you can set them in your shell profile (e.g., ~/.zshrc) so both use the same values. Otherwise, set them explicitly in your MCP config as well.

export BASE_DIR=/path/to/your/documents
export DB_PATH=/path/to/lancedb

Configuration is resolved in this order:

  1. CLI flags (highest priority)
  2. Environment variables
  3. Defaults

For the full list of CLI flags, environment variables, and defaults, see Configuration.

For CLI-only setups (no MCP server), install Agent Skills so your AI assistant can form better queries and interpret results consistently.

⚠️ --model-name must match your MCP server config. Using a different embedding model against an existing database produces incompatible vectors, silently degrading search quality.

Search Tuning

Adjust these for your use case:

Variable Default Description
RAG_HYBRID_WEIGHT 0.6 Keyword boost factor. 0 = semantic only, higher = stronger keyword boost.
RAG_GROUPING (not set) similar for top group only, related for top 2 groups.
RAG_MAX_DISTANCE (not set) Filter out low-relevance results (e.g., 0.5).
RAG_MAX_FILES (not set) Limit results to top N files (e.g., 1 for single best file).

Code-focused tuning

For codebases and API specs, increase keyword boost so exact identifiers (useEffect, ERR_*, class names) dominate ranking:

"env": {
  "RAG_HYBRID_WEIGHT": "0.7",
  "RAG_GROUPING": "similar"
}
  • 0.7 — balanced semantic + keyword
  • 1.0 — aggressive; exact matches strongly rerank results

Keyword boost is applied after semantic filtering, so it improves precision without surfacing unrelated matches.

How It Works

TL;DR:

  • Documents are chunked by semantic similarity, not fixed character counts
  • Each chunk is embedded locally using Transformers.js
  • Search uses semantic similarity with keyword boost for exact matches
  • Results are filtered based on relevance gaps, not raw scores

Details

When you ingest a document, the parser extracts text based on file type (PDF via mupdf, DOCX via mammoth, text files directly).

The semantic chunker splits text into sentences, then groups them using embedding similarity. It finds natural topic boundaries where the meaning shifts—keeping related content together instead of cutting at arbitrary character limits. This produces chunks that are coherent units of meaning, typically 500-1000 characters. Markdown code blocks are kept intact—never split mid-block—preserving copy-pastable code in search results.

Each chunk goes through a Transformers.js embedding model (default: all-MiniLM-L6-v2, configurable via MODEL_NAME), converting text into vectors. Vectors are stored in LanceDB, a file-based vector database requiring no server process.

When you search:

  1. Your query becomes a vector using the same model
  2. Semantic (vector) search finds the most relevant chunks
  3. Quality filters apply (distance threshold, grouping)
  4. Keyword matches boost rankings for exact term matching

The keyword boost ensures exact terms like useEffect or error codes rank higher when they match.

Agent Skills

Agent Skills provide optimized prompts that help AI assistants use RAG tools more effectively. Install skills for better query formulation, result interpretation, and ingestion workflows:

# Claude Code (project-level)
npx mcp-local-rag skills install --claude-code

# Claude Code (user-level)
npx mcp-local-rag skills install --claude-code --global

# Codex
npx mcp-local-rag skills install --codex

Skills include:

  • Query optimization: Better search query formulation
  • Result interpretation: Score thresholds and filtering guidelines
  • HTML ingestion: Format selection and source naming

Ensuring Skill Activation

Skills are loaded automatically in most cases—AI assistants scan skill metadata and load relevant instructions when needed. For consistent behavior:

Option 1: Explicit request (natural language) Before RAG operations, request in natural language:

  • "Use the mcp-local-rag skill for this search"
  • "Apply RAG best practices from skills"

Option 2: Add to agent instruction file Add to your AGENTS.md, CLAUDE.md, or other agent instruction file:

When using query_documents, ingest_file, or ingest_data tools,
apply the mcp-local-rag skill for better query formulation and result interpretation.

Configuration

Environment Variables and CLI Flags

Both MCP and CLI use the same environment variables. The CLI also accepts equivalent flags.

Environment Variable CLI Flag Default Description
BASE_DIR --base-dir Current directory Document root directory (security boundary)
DB_PATH --db-path ./lancedb/ Vector database location
CACHE_DIR --cache-dir ./models/ Model cache directory
MODEL_NAME --model-name Xenova/all-MiniLM-L6-v2 HuggingFace model ID (available models)
MAX_FILE_SIZE --max-file-size 104857600 (100MB) Maximum file size in bytes
CHUNK_MIN_LENGTH --chunk-min-length 50 Minimum chunk length in characters (1–10000)

Model choice tips:

  • Multilingual docs → e.g., onnx-community/embeddinggemma-300m-ONNX (100+ languages)
  • Scientific papers → e.g., sentence-transformers/allenai-specter (citation-aware)
  • Code repositories → default often suffices; keyword boost matters more (or jinaai/jina-embeddings-v2-base-code)

⚠️ Changing MODEL_NAME changes embedding dimensions. Delete DB_PATH and re-ingest after switching models.

Client-Specific Setup

Cursor — Global: ~/.cursor/mcp.json, Project: .cursor/mcp.json

{
  "mcpServers": {
    "local-rag": {
      "command": "npx",
      "args": ["-y", "mcp-local-rag"],
      "env": {
        "BASE_DIR": "/path/to/your/documents"
      }
    }
  }
}

Codex~/.codex/config.toml (note: must use mcp_servers with underscore)

[mcp_servers.local-rag]
command = "npx"
args = ["-y", "mcp-local-rag"]

[mcp_servers.local-rag.env]
BASE_DIR = "/path/to/your/documents"

Claude Code:

claude mcp add local-rag --scope user \
  --env BASE_DIR=/path/to/your/documents \
  -- npx -y mcp-local-rag

First Run

The embedding model (~90MB) downloads on first use. Takes 1-2 minutes, then works offline.

Security

  • Path restriction: Only files within BASE_DIR are accessible
  • Local only: No network requests after model download
  • Model source: Official HuggingFace repository (verify here)
Performance

Tested on MacBook Pro M1 (16GB RAM), Node.js 22:

Query Speed: ~1.2 seconds for 10,000 chunks (p90 < 3s)

Ingestion (10MB PDF):

  • PDF parsing: ~8s
  • Chunking: ~2s
  • Embedding: ~30s
  • DB insertion: ~5s

Memory: ~200MB idle, ~800MB peak (50MB file ingestion)

Concurrency: Handles 5 parallel queries without degradation.

Troubleshooting

"No results found"

Documents must be ingested first. Run "List all ingested files" to verify.

Model download failed

Check internet connection. If behind a proxy, configure network settings. The model can also be downloaded manually.

"File too large"

Default limit is 100MB. Split large files or increase MAX_FILE_SIZE.

Slow queries

Check chunk count with status. Large documents with many chunks may slow queries. Consider splitting very large files.

"Path outside BASE_DIR"

Ensure file paths are within BASE_DIR. Use absolute paths.

MCP client doesn't see tools

  1. Verify config file syntax
  2. Restart client completely (Cmd+Q on Mac for Cursor)
  3. Test directly: npx mcp-local-rag should run without errors
FAQ

Is this really private? Yes. After model download, nothing leaves your machine. Verify with network monitoring.

Can I use this offline? Yes, after the first model download (~90MB).

How does this compare to cloud RAG? Cloud services offer better accuracy at scale but require sending data externally. This trades some accuracy for complete privacy and zero runtime cost.

What file formats are supported? PDF, DOCX, TXT, Markdown, and HTML (via ingest_data). Not yet: Excel, PowerPoint, images.

Can I change the embedding model? Yes, but you must delete your database and re-ingest all documents. Different models produce incompatible vector dimensions.

GPU acceleration? Transformers.js runs on CPU. GPU support is experimental. CPU performance is adequate for most use cases.

Multi-user support? No. Designed for single-user, local access. Multi-user would require authentication/access control.

How to backup? Copy DB_PATH directory (default: ./lancedb/).

Development

Building from Source

git clone https://github.com/shinpr/mcp-local-rag.git
cd mcp-local-rag
pnpm install

Testing

pnpm test              # Run all tests
pnpm run test:watch    # Watch mode

Code Quality

pnpm run type-check    # TypeScript check
pnpm run check:fix     # Lint and format
pnpm run check:deps    # Circular dependency check
pnpm run check:all     # Full quality check

Project Structure

src/
  index.ts      # Entry point
  server/       # MCP tool handlers
  cli/          # CLI subcommands (ingest)
  parser/       # PDF, DOCX, TXT, MD parsing
  chunker/      # Text splitting
  embedder/     # Transformers.js embeddings
  vectordb/     # LanceDB operations
  __tests__/    # Test suites

Contributing

Contributions welcome! See CONTRIBUTING.md for setup and guidelines.

License

MIT License. Free for personal and commercial use.

Blog Posts

Acknowledgments

Built with Model Context Protocol by Anthropic, LanceDB, and Transformers.js.

Release History

VersionChangesUrgencyDate
v0.14.2## Added - **`BASE_DIRS`** — JSON array env var to configure multiple document roots, e.g. `BASE_DIRS='["/a","/b"]'`. - **Repeatable `--base-dir`** for `ingest` and `list`. CLI roots replace env roots. - Precedence: CLI `--base-dir` > `BASE_DIRS` > `BASE_DIR` > `cwd`. ## Changed - Configuration warnings (e.g. `BASE_DIRS is set; BASE_DIR is ignored.`) now appear in MCP tool responses, not only stderr. - `list_files` returns `baseDirs: string[]` and per-file `baseDir`. Legacy `baseDir`High5/23/2026
v0.14.0## Changes - **Visual ingest for PDFs (opt-in).** `visual: true` (MCP) or `--visual` (CLI) inlines a short caption from a local VLM (`HuggingFaceTB/SmolVLM-256M-Instruct`) into the text chunks for each page with figures, tables, or diagrams. Captions are auxiliary text — not image search, not OCR, and not a faithful transcription of the figure. Default ingest is unchanged. See the README's *Ingesting PDFs with figures* section for usage and the security note. - **GPU acceleration.** EmbeddinHigh5/17/2026
v0.13.2Patch release improving `read_chunk_neighbors` input validation. ## Fixes - `read_chunk_neighbors` now treats an empty or whitespace-only `filePath`/`source` as not provided. Passing `source: ""` alongside a valid `filePath` returns the document window instead of resolving to an empty raw-data path and returning nothing. - The `filePath`/`source` validation error now matches the actual situation: "Provide either filePath or source, not both" when both are given, "Either filePath or sourceHigh5/11/2026
v0.13.1Patch release for dependency upgrades. ## Dependencies - `@huggingface/transformers` ^4.0.0 → ^4.2.0 - Minor version bump in the embedding library. Embedding output may differ slightly from v0.13.0; re-ingest existing documents if you observe behavior changes. - `@lancedb/lancedb` ^0.26.2 → ^0.27.2 - `@modelcontextprotocol/sdk` ^1.28.0 → ^1.29.0 - `jsdom` ^27.4.0 → ^29.1.1 - `turndown` 7.2.2 → 7.2.4 ## Transitive - `protobufjs` 7.5.4 → 7.5.5 (#108) - `@xmldom/xmldom` 0.8.11 →High5/7/2026
v0.13.0## What's New **New tool: `read_chunk_neighbors`** — Expand a search result by reading the chunks immediately before and after it in the same document. After finding a relevant chunk via `query_documents`, pass its `chunkIndex` and `filePath` (or `source`) to retrieve surrounding context in a single call. Useful when a hit answers a question only partially. ### MCP Tool ``` read_chunk_neighbors({ filePath: "/path/to/doc.md", chunkIndex: 5 }) ``` ### CLI ```bash npx mcp-localHigh4/17/2026
v0.12.0## Added - `CHUNK_MIN_LENGTH` environment variable and `--chunk-min-length` CLI flag to configure minimum chunk length in characters (range: 1–10,000, default: 50) - `CHUNK_MIN_LENGTH` entry in MCP server manifest (`server.json`) ## Changed - Minimum chunk length default (50) is now exported as a single source of truth from the chunker module - Error message for zero-chunk ingestion now reflects the actual configured value instead of hardcoded "50" - Warning and error messages acrossMedium4/2/2026
v0.11.1## Security - Upgrade `@huggingface/transformers` from v3 to v4 (#97) - Resolves 3 high-severity `tar` CVEs (GHSA-34x7, GHSA-8qq5, GHSA-83g3) - Replace `madge` with `dpdm` for circular dependency checking (#97) - Resolves `minimatch` ReDoS vulnerabilities ## Internal - Add `pnpm-workspace.yaml` with `allowBuilds` for pnpm v10 build script security Medium3/30/2026
v0.11.0## Breaking changes - Minimum Node.js version raised from 20 to 22 (#96) - Node.js 20 reaches EOL on April 30, 2026 ## Internal - TypeScript target updated from ES2020 to ES2023 Medium3/30/2026
v0.10.1## Bug fixes - Reject non-numeric values for `--max-file-size` and `--limit` CLI flags (#92) ## Security - Update `@modelcontextprotocol/sdk` 1.27.1 → 1.28.0 - Update `mammoth` 1.11.0 → 1.12.0 - Update `vitest` 4.0.18 → 4.1.2 (resolves `rollup` vulnerability) - Update `knip` 5.88.0 → 6.1.0 (resolves `picomatch` vulnerability) Medium3/29/2026
v0.10.0## Full CLI support — all MCP tools now available as CLI commands mcp-local-rag can now be used entirely without an MCP server. All six MCP tools have CLI equivalents: ```bash npx mcp-local-rag ingest ./docs/ # Bulk ingest files npx mcp-local-rag query "search text" # Search documents npx mcp-local-rag list # Show ingestion status npx mcp-local-rag status # Database stats npx mcp-local-rag delete ./docs/old.pdf # Remove by file pLow3/19/2026
v0.9.0## CLI `ingest` subcommand New CLI command for ingesting multiple files or entire directories — no MCP timeout constraints, significantly faster for bulk operations. ```bash npx mcp-local-rag ingest [options] <path> ``` - Single file or recursive directory ingestion - Optimizes the database once at the end, not per-file - All config available as CLI flags (`--db-path`, `--base-dir`, `--cache-dir`, `--model-name`, `--max-file-size`) - Priority: CLI flags > environment variables > deLow3/18/2026
v0.8.2## Reduce optimize() overhead per ingest from 2x to 1x - Move `table.optimize()` out of `insertChunks()`/`deleteChunks()` and into the server layer - Each `ingest_file` and `delete_file` now calls `optimize()` once instead of twice - Expose `VectorStore.optimize()` as a public method for future bulk ingestion supportLow3/18/2026
v0.8.1## Fix stale database reads after external modifications - Set `readConsistencyInterval: 0` on LanceDB `connect()` so every read checks for updates from other processes - Previously, queries failed with "Failed to search vectors" when another process (e.g., CLI ingestion from a different terminal) modified the database - Overhead is negligible: ~0.03ms per query, constant regardless of data sizeLow3/17/2026
v0.8.0## What's New ### PDF Parser Migration to MuPDF - Replaced `pdfjs-dist` with `mupdf` (WASM-based) for more accurate PDF text extraction - Improved multi-line PDF title extraction using font metadata - Added 2-stage header/footer detection (block-attribute pre-filter + embedding similarity) - Normalized tab characters in extracted text - Migrated project from CommonJS to ESM ### Configuration Warnings via MCP Annotations - Invalid environment variable values (e.g., `RAG_MAX_FILES=Low3/7/2026
v0.7.0## Breaking Changes - **`list_files` response shape changed** — The flat array response is replaced with a structured object containing `baseDir`, `files`, and `sources` fields. Each file entry now includes an `ingested` boolean indicating whether it has been indexed. (#59) ## New Features - **BASE_DIR filesystem scan** — `list_files` now scans BASE_DIR recursively for supported files (PDF, DOCX, TXT, MD) and shows their ingestion status, making it easy to see which files are available Low2/24/2026
v0.6.0## What's New ### File-based search filtering (`RAG_MAX_FILES`) Added `RAG_MAX_FILES` environment variable to limit search results to chunks from the top N best-scoring files. Useful for reducing noise when querying large document collections. ### Document title extraction (`fileTitle`) Search results now include a `fileTitle` field extracted from each document, providing LLMs with document-level context for each chunk. Title extraction supports all formats: - **PDF**: metadata `Low2/22/2026
v0.5.6## What's Changed ### Security - Defend `validateFilePath` against symlink traversal attacks using `realpath()` (#52) ### Bug Fixes - Improve type safety of `formatErrorMessage` for non-Error arguments (#51) ### Refactoring - Split `server/index.ts` into focused modules: tool definitions, type definitions, error utilities (#48) - Remove unnecessary exports from internal modules (#50) - Separate CLI and MCP server entry points (#43) ### Documentation - Add `CONTRIBUTING.Low2/20/2026
v0.5.5## Dependencies - Bump @modelcontextprotocol/sdk from 1.25.2 to 1.26.0 Low2/4/2026
v0.5.4## What's Changed ### Bug Fixes - **Prevent data loss on re-ingest**: When re-ingesting a file that produces 0 chunks (empty or unextractable content), existing data is now preserved instead of being deleted - Added fail-fast check before delete operation - Validates chunk count before any destructive action ### Security Improvements - **Proper error codes**: Use `-32602` (InvalidParams) instead of `-32603` (InternalError) for user input errors (empty files) - **Hide stack traLow1/24/2026
v0.5.3## Security - Update `@modelcontextprotocol/sdk` to 1.25.2 to fix ReDoS vulnerability in UriTemplate regex patterns Low1/8/2026
v0.5.2## Changes - **CLI Consolidation**: Merged `mcp-local-rag-skills` into main CLI as a subcommand - Old: `npx mcp-local-rag-skills --claude-code` - New: `npx mcp-local-rag skills install --claude-code` ## Migration Update your commands: ```bash # Claude Code (project-level) npx mcp-local-rag skills install --claude-code # Claude Code (user-level) npx mcp-local-rag skills install --claude-code --global # Codex npx mcp-local-rag skills install --codex ``` Low1/6/2026
v0.5.1## Bug Fixes ### Fix jsdom missing from production dependencies (#31) `jsdom` was incorrectly placed in `devDependencies` instead of `dependencies`, causing `MODULE_NOT_FOUND` errors when installing via `npx -y mcp-local-rag`. **Before (broken):** ```bash npx -y mcp-local-rag@0.5.0 # Error: Cannot find module 'jsdom' ``` **After (fixed):** ```bash npx -y mcp-local-rag@0.5.1 # Works correctly ``` ## CI Improvements ### Add production dependency validation Added `reporLow1/1/2026
v0.5.0## New Features ### `ingest_data` Tool Ingest raw content (HTML, text, markdown) directly without requiring a file path. Perfect for web pages fetched via LLM or browser tools. ### HTML Parser Clean content extraction using Mozilla Readability + Turndown. Removes navigation, ads, and boilerplate while preserving document structure. ### Agent Skills RAG optimization skills for Claude Code, Codex, and other AI assistants supporting [agentskills.io](https://agentskills.io/). - Query opLow1/1/2026
v0.4.2## Overview This release significantly improves PDF text extraction and chunking quality, resulting in cleaner search results and better RAG performance. ## What's Improved ### PDF Text Extraction - Switched to a more reliable PDF parsing engine with better text positioning support - Text items are now properly grouped by their Y-coordinates, preserving reading order - Sentences on the same line are correctly merged for coherent chunks ### Header/Footer Removal - Automatic detectLow12/29/2025
v0.4.1## Security - Update `@modelcontextprotocol/sdk` to 1.25.1 - Fixes CVE-2025-66414: DNS rebinding protection now enabled by default - Update `express` to 5.2.1 - Fixes body-parser vulnerability (Dependabot #10) - Remove `@vitest/coverage-v8` and `c8` - Fixes glob vulnerability (Dependabot #9) ## Maintenance - Migrate from npm to pnpm - Remove stale `package-lock.json` - Update CI workflow, husky hooks, and documentation for pnpm - Remove coverage tooling and related scriptsLow12/27/2025
v0.4.0## Semantic Chunking Documents are now chunked by meaning, not character count. - **Max-Min algorithm**: Uses embedding similarity to detect natural topic boundaries - **Sentence-aware splitting**: Leverages `Intl.Segmenter` for accurate sentence detection - Produces coherent chunks (typically 500-1000 chars) that keep related content together ## Improved Hybrid Search New "vector-first with keyword boost" architecture: 1. Semantic (vector) search finds relevant chunks 2. QualiLow12/27/2025
v0.3.0## Overview This release significantly improves search accuracy and relevance through hybrid search, quality filters, and garbage chunk removal. ## New Features ### Hybrid Search (BM25 + Vector) - Combines keyword matching (BM25) with semantic vector search - Configurable via `RAG_HYBRID_WEIGHT` (0.0 = vector only, 1.0 = keyword only, default: 0.6) - Particularly effective for technical terms, code identifiers, and exact phrase matching ### Quality Filters - **`RAG_MAX_DISTANCE`*Low12/24/2025
v0.2.3## Bug Fixes - **Fix log output interfering with MCP protocol**: Redirect all logs from stdout to stderr to comply with MCP protocol requirements. This fixes an issue where log messages were confusing MCP clients like Claude Desktop. ## Dependencies - Bump `@modelcontextprotocol/sdk` from 1.22.0 to 1.24.0 - MCP spec 2025-11-25 support - SSE reconnection improvements - Stdio server hang fix ## Full Changelog https://github.com/shinpr/mcp-local-rag/compare/v0.2.2...v0.2.3 Low12/5/2025
v0.2.2## What's Changed ### Dependencies - Bump express from 5.1.0 to 5.2.1 (#9) **Full Changelog**: https://github.com/shinpr/mcp-local-rag/compare/v0.2.1...v0.2.2 Low12/2/2025
v0.2.1## Security Fixes - Bump `body-parser` from 2.2.0 to 2.2.1 to address CVE-2025-13466 (#7) - Update `glob` to 10.5.0 to address CVE-2025-64756 (#6) ## Full Changelog https://github.com/shinpr/mcp-local-rag/compare/v0.2.0...v0.2.1 Low11/26/2025
v0.2.0## Overview This release adds a new MCP tool for file deletion, implements lazy initialization for faster server startup, and fixes a critical LanceDB deletion bug that prevented proper file re-ingestion. ## What's New ### 🗑️ New Tool: `delete_file` Delete ingested documents from the vector database permanently. **Usage:** ``` "Delete /Users/me/docs/old-spec.pdf from the RAG system" ``` **Features:** - Removes all chunks and embeddings for the specified file - Idempotent Low11/3/2025
v0.1.5## What's Changed ### Dependency Upgrade - **Upgraded to @huggingface/transformers v3.7.6** from @xenova/transformers v2.17.2 - `sharp` is now an external/optional dependency in v3 - Expanded model compatibility: 1200+ embedding models now available - Package moved to official Hugging Face organization on NPM ### Bug Fixes - **Fixed test failures** caused by onnxruntime-node threading issues - Updated vitest configuration to use single-fork mode - Tests were failing on allLow11/2/2025
v0.1.4## What's Changed ### Bug Fixes - **Node.js compatibility**: Updated `engines.node` from `"20"` to `">=20"` to support Node.js 24 and future versions, fixing Docker build compatibility issues with services like Glama ### Documentation - Removed outdated Prerequisites section from README to avoid version-specific recommendations that become stale ## Technical Details This release resolves the `sharp` module native binary installation error that occurred when using Node.js 24 in DockLow11/2/2025
v0.1.3## Fixed - **NPX Execution Support**: Added `bin` field to `package.json` to enable execution via `npx -y mcp-local-rag` - **MCP Server Integration**: Fixed "could not determine executable to run" error when using as MCP server Low11/1/2025
v0.1.1## What's New - MCP Registry integration support with `mcpName` field - Updated to latest MCP Registry schema (2025-10-17) Low10/31/2025
v0.1.0We're excited to announce the first release of **MCP Local RAG**, a privacy-first document search server that runs entirely on your machine. ## Overview MCP Local RAG enables semantic search across your local documents (PDF, DOCX, TXT, MD) without sending data to external services. Built for the Model Context Protocol (MCP), it integrates seamlessly with Cursor, Codex, Claude Code, and any MCP-compatible client. ## Key Features ### Document Processing - **Multi-format support**: PDFLow10/31/2025

Dependencies & License Audit

Loading dependencies...

Similar Packages

Claud-ometerTrack and analyze Claude Code usage, costs, and sessions locally with Claud-ometer for full data control and clear insights.main@2026-06-04
local-rag-serverDeploy a local, multi-user RAG system to query PDF and DOCX documents using a local LLM without cloud or API dependencies.main@2026-06-02
peta-coreThe Control Plane for MCP — secure vault, managed runtime, audit trail, and policy-based approvals.v1.2.1
gradle-mcpA comprehensive MCP server for Gradle.0.0.11
kibiRepo-local, per-git-branch, queryable knowledge base for LLM Agents.kibi-mcp@0.16.1

More in MCP Servers

agentroveYour own Claude Code UI, sandbox, in-browser VS Code, terminal, multi-provider support (Anthropic, OpenAI, GitHub Copilot, OpenRouter), custom skills, and MCP servers.
ProxmoxMCP-PlusEnhanced Proxmox MCP server with advanced virtualization management and full OpenAPI integration.
node9-proxyThe Execution Security Layer for the Agentic Era. Providing deterministic "Sudo" governance and audit logs for autonomous AI agents.
mcp-compressorAn MCP server wrapper for reducing tokens consumed by MCP tools.