Mmcp.market

Local Rag MCP server

by damoqiongqiu·io.github.damoqiongqiu/mcp-local-rag·v0.21.0

Semantic code & doc search with keyword boost. AST code nav, auto HF mirror, local, privacy-first.

A88/100grade A
What users say
No reviews yet
Be the first
Safety scan
A88/100

full report

Adoption
Growing

13 stars43 downloads/wk

Reviews

Write one

Nobody has reviewed Local Rag yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Local Rag tools (16, 1 write)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • config

    Read or update runtime configuration. Without arguments, returns current config (hybridWeight, maxDistance, maxFiles, grouping). With arguments, updates the specified keys and returns the new config. Changes take effect immediately — no restart required.

  • dedup_check

    Detect near-duplicate documents in the index by computing content hashes for every chunk. Returns file pairs with high chunk overlap, sorted by similarity. Use to identify accidentally duplicated or re-ingested content.

  • delete_filewrite action

    Delete a previously ingested file or data from the vector database. Use filePath for files ingested via ingest_file, or source for data ingested via ingest_data. Either filePath or source must be provided. Returns deleted (operation succeeded), removedChunks, and existed (whether anything was actually present).

  • export_index

    Export the current index to a JSON file for backup or migration. Returns the export file path and stats (document count, chunk count, file size). The exported file can be re-imported with a future import_index tool.

  • find_definition

    Find where a symbol (function, class, variable, etc.) is defined in code files. Searches AST-level entity metadata extracted during code chunking. Returns { totalMatches, matches: [{ filePath, chunkIndex, entityName, entityType, lineRange?, scope? }] }. Only works for code files that were ingested with AST-level chunking (CodeChunker).

  • find_references

    Find all references to a symbol across ingested code files using a two-phase strategy: (1) import metadata scan for exact import name matches, (2) FTS text search for in-code mentions. Results merge with import references first, deduplicated by (filePath, chunkIndex). Returns { totalMatches, matches: [{ filePath, chunkIndex, referenceType, context?, importSource?, isDefault?, isNamespace? }] }. On

  • health_check

    Diagnose server health and configuration. Checks embedder (model loaded?), LanceDB (readable?), BASE_DIRs (reachable on disk?), and cache directory (writable?). Returns structured pass/fail results with a human-readable summary and per-check fix suggestions for any failures.

  • ingest_data

    Ingest in-memory content as a string (use ingest_file for files on disk). The source identifier enables re-ingestion to update existing content. Returns { filePath, chunkCount, timestamp, fileTitle }.

  • ingest_directory

    Batch ingest all supported files in a directory. Recursively scans for code and document files under the given path, ingesting each one with AST-level (code) / semantic chunking. Returns per-file status plus totals. Use this for initial bulk ingestion or after deleting the database.

  • ingest_file

    Ingest a document file (PDF, DOCX, TXT, MD) into the vector database. Path must be absolute; re-ingesting the same path replaces its existing data. Returns { filePath, chunkCount, timestamp, fileTitle }.

  • list_files

    List supported files (PDF, DOCX, TXT, MD) under the configured base directories and whether each is ingested. Returns { baseDirs, files, sources }; sources lists ingested items reported apart from the file scan, chiefly ingest_data content (web pages, clipboard, etc.).

  • query_documents

    Search ingested documents with hybrid keyword + semantic matching. Returns results sorted by relevance, each with filePath, chunkIndex, text, fileTitle, score (0 = best, higher = worse), and source (for ingest_data items).

  • read_chunk_neighbors

    Read the chunks immediately before and after a query_documents result, in the same document, for more surrounding context. Pass chunkIndex from the result plus exactly one of filePath (ingest_file) or source (ingest_data). Returns the target chunk (isTarget: true) and its neighbors, ascending by chunkIndex; an out-of-range chunkIndex returns []. Defaults: before=2, after=2 (max 50 each).

  • reindex_all

    Re-ingest ALL indexed files from scratch. Delete existing chunks, then re-ingest every previously-indexed file. Use after changing the embedding model, chunker parameters, or when the index is corrupted. This is a slow, destructive operation — prefer reindex_stale for routine updates.

  • reindex_stale

    Re-ingest all files whose disk contents have changed since the last ingestion (detected via mtime comparison). Returns the count of stale files that were re-ingested. Use when you know files have been modified but the index is out of date.

  • status

    Get index status: { documentCount, chunkCount, memoryUsage (MB), uptime (s), ftsIndexEnabled, searchMode, instances }. When multiple instances are configured, pass instance name for per-instance status.

Public scan report

scanner v0.1.9 · 2026-09-25 · same rubric, same numbers if you re-run it

no findings
  • Code scan133 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitylocal package, no credentials required12/15
  • Maintenancelast push 64 days ago12/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 88/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

What the publisher says

From the Local Rag repository's README, as published. We do not edit it. Read it on GitHub

MCP Local RAG

🍴 Forked from shinpr/mcp-local-rag — original work by Shinsuke Kagawa

Local code intelligence engine for AI coding assistants. AST-level semantic chunking + keyword boost for pinpointing functions, classes, and APIs — fully private, zero setup.

📖 中文文档

Table of Contents

  1. Features
  2. Quick Start
  • 2.1 Configure Your AI Coding Tool
  • 2.2 CLI Quick Start
  • 2.3 First-Time Project Indexing
  1. Core Concepts
  • 3.1 Dual-Strategy Chunking
  • 3.2 Hybrid Search
  • 3.3 Security Boundary
  1. MCP Tool Reference
  • 4.1 Ingest Tools
  • 4.2 Search Tools
  • 4.3 Management Tools
  • 4.4 Code Intelligence
  • 4.5 System Tools
  1. CLI
  • 5.1 Basic Commands
  • 5.2 CLI Configuration
  1. Network & Models
  • 6.1 Mirror Auto-Detection
  • 6.2 Model Selection
  • 6.3 File Watching
  1. Search Tuning
  2. Performance Tuning
  • 8.1 Quantization Precision
  • 8.2 Execution Device
  • 8.3 Minimum Chunk Length
  • 8.4 Recommended Configurations
  1. Configuration Reference
  2. Troubleshooting
  3. Development

1. Features

  • Smart dual-strategy chunking — AST-level code chunking via tree-sitter (splits at function/class/method boundaries, injects scope chain + imports). Semantic chunking for documents (splits by meaning, not character count).
  • Semantic search + keyword boost — Vector search first, then keyword matching boosts exact terms. useEffect, error codes, class names rank higher — not just semantically guessed.
  • 15 MCP tools — Ingest, search, manage, code intelligence, and system ops in one server.
  • AST code intelligence — finddefinition and findreferences for IDE-level code navigation, powered by tree-sitter metadata captured at ingest time.
  • Three-tier mirror auto-fallback — huggingface.co → hf-mirror.com → modelscope.cn, zero config for users in mainland China.
  • Runs entirely locally — No API keys, no cloud, no data leaving your machine. Works offline after the first model download.
  • Zero-friction setup — One npx command. No Docker, Python, or servers to manage.

2. Quick Start

Set BASEDIR to the folder you want to search (BASEDIRS for multiple roots — see Configuration).

2.1 Configure Your AI Coding Tool

Cursor — ~/.cursor/mcp.json:

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Install directly

Runs npx -y @damoqiongqiu/mcp-local-rag on your machine. Read the scan report first; the gateway never runs local packages.

claude mcp add mcp-local-rag -- npx -y @damoqiongqiu/mcp-local-rag
Add to Cursor

Local Rag: common questions

Is Local Rag MCP server safe?
Yes, by our scan: it is graded A (88/100). Read the Local Rag safety report
How do I install Local Rag?
It runs on your machine. Copy the Claude Code, Claude Desktop or Cursor config from the install section.
Does Local Rag need an API key?
No secret keys are declared. It reads 18 settings from the environment.
Is Local Rag maintained?
The last commit was 64 days ago (2026-07-23). The latest release is v0.21.0.
What can I use instead of Local Rag?
Servers from other publishers that do the same job: Code Context MCP server, openchronicle-mcp server and kbdb MCP server. Compare all Local Rag alternatives.

Alternatives to Local Rag

Same job from other publishers: the closest match first, then the best rated.

All Local Rag alternatives →
  • Code Context
    Local code search for AI coding agents: hybrid keyword + semantic + SQL over an index in your repo.
    A
  • openchronicle-mcp
    Memory database for LLM agents — persistent semantic + keyword memory, project namespacing, served o
    A
  • kbdb
    A searchable second brain for AI agents: ranked keyword and semantic search over your Markdown.
    A
  • Kirok Memory
    Persistent memory for AI agents - hybrid semantic + keyword recall with autonomous consolidation
    B
  • Google Ads + Meta Ads + SEO/GEO MCP
    Google Ads, Meta Ads, SEO, GEO & GA4 MCP by Ryze AI - audits, reports, keywords, Search Console.
    A

More from damoqiongqiu →