MCP Local RAG
shinpr/mcp-local-rag
Searches, saves, and maintains a local document index through a local RAG MCP server.
Measure retrieval quality using evaluateretrieval (MRR@5 and Recall@5) and getindexstats.
$ npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install lyonzin/knowledge-rag rag-evaluate-quality --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/maintenance/rag-evaluate-quality .claude/skills/rag-evaluate-quality && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rag-evaluate-quality" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/maintenance/rag-evaluate-quality into .claude/skills/rag-evaluate-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-evaluate-quality", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/lyonzin/knowledge-rag/tree/master/skills/maintenance/rag-evaluate-qualityType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install lyonzin/knowledge-rag rag-evaluate-quality --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/maintenance/rag-evaluate-quality .agents/skills/rag-evaluate-quality && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rag-evaluate-quality" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/maintenance/rag-evaluate-quality into .agents/skills/rag-evaluate-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-evaluate-quality", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install lyonzin/knowledge-rag rag-evaluate-quality --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/maintenance/rag-evaluate-quality .cursor/skills/rag-evaluate-quality && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rag-evaluate-quality" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/maintenance/rag-evaluate-quality into .cursor/skills/rag-evaluate-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-evaluate-quality", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/lyonzin/knowledge-rag.git --path skills/maintenance/rag-evaluate-quality--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install lyonzin/knowledge-rag rag-evaluate-quality --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/maintenance/rag-evaluate-quality .gemini/skills/rag-evaluate-quality && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rag-evaluate-quality" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/maintenance/rag-evaluate-quality into .gemini/skills/rag-evaluate-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-evaluate-quality", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install lyonzin/knowledge-rag rag-evaluate-qualityInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/maintenance/rag-evaluate-quality .github/skills/rag-evaluate-quality && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rag-evaluate-quality" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/maintenance/rag-evaluate-quality into .github/skills/rag-evaluate-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-evaluate-quality", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install lyonzin/knowledge-rag rag-evaluate-quality --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/lyonzin/knowledge-rag.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/maintenance/rag-evaluate-quality .opencode/skills/rag-evaluate-quality && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rag-evaluate-quality" agent skill from https://github.com/lyonzin/knowledge-rag/tree/master/skills/maintenance/rag-evaluate-quality into .opencode/skills/rag-evaluate-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rag-evaluate-quality", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rag-evaluate-qualityMeasure retrieval quality using evaluateretrieval (MRR@5 and Recall@5) and getindexstats.
RAG Evaluate Quality is an agent skill from lyonzin/knowledge-rag. Measure retrieval quality using evaluateretrieval (MRR@5 and Recall@5) and getindexstats. Use after ingestion, a model or configuration change, or a reported search regression. Compare representative questions against a recorded baseline.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Retrieval-augmented generation. It works with Model Context Protocol. The repository describes itself as: Local RAG MCP server for Claude Code — hybrid search (semantic + BM25), cross-encoder reranking, 13 MCP tools, 20 format parsers. Zero external servers, zero API keys. The licence is MIT.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit df9cccb. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are json and python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
RAG Evaluate Quality loads about 1.4k tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 518 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from lyonzin/knowledge-rag at commit df9cccb, republished under its MIT licence (© lyonzin). 518 words, ~1,372 tokens.
.claude/skills/rag-evaluate-quality/SKILL.md (or your agent's skills folder).Use this workflow when the user asks to evaluate retrieval, after a relevant change, or as part of an already authorized recurring evaluation. Do not infer that every session needs a benchmark or that invoking this skill creates a recurring schedule.
Call get_index_stats(). The response contains a stats object. Record stats.total_documents, stats.total_chunks, stats.embedding_model, stats.embedding_dim, and stats.query_cache.hit_rate. The cache rate describes repeated-query reuse, not relevance.
Reuse an independently selected evaluation set, or prepare questions with known answer documents. Each case has one non-empty question and one non-empty expected path:
[
{"query": "authentication design", "expected_filepath": "docs/adr/0018-auth.md"},
{"query": "retry policy", "expected_filepath": "docs/adr/0031-retries.md"}
]These are illustrative paths. Verify that expected documents exist in the actual corpus. Do not derive the expected answer from whichever source the current search happens to rank first.
Serialize the array as a JSON string and pass the test_cases parameter:
import json
cases = [
{"query": "authentication design", "expected_filepath": "docs/adr/0018-auth.md"},
{"query": "retry policy", "expected_filepath": "docs/adr/0031-retries.md"},
]
evaluate_retrieval(test_cases=json.dumps(cases))The MCP tool returns mrr_at_5, recall_at_5, total_queries, and per_query. It does not return Precision@5. Invalid cases are rejected before searches execute.
Inspect individual misses and rank changes before interpreting aggregates:
| Metric | Meaning |
|---|---|
| MRR@5 | Mean reciprocal rank of the expected document; a miss contributes zero |
| Recall@5 | Fraction of cases whose expected document occurs in the first five results |
found_at_rank | Rank for each case, or null if the expected document was not found |
A small corpus can still be evaluated. Report the number and coverage of questions; do not infer a universal quality threshold or declare a fixed delta statistically significant. With five cases, one changed result has a large effect.
Compare with a previous run only after recording corpus revision, model, dimensions, query/passage prefixes, search configuration, and question set. The tool uses the server's default query settings; it does not accept hybrid_alpha, search_method, or min_score arguments. To compare those options, execute a separate controlled search workload with the same questions.
Investigate changes before recommending a rebuild:
| Observation | Next check |
|---|---|
| Expected document missing | Verify file discovery/exclusions, parse errors, indexed chunks, and category |
| Rank changed after new ingestion | Inspect competing hits and per-query evidence |
| Poor results in a non-English corpus | Evaluate an appropriate multilingual model and its required prefixes |
| Model or passage prefix changed | Follow the full model migration procedure; incremental indexing cannot convert old vectors |
| Cache hit rate is zero | Check whether queries actually repeat; no hit-rate target establishes retrieval quality |
Save an evaluation report only where the user has authorized writing. Keep evaluation questions and results outside the measured corpus unless deliberately testing their effect; indexing the answer key can contaminate later measurements.
The following is a format example, not an observed benchmark:
Corpus revision: <commit or snapshot>
Configuration: <model, dimensions, prefixes, search settings>
Cases: 12 unchanged questions; 2 Portuguese, 10 English
MRR@5: <measured value> (previous <value>)
Recall@5: <measured value> (previous <value>)
Changed cases: <query IDs and before/after ranks>
Latency: <separately measured; specify warm/cold, sample count and units>
Next action: inspect <specific missed document or configuration change>Do not say that nothing broke based only on a small retrieval set. Persistence, indexing completeness, concurrent access, memory, and runtime compatibility require their own checks.
The current generic tool-duration metric provides knowledge_rag_tool_duration_seconds_count and knowledge_rag_tool_duration_seconds_sum; these support a mean, not a p95. The optional FTS5 latency histogram has knowledge_rag_fast_path_latency_seconds_bucket buckets. Do not invent a knowledge_rag_search_latency_seconds metric or derive percentiles from a count and sum.
© lyonzin, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/maintenance/rag-evaluate-quality of lyonzin/knowledge-rag.
Open the folder on GitHubat commit df9cccb
RAG Evaluate Quality next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| RAG Evaluate Quality this skilllyonzin/knowledge-rag | 292 | — | ~1.4k | Automated safety check: Pass | MIT | |
| MCP Local RAGshinpr/mcp-local-rag | 411 | — | ~4.4k | Automated safety check: Pass | MIT | |
| Local RAG Searchnkapila6/mcp-local-rag | 134 | 1 repos | ~1.6k | Automated safety check: Pass | MIT | |
| AutoRAG Setup and RepairMarker-Inc-Korea/AutoRAG | 5.1k | — | ~5.5k | Automated safety check: Pass | MIT | |
| Sciverseopendatalab/Sciverse-Agent-Tools | 119 | — | ~3k | Automated safety check: Pass | Custom licence | |
| Pgvector Semantic Searchtimescale/pg-aiguide | 1.9k | — | ~3.8k | Automated safety check: Pass | Apache-2.0 |
shinpr/mcp-local-rag
Searches, saves, and maintains a local document index through a local RAG MCP server.
nkapila6/mcp-local-rag
Efficiently perform web searches using the mcp-local-rag server with semantic similarity ranking.
Marker-Inc-Korea/AutoRAG
Installs, configures, and repairs AutoRAG's search model, approved folders, indexes, and datasources, and registers its Lite MCP server.
opendatalab/Sciverse-Agent-Tools
A skill your agent uses when the user needs academic paper retrieval — searching scientific literature by author/year/journal, finding paper chunks for RAG-style citations, or expanding original…
timescale/pg-aiguide
A skill your agent uses for setting up vector similarity search with pgvector for AI/ML embeddings, RAG applications, or semantic search.
timescale/pg-aiguide
A skill your agent uses to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF).
lyonzin/knowledge-rag
Before answering any technical question, code request, architecture decision, or factual claim, call searchknowledge to check the local corpus.
lyonzin/knowledge-rag
Every technical claim drawn from the local corpus must ship with a source citation formatted as path:line or path:section.
lyonzin/knowledge-rag
When performing code review on a PR, diff, snippet, or "look at this change" request, first consult the corpus for related ADRs, coding standards, prior patterns, and similar files.
lyonzin/knowledge-rag
Three-step multi-tool workflow — search the corpus, fetch the most relevant document in full, then find similar documents.
lyonzin/knowledge-rag
When the user reports a bug, error message, stack trace, unexpected behavior, or "why is this broken" question, search the corpus first for prior occurrences, known fixes, or related runbooks.
lyonzin/knowledge-rag
After making a non-obvious architectural decision, solving a novel bug, agreeing on a coding standard, or reaching a conclusion worth remembering, index it back into the knowledge base so the next…
Works with
Categories
Measure retrieval quality using evaluateretrieval (MRR@5 and Recall@5) and getindexstats. RAG Evaluate Quality is an agent skill from lyonzin/knowledge-rag. Measure retrieval quality using evaluateretrieval (MRR@5 and Recall@5) and getindexstats.
RAG Evaluate Quality fits situations like: tasks that involve Retrieval-augmented generation.
Run `npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a claude-code`. Or copy the skill folder (skills/maintenance/rag-evaluate-quality in lyonzin/knowledge-rag) into .claude/skills/rag-evaluate-quality in your project. Claude Code loads it when a task matches its description.
Run `npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a codex`. Or copy the skill folder (skills/maintenance/rag-evaluate-quality in lyonzin/knowledge-rag) into .agents/skills/rag-evaluate-quality in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add lyonzin/knowledge-rag --skill rag-evaluate-quality -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rag-evaluate-quality, .gemini/skills/rag-evaluate-quality, .github/skills/rag-evaluate-quality and .opencode/skills/rag-evaluate-quality in your project.
SKILL.md names no scripts, command-line tools or credentials: RAG Evaluate Quality is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
RAG Evaluate Quality is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with RAG Evaluate Quality: MCP Local RAG (shinpr/mcp-local-rag, 411 stars), Local RAG Search (nkapila6/mcp-local-rag, 134 stars), AutoRAG Setup and Repair (Marker-Inc-Korea/AutoRAG, 5.1k stars) and Sciverse (opendatalab/Sciverse-Agent-Tools, 119 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
lyonzin (a GitHub user) maintains it in lyonzin/knowledge-rag, which has 292 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 4, 2026.
Source: lyonzin/knowledge-rag on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.