오프라인 TF-IDF 임베딩을 사용하여 AI 클라이언트가 로컬 문서 폴더를 검색하고 인덱싱된 콘텐츠를 바탕으로 답변을 검증할 수 있도록 합니다.
다른 이름 DevilsDev/rag-pipeline-utils, rag-mcp-server, @devilsdev/rag-mcp-server
- 스타
- 1
- Tools
- 4
- 다운로드, 30일
- 2,585
- 최신 버전
- 3.9.1
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
RAG for your documents MCP란?
RAG for your documents은(는) MCP server입니다. 오프라인 TF-IDF 임베딩을 사용하여 AI 클라이언트가 로컬 문서 폴더를 검색하고 인덱싱된 콘텐츠를 바탕으로 답변을 검증할 수 있도록 합니다. 4개 도구를 제공합니다. 예: query, answer, question.
프로젝트 README에서 생성된 요약
RAG for your documents MCP server 정보
이 MCP server는 Claude Desktop 또는 Cursor와 같은 MCP 클라이언트를 사용하는 개발자가 로컬 문서 폴더를 검색하고 인덱싱된 콘텐츠를 통해 AI 응답을 검증할 수 있게 해줍니다. 서버를 특정 디렉토리에 연결하면 어시스턴트가 Markdown, HTML, CSV 또는 text 파일에서 관련 구절을 가져올 수 있습니다. 이 시스템은 오프라인 TF-IDF 임베더와 인메모리 리트리버를 사용하므로 작동을 위해 API key, 외부 데이터베이스 또는 네트워크 연결이 필요하지 않습니다.
사용자는 search_documents와 check_answer라는 두 가지 주요 도구를 통해 서버와 상호작용합니다. search 도구는 자연어 쿼리를 기반으로 관련 텍스트 구절을 찾고, check 도구는 제공된 답변이 특정 소스에 의해 뒷받침되는지 평가합니다. 인덱싱은 메모리 내에서 발생하며 시작 시 재구축되므로, 이 서버는 로컬 및 개인정보 보호 중심의 워크플로우에 최적화되어 있습니다. stdio를 통해 실행되며 작동을 위해 Node.js 22 이상이 필요합니다.
활용 사례
- 1로컬 파일에서 정보 검색AI 어시스턴트에게 문서 폴더 내의 특정 세부 정보를 찾아달라고 요청하세요.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
RAG for your documents MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 RAG for your documents MCP 설치
$ claude mcp add rag-mcp-server -- npx -y @devilsdev/rag-mcp-serverCursor에 RAG for your documents MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"rag-mcp-server": {
"command": "npx",
"args": [
"-y",
"@devilsdev/rag-mcp-server"
]
}
}
}VS Code에 RAG for your documents MCP 설치
.vscode/mcp.json
{
"servers": {
"rag-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@devilsdev/rag-mcp-server"
]
}
}
}VS Code CLI에 RAG for your documents MCP 설치
$ code --add-mcp '{"name":"rag-mcp-server","type":"stdio","command":"npx","args":["-y","@devilsdev/rag-mcp-server"]}'Claude Desktop에 RAG for your documents MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"rag-mcp-server": {
"command": "npx",
"args": [
"-y",
"@devilsdev/rag-mcp-server"
]
}
}
}Codex에 RAG for your documents MCP 설치
$ codex mcp add rag-mcp-server -- npx -y @devilsdev/rag-mcp-serverCodex config.toml에 RAG for your documents MCP 설치
~/.codex/config.toml
[mcp_servers.rag-mcp-server] command = "npx" args = ["-y", "@devilsdev/rag-mcp-server"]
Gemini CLI에 RAG for your documents MCP 설치
$ gemini mcp add -s user rag-mcp-server npx -- -y @devilsdev/rag-mcp-serverGemini settings.json에 RAG for your documents MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"rag-mcp-server": {
"command": "npx",
"args": [
"-y",
"@devilsdev/rag-mcp-server"
]
}
}
}RAG for your documents MCP 도구 4
README에서 감지됨queryanswerquestionsources
| query | — | |
| answer | — | |
| question | — | |
| sources | — |
자동 검사
2026년 11월 13일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능devilsdev/rag-pipeline-utils is public and reachablegithub.com/devilsdev/rag-pipeline-utils ↗통과
- 패키지가 이 저장소를 소스로 명시@devilsdev/rag-mcp-server names devilsdev/rag-pipeline-utils as sourcenpmjs.com/package/@devilsdev/rag-mcp-server ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for @devilsdev/rag-mcp-servernpmjs.com/package/@devilsdev/rag-mcp-server/v/3.9.1#provenan ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-11github.com/devilsdev/rag-pipeline-utils ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from @devilsdev/rag-mcp-server통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음136 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음4 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기@devilsdev/rag-mcp-server
An MCP server for your documents. Point it at a folder and Claude, or any other MCP client, can search the documents and check answers against them:
npx @devilsdev/rag-mcp-server ./docs
It indexes the folder when it starts, with the offline TF-IDF embedder and an in-memory retriever from @devilsdev/rag-pipeline-utils. It needs no API key, no database and no network. The assistant is the language model, so the server never calls one.
Requires Node.js 22 or later.
Connect a client
The server speaks MCP over stdio, so the client starts it. Use an absolute path to your folder.
Claude Code:
claude mcp add docs -- npx -y @devilsdev/rag-mcp-server /absolute/path/to/docs
Claude Desktop, Cursor and other clients that use an mcpServers config (for Claude Desktop: Settings → Developer → Edit Config, then restart):
{
"mcpServers": {
"docs": {
"command": "npx",
"args": ["-y", "@devilsdev/rag-mcp-server", "/absolute/path/to/docs"]
}
}
}
Then ask something your documents answer, such as "How many vacation days do employees get?".
Tools
search_documents
| Input | Type | Description |
|---|---|---|
query |
string, required | What to look for, in natural language (at most 10,000 characters, or --max-question-chars) |
topK |
integer, 1–20 | Passages to return (default 4, or --top-k) |
Returns { passages: [{ id, source, score, text }] }, best first, as structured content and as JSON text. source is the file relative to the folder and id is <source>#<chunk number>. Passages that share no terms with the query are left out.
check_answer
| Input | Type | Description |
|---|---|---|
answer |
string, required | The answer to check (at most 50,000 characters) |
question |
string | The question it answers; improves retrieval when sources is omitted (at most 10,000 characters) |
sources |
array of strings or { id, text } |
Passages to check against, at most 100, each at most 200,000 characters; omit to search the indexed documents |
topK |
integer, 1–20 | Passages to retrieve when sources is omitted |
Runs the library's checkAnswer and returns { grounded, groundedness, unsupported, citations, sources }: whether every sentence is supported, the share of supported sentences (0 to 1), the unsupported sentences, the ids of the sources supporting each sentence, and the sources that were checked. The check is lexical and makes no model calls, so a correct paraphrase can come back unsupported; treat it as a flag to look again, not a verdict.
Both tools are read-only. Passage text is content from your files, and the tool descriptions tell the client to treat it as data, not instructions. A file can still contain text written to manipulate an assistant, so index folders you trust.
Files
Markdown (.md, .markdown), HTML (.html, .htm, visible text only), CSV (.csv, one passage per row) and text (.txt) files, in the folder and its subfolders, handled the way the library's loaders handle them; prose is split into sentence chunks of up to 500 characters. Other files, node_modules and .git are skipped. The index lives in memory and is rebuilt each time the server starts, so restart the client's server after changing the documents.
Options
rag-mcp-server <folder> [--top-k <n>] [--embedder local] [--max-answer-chars <n>]
[--max-source-chars <n>] [--max-question-chars <n>] [--max-sources <n>]
[--max-clause-pairs <n>] [--max-sentence-source-chars <n>] [--check-timeout-ms <n>]
[--max-concurrent-checks <n>]
| Option | Default | Meaning |
|---|---|---|
--top-k <n> |
4 |
Passages per call when the client doesn't pass topK |
--embedder <name> |
local |
The embedder; local (TF-IDF, offline) is the only one |
--max-answer-chars <n> |
50000 |
Longest answer check_answer accepts (env RAG_MCP_MAX_ANSWER_CHARS) |
--max-source-chars <n> |
200000 |
Longest source passage check_answer accepts (env RAG_MCP_MAX_SOURCE_CHARS) |
--max-question-chars <n> |
10000 |
Longest question or query (env RAG_MCP_MAX_QUESTION_CHARS) |
--max-sources <n> |
100 |
Most sources per check_answer call (env RAG_MCP_MAX_SOURCES) |
--max-clause-pairs <n> |
2000000 |
Most answer words × source clauses check_answer compares (env RAG_MCP_MAX_CLAUSE_PAIRS) |
--max-sentence-source-chars <n> |
3000000 |
Most answer sentences × source characters check_answer compares (env RAG_MCP_MAX_SENTENCE_SOURCE_CHARS) |
--check-timeout-ms <n> |
10000 |
Longest a check_answer check may run before it is stopped (env RAG_MCP_CHECK_TIMEOUT_MS) |
--max-concurrent-checks <n> |
2 |
Most check_answer checks run at once; up to 8 more wait (env RAG_MCP_MAX_CONCURRENT_CHECKS) |
A tool call over a limit is rejected with an error that names the flag to raise it. A flag wins over its environment variable; each must be a whole number of at least 1. When you build the server in code, createServer(index, { maxAnswerChars, maxSourceChars, maxQuestionChars, maxSources, maxClausePairs, maxSentenceSourceChars, checkTimeoutMs, maxConcurrentChecks }) takes the same limits. maxClausePairs and maxSentenceSourceChars refuse input that would take long to check before checking it. Every check also runs in a worker thread, with at most 512 MB of heap, and is stopped when it runs past checkTimeoutMs; the server keeps answering other calls meanwhile. At most maxConcurrentChecks checks run at once; up to 8 more wait, and time spent waiting doesn't count toward checkTimeoutMs. A call beyond that is refused with "Too many check_answer calls waiting; try again shortly."
Everything the server logs goes to stderr; stdout carries the protocol.
Build your own
For other embedders (OpenAI, Ollama), a persistent index or a vector database, start from the MCP server example, which builds the same kind of server from the library in about 100 lines.
Documentation: https://devilsdev.github.io/rag-pipeline-utils/
RAG for your documents MCP 질문
RAG for your documents MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add rag-mcp-server -- npx -y @devilsdev/rag-mcp-server를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
RAG for your documents MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
RAG for your documents MCP는 어떤 도구를 제공하나요?
4개 도구를 제공합니다. 예: query, answer, question, sources.
이 MCP server를 사용하려면 인터넷 연결이나 API key가 필요한가요?
아니요, API key나 데이터베이스 없이 완전히 오프라인으로 작동합니다.
답변 검증은 어떻게 이루어지나요?
검증은 어휘 기반으로 수행되며 모델 호출을 하지 않습니다. 즉, LLM을 사용하여 판단하는 대신 텍스트를 직접 비교합니다.
시스템 요구 사항은 무엇인가요?
Node.js 버전 22 이상이 설치되어 있어야 합니다.