Context7
Up-to-date docs for AI agents
제작자가 쓴 설명(영어 원문)
Easy-to-setup local RAG server with minimal configuration
이 세 가지는 절대 하나의 점수로 합치지 않아요. 의견, 측정, 인기는 서로 다른 것이니까요.
이 서버는 아직 쉬운 말로 된 요약을 쓰지 못했어요. 아래는 레지스트리에서 읽어 온 사실이에요.
쓰고 있는 AI 앱을 고른 다음 설정을 복사하세요.
BASE_DIR, BASE_DIRS, IGNORE_PATHS, DB_PATH, CACHE_DIR, HF_ENDPOINT, MODEL_NAME, MAX_FILE_SIZE, RAG_MAX_DISTANCE, RAG_GROUPING, RAG_MAX_FILES, CHUNK_MIN_LENGTH, STORE_IMAGES, EMBED_TITLE_PREFIX, EMBED_HEADING_PREFIX, RAG_DEVICE, RAG_DTYPE, RAG_HYBRID_WEIGHT, RAG_RERANK_CMD, RAG_RERANK_TIMEOUT_MS필요한 것
어떤 앱을 쓰세요?
위에서 앱을 고르세요. 기억해 두었다가 다음부터는 버튼에 “…에 설치”라고 표시해요.
Claude Desktop → Settings → Developer → Edit Config를 열고 claude_desktop_config.json에 이 내용을 붙여 넣으세요
{
"mcpServers": {
"local-rag": {
"command": "npx",
"args": [
"-y",
"mcp-local-rag"
],
"env": {
"BASE_DIR": "your-value",
"BASE_DIRS": "your-value",
"IGNORE_PATHS": "your-value",
"DB_PATH": "your-value",
"CACHE_DIR": "your-value",
"HF_ENDPOINT": "your-value",
"MODEL_NAME": "your-value",
"MAX_FILE_SIZE": "your-value",
"RAG_MAX_DISTANCE": "your-value",
"RAG_GROUPING": "your-value",
"RAG_MAX_FILES": "your-value",
"CHUNK_MIN_LENGTH": "your-value",
"STORE_IMAGES": "your-value",
"EMBED_TITLE_PREFIX": "your-value",
"EMBED_HEADING_PREFIX": "your-value",
"RAG_DEVICE": "your-value",
"RAG_DTYPE": "your-value",
"RAG_HYBRID_WEIGHT": "your-value",
"RAG_RERANK_CMD": "your-value",
"RAG_RERANK_TIMEOUT_MS": "your-value"
}
}
}
}터미널에서 이 명령어를 실행하세요
claude mcp add local-rag --env BASE_DIR=your-value --env BASE_DIRS=your-value --env IGNORE_PATHS=your-value --env DB_PATH=your-value --env CACHE_DIR=your-value --env HF_ENDPOINT=your-value --env MODEL_NAME=your-value --env MAX_FILE_SIZE=your-value --env RAG_MAX_DISTANCE=your-value --env RAG_GROUPING=your-value --env RAG_MAX_FILES=your-value --env CHUNK_MIN_LENGTH=your-value --env STORE_IMAGES=your-value --env EMBED_TITLE_PREFIX=your-value --env EMBED_HEADING_PREFIX=your-value --env RAG_DEVICE=your-value --env RAG_DTYPE=your-value --env RAG_HYBRID_WEIGHT=your-value --env RAG_RERANK_CMD=your-value --env RAG_RERANK_TIMEOUT_MS=your-value -- npx -y mcp-local-rag실행하기 전에 빈 값을 채워 주세요.
프로젝트의 .cursor/mcp.json 또는 ~/.cursor/mcp.json에 붙여 넣으세요
{
"mcpServers": {
"local-rag": {
"command": "npx",
"args": [
"-y",
"mcp-local-rag"
],
"env": {
"BASE_DIR": "your-value",
"BASE_DIRS": "your-value",
"IGNORE_PATHS": "your-value",
"DB_PATH": "your-value",
"CACHE_DIR": "your-value",
"HF_ENDPOINT": "your-value",
"MODEL_NAME": "your-value",
"MAX_FILE_SIZE": "your-value",
"RAG_MAX_DISTANCE": "your-value",
"RAG_GROUPING": "your-value",
"RAG_MAX_FILES": "your-value",
"CHUNK_MIN_LENGTH": "your-value",
"STORE_IMAGES": "your-value",
"EMBED_TITLE_PREFIX": "your-value",
"EMBED_HEADING_PREFIX": "your-value",
"RAG_DEVICE": "your-value",
"RAG_DTYPE": "your-value",
"RAG_HYBRID_WEIGHT": "your-value",
"RAG_RERANK_CMD": "your-value",
"RAG_RERANK_TIMEOUT_MS": "your-value"
}
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
프로젝트의 .vscode/mcp.json에 붙여 넣으세요
{
"servers": {
"local-rag": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-local-rag"
],
"env": {
"BASE_DIR": "your-value",
"BASE_DIRS": "your-value",
"IGNORE_PATHS": "your-value",
"DB_PATH": "your-value",
"CACHE_DIR": "your-value",
"HF_ENDPOINT": "your-value",
"MODEL_NAME": "your-value",
"MAX_FILE_SIZE": "your-value",
"RAG_MAX_DISTANCE": "your-value",
"RAG_GROUPING": "your-value",
"RAG_MAX_FILES": "your-value",
"CHUNK_MIN_LENGTH": "your-value",
"STORE_IMAGES": "your-value",
"EMBED_TITLE_PREFIX": "your-value",
"EMBED_HEADING_PREFIX": "your-value",
"RAG_DEVICE": "your-value",
"RAG_DTYPE": "your-value",
"RAG_HYBRID_WEIGHT": "your-value",
"RAG_RERANK_CMD": "your-value",
"RAG_RERANK_TIMEOUT_MS": "your-value"
}
}
}
}브라우저가 앱을 열지 물어본 다음, 앱이 설정을 보여 주고 확인을 요청해요. 키 값은 비워 두니 직접 입력하세요.
이 서버는 내 컴퓨터에서 실행되는데, ChatGPT는 인터넷에 있는 서버에만 연결할 수 있어요. 다른 앱을 고르세요.
선택한 앱은 이 기기의 쿠키에만 저장돼요. 계정은 필요 없어요.
BASE_DIR envBASE_DIRS envIGNORE_PATHS envDB_PATH envCACHE_DIR envHF_ENDPOINT envMODEL_NAME envMAX_FILE_SIZE envRAG_MAX_DISTANCE envRAG_GROUPING envRAG_MAX_FILES envCHUNK_MIN_LENGTH envSTORE_IMAGES envEMBED_TITLE_PREFIX envEMBED_HEADING_PREFIX envRAG_DEVICE envRAG_DTYPE envRAG_HYBRID_WEIGHT envRAG_RERANK_CMD envRAG_RERANK_TIMEOUT_MS env이 설정은 제작자의 레지스트리 정보로 만들었어요. README와 다르면 README를 따르세요.
내 컴퓨터에서 실행돼요. 설치하면 AI 앱에 도구 목록이 나타나요.
누구나 볼 수 있는 정보를 점검했고, 코드는 읽지 않았어요. 해당하지 않는 항목은 개수에서 뺐어요. · 2026년 11월 7일 점검
레지스트리 이름이 GitHub 계정 shinpr 기준으로 확인되었고, 이 계정이 저장소를 소유하고 있어요
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
아직 GitHub에서 이 저장소를 읽어 오지 않았어요
내 컴퓨터에서 실행되는 서버라 인터넷 엔드포인트가 없어요
내 컴퓨터에서 실행되며, 대신 로컬 설정을 사용해요
내 컴퓨터에서 실행돼요. 도구 목록은 인터넷 엔드포인트가 있는 서버에서만 읽을 수 있어요
레지스트리에서 이 카테고리의 활성 서버 전체와 비교했어요. 스타는 게시자가 저장소를 소유한 경우에만 세요.
해당하는 기본 점검 1개 중 1개를 통과했어요. 코드는 읽지 않았어요. 키나 토큰을 넣기 전에 서버가 어떤 권한을 요구하는지 확인하고, 꼭 필요한 권한만 있는 키를 쓰세요.
레지스트리에 필수 키가 나와 있지 않아요. 다만 처음 쓸 때 로그인을 요구하는 서버도 있어요.
내 컴퓨터에서 실행돼요. AI 앱이 필요할 때 실행하고, 데이터는 제작자의 서버를 거치지 않아요(서버 자체가 온라인 서비스를 호출하는 경우는 제외).
GitHub 저장소는 마지막으로 – 변경됐고, 최신 버전(0.23.2)은 그저께 레지스트리에 올라왔어요.
Claude Desktop, Claude Code, Cursor, VS Code처럼 MCP를 지원하는 앱에서 쓸 수 있어요. 내 컴퓨터에 Node.js도 있어야 해요.
같은 카테고리에는: Context7, Codebase Memory, Exa
같은 카테고리에서 다른 제작자가 만든 서버예요. 스타 순으로 정렬했어요.
카드 보는 법:★ GitHub 스타i세 기둥: 리뷰 · 점검 · 사용 정도i업데이트 = 최신 버전을 레지스트리에 공개한 날i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
제작자의 저장소에서 쓰인 그대로 가져왔어요. PopNx MCP가 검토하거나 보증한 내용이 아니에요. HTML, 이미지, 스크립트는 제거했어요. 링크를 누르면 이 사이트를 벗어나요.
English | 简体中文 | Deutsch | Español | Português (Brasil) | Français
Search private documents from an MCP client or the terminal without sending them to an embedding API.
mcp-local-rag indexes PDF, DOCX, Markdown, and text files on your machine. Search combines semantic similarity with keyword matching, so queries can match both intent and exact technical terms such as API names, class names, and error codes. Results include source passages and, where available, headings, line numbers, or page numbers so you can check and cite the original document.
No API key, Docker, Python, or external database is required. After the initial model download, text ingestion and search work offline.
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.
Use one of the examples below, or register npx -y mcp-local-rag and set BASE_DIR using your client's MCP configuration format.
Set DB_PATH and CACHE_DIR to absolute paths as well. Relative paths resolve from the server's working directory, so starting the server from different projects creates a separate index and model cache in each.
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
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"
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" } } } }
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?
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.
| Input | How to ingest |
|---|---|
| PDF, DOCX, TXT, Markdown | File ingestion or directory sync |
| HTML already fetched by the client | ingest_data |
| Plain text or Markdown held in memory | ingest_data with a stable source identifier |
HTML fetching is not built into the server. An MCP client can fetch a page and pass its HTML to ingest_data.
Excel, PowerPoint, standalone images, and source-code file extensions are not supported by file ingestion. PDFs can optionally use a local vision model to describe figures, but this is not OCR or image search.
Sync after adding, editing, or removing documents. For searches and follow-up reading, ask your MCP client:
Find the documented behavior of ERR_CONNECTION_REFUSED.
Read the surrounding chunks for that result.
You can also ingest a single file or HTML already fetched by the client. To refresh an existing entry, ingest the document again using the same path or source identifier. sync skips unchanged files. MCP file paths must be absolute and inside a configured document root.
PDF section headings may be inaccurate. Check the original page when you need the exact heading.
MCP Tools
| Tool | Purpose |
|---|---|
sync_start | Reconcile the index with all configured roots or one path |
sync_status | Poll a running sync job |
ingest_file | Ingest or replace one file |
ingest_data | Ingest text, Markdown, or HTML already held by the client |
query_documents | Search with semantic matching and keyword boost |
read_chunk_neighbors | Read surrounding chunks from a search result |
list_files | Show supported files and their ingestion state |
delete_file | Delete an indexed file or an ingest_data item |
status | Show index and search status |
Use the CLI to update the index, narrow searches, or remove indexed content:
npx mcp-local-rag sync ./docs/
npx mcp-local-rag query "auth" --scope /docs/api --scope /docs/guide npx mcp-local-rag read-neighbors --file-path /abs/path.md --chunk-index 5 npx mcp-local-rag list npx mcp-local-rag status npx mcp-local-rag delete ./docs/old.pdf npx mcp-local-rag delete --source "https://example.com/docs"
ingest imports the selected files; sync also removes entries for deleted files and skips unchanged files. Use --scope to restrict search results to a path prefix, repeating it to include multiple prefixes.
Global options such as --db-path, --cache-dir, and --model-name go before the subcommand. Subcommand options go after it:
npx mcp-local-rag --db-path ./my-db query "authentication"
Run npx mcp-local-rag --help for the complete command reference.
query writes its results to stdout as JSON, best match first, so it can be piped into another tool. The field-by-field contract is in docs/schema/query-output.schema.json.
If you move a project and want to keep its index, stop the MCP server and other database writers, move the files and database together without changing the directory layout, then run:
npx mcp-local-rag --db-path /new/project/lancedb relocate --from /old/project --to /new/project
Update BASE_DIR/BASE_DIRS, DB_PATH, and any other moved paths in your MCP configuration, then restart the client.
Agent Skills provide query and ingestion guidance for AI assistants:
npx mcp-local-rag skills install --claude-code
npx mcp-local-rag skills install --claude-code --global npx mcp-local-rag skills install --codex
Installed skills cover query formulation, result refinement, and HTML ingestion. Ask the assistant to use the mcp-local-rag skill explicitly if it does not activate automatically.
Start with the defaults. Open the sections below when you need different document roots, better results for your corpus, or searchable PDF figures.
Storage and Document Roots
The MCP server reads environment variables. The CLI accepts the listed variables and flags. Keep the same DB_PATH when commands should use the same index.
| Environment Variable | CLI Flag | Default | Description |
|---|---|---|---|
BASE_DIR | --base-dir | Current directory | One document root; the CLI flag is repeatable on ingest, list, and sync |
BASE_DIRS | N/A | (unset) | JSON array of document roots; takes precedence over BASE_DIR |
IGNORE_PATHS | N/A | (unset) | JSON array of glob patterns for files to keep out of the index |
DB_PATH | --db-path | ./lancedb/ | Vector database location |
CACHE_DIR | --cache-dir | ./models/ | Model cache directory |
HF_ENDPOINT | N/A | https://huggingface.co | Hugging Face model download endpoint; use a mirror URL when direct downloads are blocked |
MAX_FILE_SIZE | --max-file-size | 104857600 (100MB) | Maximum file size in bytes |
File operations stay within configured roots. For multiple directories, set BASE_DIRS='["/absolute/docs","/absolute/specs"]' or repeat CLI --base-dir. Precedence: CLI roots, BASE_DIRS, BASE_DIR, then the current directory. Only the highest-priority source is used; roots from different sources are not merged. Invalid BASE_DIRS is an error. Relative DB_PATH and CACHE_DIR are resolved from the working directory.
To keep files out of the index, set IGNORE_PATHS to a JSON array of glob patterns, for example IGNORE_PATHS='["plugs/**","**/*.draft.md"]'. Each pattern is matched against the file's path relative to the root that contains it, written with / on every OS. * and ** do not match names that start with ., so write such directories out, as in ".obsidian/**". ingest, list, and sync skip matching files when they scan a directory, and sync removes any that are already indexed. Invalid IGNORE_PATHS is an error.
Models and Search Tuning
Choose an embedding model for your documents’ language and subject. Compare settings using questions you actually ask and check which source passages are returned. The model must support mean pooling and L2 normalization, which this tool uses to produce embeddings.
| Environment Variable | CLI Flag | Default | Description |
|---|---|---|---|
MODEL_NAME | --model-name | Xenova/all-MiniLM-L6-v2 | Hugging Face embedding model |
CHUNK_MIN_LENGTH | --chunk-min-length | 50 | Minimum length in characters (1–10000) for ordinary chunks; a fragment of content split to fit the model's token limit can be shorter |
EMBED_TITLE_PREFIX | N/A | false | Add the document title to each chunk's embedding input |
EMBED_HEADING_PREFIX | N/A | false | Add the heading hierarchy to each chunk's embedding input when it fits |
RAG_DEVICE | N/A | cpu | ONNX Runtime execution device |
RAG_DTYPE | N/A | fp32 | Embedding dtype passed to the selected model |
Both prefix options default to false and work independently. Try EMBED_TITLE_PREFIX when a passage needs the document’s overall topic, or EMBED_HEADING_PREFIX when it needs its section’s topic. Enabling both is not always better. They affect embeddings, not the returned text or keyword index; heading context is omitted when it would exceed the input budget.
When changing embedding models, build a fresh index at a new DB_PATH. Vectors from different models are not comparable, even when their dimensions match. After changing RAG_DTYPE or either prefix option, re-ingest all indexed documents before searching. sync skips unchanged files.
The CLI does not read MCP client configuration. When sharing an index, use the same model, RAG_DTYPE, and prefix settings for ingestion and search. A change to RAG_DEVICE alone does not require a new index.
###
앞부분만 보여 드려요. 나머지는 저장소에서 읽어 보세요