ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

MCP Local Rag

โดย damoqiongqiuรุ่น 0.21.0i★ 13iรันบนเครื่องหน้า repo ↗
ชื่อใน registryio.github.damoqiongqiu/mcp-local-rag

วิธีติดตั้ง

ใช้ทำอะไรได้

ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ

  • ต่อแบบ ติดตั้งในเครื่อง
  • บัญชีหรือคีย์ ไม่ต้องใส่คีย์ · ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY)
  • หมวด ค้นข้อมูลและความจำของ AI
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
Semantic code & doc search with keyword boost. AST code nav, auto HF mirror, local, privacy-first.

ใช้คู่กับ

Skill ที่สอน AI ทำงานแบบนี้ ใช้ร่วมกับตัวนี้ได้

timesfm

TimesFM เป็นโมเดลพื้นฐานสำหรับข้อมูลอนุกรมเวลาที่ผ่านการฝึกมาแล้ว พัฒนาโดย Google Research ใช้สำหรับพยากรณ์ข้อมูลอนุกรมเวลา

โดย google-research★ 35,6291 skill

Skill · คู่มือ

Shadowbroker

Open-source intelligence for the global theater. Track everything from the corporate/private jets of the wealthy, and spy satellites, to seismic events in one unified interface. Hook an AI agent up to have it parse through data and find previously unseen correlations. The knowledge is available to…

โดย BigBodyCobain★ 11,6021 skill

Skill · คู่มือ

google-maps-scraper

google-maps-scraper ใช้ดึงข้อมูลสถานที่จาก Google Maps เช่น ชื่อ ที่อยู่ เบอร์โทร เว็บไซต์ คะแนนรีวิว จำนวนรีวิว พิกัดละติจูดลองจิจูด และอีเมล สำหรับแต่ละสถานที่

โดย gosom★ 8,2091 skill

Skill · คู่มือ

ทำไมอยู่อันดับนี้

หน้ารายการเรียงด้วยคะแนนการใช้งาน (เต็ม 100) จากส่วนเหล่านี้

ความนิยม14/80ดาว GitHub หรือยอดดาวน์โหลดต่อสัปดาห์ ค่ามากนับ 60 ค่าน้อยนับ 20
ความสด3/12ออกรุ่นหรือแก้โค้ดใน 30 วัน ได้เต็ม
ระบบยังตอบ0/8endpoint บนคลาวด์ตอบตอนตรวจล่าสุด
คะแนนการใช้งาน17/100

คุณภาพ: ผลตรวจเบื้องต้นผ่าน 3/3 ข้อ (แสดงให้ดู ไม่ได้ใช้เรียง) · ความมาแรง: ยังไม่มีข้อมูล (ใช้เรียงเฉพาะแท็บมาแรง)

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ให้ AI ติดตั้งให้ด้วยประโยคเดียว

ติดตั้ง MCP Local Rag ให้หน่อย ทำตาม https://mcp.popnx.com/i/damoqiongqiu-mcp-local-rag.md แสดงคำสั่งให้ฉันดูและรอฉันตกลงก่อนรัน

คัดลอกไปวางในแชตของ AI ที่ทำงานในเครื่องคุณได้ (เช่น Claude Code, Cursor) · AI จะอ่านขั้นตอนจากเรา แสดงคำสั่งให้ดู และรอคุณตกลงก่อน · ไม่ต้องใช้คีย์ ไม่ต้องสมัคร · ดูข้อความเต็มที่ AI จะอ่าน

ผลตรวจผ่าน 3/3 · ทำงานบนเครื่องคุณ · ✓ ตรวจคำสั่งแล้ว 14 พ.ย. 2569

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ Claude AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ MCP Local Rag ให้ Claude ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): { "mcpServers": { "local-rag": { "command": "npx", "args": [ "-y", "@damoqiongqiu/mcp-local-rag" ], "env": { "HTTPS_PROXY": "ใส่ค่าของคุณ" } } } } 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง HTTPS_PROXY ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ MCP Local Rag ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • HTTPS_PROXY URL ของพรอกซี HTTPS สำหรับดาวน์โหลดโมเดล embedding (เช่น http://proxy:8080) จำเป็นเฉพาะเมื่ออยู่หลังพรอกซีขององค์กรเท่านั้น
      ดูต้นฉบับภาษาอังกฤษHTTPS proxy URL for downloading embedding models (e.g. http://proxy:8080). Required only if behind a corporate proxy.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. เปิดไฟล์ตั้งค่าของแอป Claude บนคอม

    SettingsDeveloperEdit Config

  4. วางค่าตั้งนี้แล้วบันทึกไฟล์

    {
      "mcpServers": {
        "local-rag": {
          "command": "npx",
          "args": [
            "-y",
            "@damoqiongqiu/mcp-local-rag"
          ],
          "env": {
            "HTTPS_PROXY": "ใส่ค่าของคุณ"
          }
        }
      }
    }
  5. ปิดแอป Claude แล้วเปิดใหม่

  6. ลองเลย

    ใช้ MCP Local Rag บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ MCP Local Rag หรือมีชื่อเครื่องมือของ MCP Local Rag ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 17 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • BASE_DIR ไดเรกทอรีฐานสำหรับจัดเก็บเอกสาร (ค่าเริ่มต้นคือไดเรกทอรีทำงานปัจจุบัน) จะถูกละเว้นเมื่อมีการตั้งค่า BASE_DIRS
    ดูต้นฉบับภาษาอังกฤษBase directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.
  • BASE_DIRS อาร์เรย์ JSON ของไดเรกทอรีฐาน (เช่น '"/a","/b"') มีลำดับความสำคัญเหนือ BASE_DIR
    ดูต้นฉบับภาษาอังกฤษJSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.
  • DB_PATH เส้นทางไปยังไดเรกทอรีฐานข้อมูล LanceDB (ค่าเริ่มต้นคือ ./lancedb/)
    ดูต้นฉบับภาษาอังกฤษPath to LanceDB database directory (defaults to ./lancedb/)
  • CACHE_DIR ไดเรกทอรีที่แคชโมเดลของ Transformers.js (ค่าเริ่มต้นคือ ./models/)
    ดูต้นฉบับภาษาอังกฤษDirectory where Transformers.js models are cached (defaults to ./models/)
  • MODEL_NAME ชื่อโมเดลการฝัง (ค่าเริ่มต้นคือ Xenova/all-MiniLM-L6-v2)
    ดูต้นฉบับภาษาอังกฤษEmbedding model name (defaults to Xenova/all-MiniLM-L6-v2)
  • MAX_FILE_SIZE ขนาดไฟล์สูงสุดเป็นไบต์ (ค่าเริ่มต้นคือ 104857600 / 100MB)
    ดูต้นฉบับภาษาอังกฤษMaximum file size in bytes (defaults to 104857600 / 100MB)
  • RAG_MAX_DISTANCE Maximum distance threshold for filtering search results. Results with distance greater than this value will be excluded. Lower values mean stricter filtering (e.g., 0.5 for high relevance only)
  • RAG_GROUPING Grouping mode for quality filtering. 'similar' returns only the most similar group (stops at first distance jump). 'related' includes related groups (stops at second distance jump). Unset means no gr…
  • RAG_MAX_FILES Maximum number of files to keep in search results. Results are filtered to include only chunks from the top N best-scoring files. For example, 1 returns only the single best-matching file's chunks. U…
  • CHUNK_MIN_LENGTH ความยาวขั้นต่ำของชังก์เป็นจำนวนอักขระ (1-10000 ค่าเริ่มต้นคือ 50) ชังก์ที่สั้นกว่าค่าขีดจำกัดนี้จะถูกกรองออกระหว่างการนำเข้าข้อมูล
    ดูต้นฉบับภาษาอังกฤษMinimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.
  • RAG_DEVICE Execution device for the embedder (defaults to cpu). Passed straight to ONNX Runtime; see the Transformers.js device source for the supported backend names. If the requested device fails to initializ…
  • RAG_DTYPE Embedding quantization dtype for the embedder (defaults to fp32). Opt-in and pass-through; accepts any dtype the chosen model provides (fp32, fp16, q8, int8, ...). If the model has no variant for the…
  • RAG_HYBRID_WEIGHT Keyword boost factor for hybrid search (0.0-1.0, defaults to 0.6). 0 means semantic similarity only; higher values increase the keyword-match contribution to the final score.
  • RAG_WATCH เปิดใช้ตัวเฝ้าดูไฟล์อัตโนมัติเพื่อตรวจจับการเปลี่ยนแปลงและจัดทำดัชนีไฟล์ที่แก้ไขใหม่ (true/1 เพื่อเปิดใช้) มีประโยชน์ระหว่างการพัฒนาอย่างต่อเนื่อง
    ดูต้นฉบับภาษาอังกฤษEnable automatic file watcher to detect changes and re-index modified files (true/1 to enable). Useful during active development.
  • HF_ENDPOINT URL ของ endpoint HuggingFace ที่ใช้ดาวน์โหลดโมเดลแบบระบุชัดเจน เมื่อกำหนดค่านี้ ระบบจะข้ามการตรวจจับมิเรอร์อัตโนมัติและใช้ URL นี้โดยตรง มีประโยชน์เมื่อคุณมีมิเรอร์ที่ครบถ้วน
    ดูต้นฉบับภาษาอังกฤษExplicit HuggingFace endpoint URL to use for model downloads. When set, auto-mirror detection is skipped and this URL is used directly. Useful when you have a full-featured mirror.
  • HF_AUTO_MIRROR เปิดใช้การตรวจจับมิเรอร์อัตโนมัติสำหรับการดาวน์โหลดจาก HuggingFace (ค่าเริ่มต้นเป็น true) ตั้งเป็น "false" หรือ "0" เพื่อปิดและใช้ huggingface.co โดยตรง ลำดับมิเรอร์คือ huggingface.co → hf-mirror.com →…
    ดูต้นฉบับภาษาอังกฤษEnable automatic mirror detection for HuggingFace downloads (defaults to true). Set to "false" or "0" to disable and use huggingface.co directly. The mirror chain is: huggingface.co → hf-mirror.com →…
  • HTTP_PROXY URL ของพร็อกซี HTTP สำหรับดาวน์โหลดโมเดล embedding ใช้เป็นค่าสำรองเมื่อไม่ได้ตั้งค่า HTTPS_PROXY
    ดูต้นฉบับภาษาอังกฤษHTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set.

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ChatGPT ยังต่อ MCP Local Rag ไม่ได้

MCP Local Rag ต้องติดตั้งในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะตัวที่ทำงานบนเว็บ

คุณทำแบบนี้แทนได้

ก · ใช้แอปที่ต่อ MCP Local Rag ได้

  • ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว) · ใช้ได้เฉพาะแอป Claude บนคอม (Windows หรือ Mac) ไม่ใช่บนเว็บหรือมือถือ
  • ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)
  • ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ข · ตัวอื่นในหมวด ค้นข้อมูลและความจำของ AI ที่ต่อกับ ChatGPT ได้

เลือกจากตัวที่ใช้มากในหมวดเดียวกัน เฉพาะตัวที่ต่อด้วยที่อยู่ได้โดยไม่ต้องใส่คีย์

ต่อกับ Claude Code ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ Claude Code AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ MCP Local Rag ให้ Claude Code ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): claude mcp add --scope user local-rag --env HTTPS_PROXY='ใส่ค่าของคุณ' -- npx -y @damoqiongqiu/mcp-local-rag 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง HTTPS_PROXY ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ MCP Local Rag ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • HTTPS_PROXY URL ของพรอกซี HTTPS สำหรับดาวน์โหลดโมเดล embedding (เช่น http://proxy:8080) จำเป็นเฉพาะเมื่ออยู่หลังพรอกซีขององค์กรเท่านั้น
      ดูต้นฉบับภาษาอังกฤษHTTPS proxy URL for downloading embedding models (e.g. http://proxy:8080). Required only if behind a corporate proxy.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  4. วางคำสั่งนี้แล้วกด Enter

    claude mcp add --scope user local-rag --env HTTPS_PROXY='ใส่ค่าของคุณ' -- npx -y @damoqiongqiu/mcp-local-rag
  5. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น MCP Local Rag ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  6. ลองเลย

    ใช้ MCP Local Rag บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ MCP Local Rag หรือมีชื่อเครื่องมือของ MCP Local Rag ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 17 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • BASE_DIR ไดเรกทอรีฐานสำหรับจัดเก็บเอกสาร (ค่าเริ่มต้นคือไดเรกทอรีทำงานปัจจุบัน) จะถูกละเว้นเมื่อมีการตั้งค่า BASE_DIRS
    ดูต้นฉบับภาษาอังกฤษBase directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.
  • BASE_DIRS อาร์เรย์ JSON ของไดเรกทอรีฐาน (เช่น '"/a","/b"') มีลำดับความสำคัญเหนือ BASE_DIR
    ดูต้นฉบับภาษาอังกฤษJSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.
  • DB_PATH เส้นทางไปยังไดเรกทอรีฐานข้อมูล LanceDB (ค่าเริ่มต้นคือ ./lancedb/)
    ดูต้นฉบับภาษาอังกฤษPath to LanceDB database directory (defaults to ./lancedb/)
  • CACHE_DIR ไดเรกทอรีที่แคชโมเดลของ Transformers.js (ค่าเริ่มต้นคือ ./models/)
    ดูต้นฉบับภาษาอังกฤษDirectory where Transformers.js models are cached (defaults to ./models/)
  • MODEL_NAME ชื่อโมเดลการฝัง (ค่าเริ่มต้นคือ Xenova/all-MiniLM-L6-v2)
    ดูต้นฉบับภาษาอังกฤษEmbedding model name (defaults to Xenova/all-MiniLM-L6-v2)
  • MAX_FILE_SIZE ขนาดไฟล์สูงสุดเป็นไบต์ (ค่าเริ่มต้นคือ 104857600 / 100MB)
    ดูต้นฉบับภาษาอังกฤษMaximum file size in bytes (defaults to 104857600 / 100MB)
  • RAG_MAX_DISTANCE Maximum distance threshold for filtering search results. Results with distance greater than this value will be excluded. Lower values mean stricter filtering (e.g., 0.5 for high relevance only)
  • RAG_GROUPING Grouping mode for quality filtering. 'similar' returns only the most similar group (stops at first distance jump). 'related' includes related groups (stops at second distance jump). Unset means no gr…
  • RAG_MAX_FILES Maximum number of files to keep in search results. Results are filtered to include only chunks from the top N best-scoring files. For example, 1 returns only the single best-matching file's chunks. U…
  • CHUNK_MIN_LENGTH ความยาวขั้นต่ำของชังก์เป็นจำนวนอักขระ (1-10000 ค่าเริ่มต้นคือ 50) ชังก์ที่สั้นกว่าค่าขีดจำกัดนี้จะถูกกรองออกระหว่างการนำเข้าข้อมูล
    ดูต้นฉบับภาษาอังกฤษMinimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.
  • RAG_DEVICE Execution device for the embedder (defaults to cpu). Passed straight to ONNX Runtime; see the Transformers.js device source for the supported backend names. If the requested device fails to initializ…
  • RAG_DTYPE Embedding quantization dtype for the embedder (defaults to fp32). Opt-in and pass-through; accepts any dtype the chosen model provides (fp32, fp16, q8, int8, ...). If the model has no variant for the…
  • RAG_HYBRID_WEIGHT Keyword boost factor for hybrid search (0.0-1.0, defaults to 0.6). 0 means semantic similarity only; higher values increase the keyword-match contribution to the final score.
  • RAG_WATCH เปิดใช้ตัวเฝ้าดูไฟล์อัตโนมัติเพื่อตรวจจับการเปลี่ยนแปลงและจัดทำดัชนีไฟล์ที่แก้ไขใหม่ (true/1 เพื่อเปิดใช้) มีประโยชน์ระหว่างการพัฒนาอย่างต่อเนื่อง
    ดูต้นฉบับภาษาอังกฤษEnable automatic file watcher to detect changes and re-index modified files (true/1 to enable). Useful during active development.
  • HF_ENDPOINT URL ของ endpoint HuggingFace ที่ใช้ดาวน์โหลดโมเดลแบบระบุชัดเจน เมื่อกำหนดค่านี้ ระบบจะข้ามการตรวจจับมิเรอร์อัตโนมัติและใช้ URL นี้โดยตรง มีประโยชน์เมื่อคุณมีมิเรอร์ที่ครบถ้วน
    ดูต้นฉบับภาษาอังกฤษExplicit HuggingFace endpoint URL to use for model downloads. When set, auto-mirror detection is skipped and this URL is used directly. Useful when you have a full-featured mirror.
  • HF_AUTO_MIRROR เปิดใช้การตรวจจับมิเรอร์อัตโนมัติสำหรับการดาวน์โหลดจาก HuggingFace (ค่าเริ่มต้นเป็น true) ตั้งเป็น "false" หรือ "0" เพื่อปิดและใช้ huggingface.co โดยตรง ลำดับมิเรอร์คือ huggingface.co → hf-mirror.com →…
    ดูต้นฉบับภาษาอังกฤษEnable automatic mirror detection for HuggingFace downloads (defaults to true). Set to "false" or "0" to disable and use huggingface.co directly. The mirror chain is: huggingface.co → hf-mirror.com →…
  • HTTP_PROXY URL ของพร็อกซี HTTP สำหรับดาวน์โหลดโมเดล embedding ใช้เป็นค่าสำรองเมื่อไม่ได้ตั้งค่า HTTPS_PROXY
    ดูต้นฉบับภาษาอังกฤษHTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set.

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ Cursor AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ MCP Local Rag ให้ Cursor ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): { "mcpServers": { "local-rag": { "command": "npx", "args": [ "-y", "@damoqiongqiu/mcp-local-rag" ], "env": { "HTTPS_PROXY": "ใส่ค่าของคุณ" } } } } 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง HTTPS_PROXY ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ MCP Local Rag ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • HTTPS_PROXY URL ของพรอกซี HTTPS สำหรับดาวน์โหลดโมเดล embedding (เช่น http://proxy:8080) จำเป็นเฉพาะเมื่ออยู่หลังพรอกซีขององค์กรเท่านั้น
      ดูต้นฉบับภาษาอังกฤษHTTPS proxy URL for downloading embedding models (e.g. http://proxy:8080). Required only if behind a corporate proxy.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. กดปุ่มนี้เพื่อเปิด Cursor

    เปิดใน Cursor

    Cursor จะถามยืนยันการติดตั้ง ให้กด Install

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ MCP Local Rag ช่อง HTTPS_PROXY ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

  5. เปิดแชตของ AI ใน Cursor โหมด Agent

  6. ลองเลย

    ใช้ MCP Local Rag บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ MCP Local Rag หรือมีชื่อเครื่องมือของ MCP Local Rag ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 17 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • BASE_DIR ไดเรกทอรีฐานสำหรับจัดเก็บเอกสาร (ค่าเริ่มต้นคือไดเรกทอรีทำงานปัจจุบัน) จะถูกละเว้นเมื่อมีการตั้งค่า BASE_DIRS
    ดูต้นฉบับภาษาอังกฤษBase directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.
  • BASE_DIRS อาร์เรย์ JSON ของไดเรกทอรีฐาน (เช่น '"/a","/b"') มีลำดับความสำคัญเหนือ BASE_DIR
    ดูต้นฉบับภาษาอังกฤษJSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.
  • DB_PATH เส้นทางไปยังไดเรกทอรีฐานข้อมูล LanceDB (ค่าเริ่มต้นคือ ./lancedb/)
    ดูต้นฉบับภาษาอังกฤษPath to LanceDB database directory (defaults to ./lancedb/)
  • CACHE_DIR ไดเรกทอรีที่แคชโมเดลของ Transformers.js (ค่าเริ่มต้นคือ ./models/)
    ดูต้นฉบับภาษาอังกฤษDirectory where Transformers.js models are cached (defaults to ./models/)
  • MODEL_NAME ชื่อโมเดลการฝัง (ค่าเริ่มต้นคือ Xenova/all-MiniLM-L6-v2)
    ดูต้นฉบับภาษาอังกฤษEmbedding model name (defaults to Xenova/all-MiniLM-L6-v2)
  • MAX_FILE_SIZE ขนาดไฟล์สูงสุดเป็นไบต์ (ค่าเริ่มต้นคือ 104857600 / 100MB)
    ดูต้นฉบับภาษาอังกฤษMaximum file size in bytes (defaults to 104857600 / 100MB)
  • RAG_MAX_DISTANCE Maximum distance threshold for filtering search results. Results with distance greater than this value will be excluded. Lower values mean stricter filtering (e.g., 0.5 for high relevance only)
  • RAG_GROUPING Grouping mode for quality filtering. 'similar' returns only the most similar group (stops at first distance jump). 'related' includes related groups (stops at second distance jump). Unset means no gr…
  • RAG_MAX_FILES Maximum number of files to keep in search results. Results are filtered to include only chunks from the top N best-scoring files. For example, 1 returns only the single best-matching file's chunks. U…
  • CHUNK_MIN_LENGTH ความยาวขั้นต่ำของชังก์เป็นจำนวนอักขระ (1-10000 ค่าเริ่มต้นคือ 50) ชังก์ที่สั้นกว่าค่าขีดจำกัดนี้จะถูกกรองออกระหว่างการนำเข้าข้อมูล
    ดูต้นฉบับภาษาอังกฤษMinimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.
  • RAG_DEVICE Execution device for the embedder (defaults to cpu). Passed straight to ONNX Runtime; see the Transformers.js device source for the supported backend names. If the requested device fails to initializ…
  • RAG_DTYPE Embedding quantization dtype for the embedder (defaults to fp32). Opt-in and pass-through; accepts any dtype the chosen model provides (fp32, fp16, q8, int8, ...). If the model has no variant for the…
  • RAG_HYBRID_WEIGHT Keyword boost factor for hybrid search (0.0-1.0, defaults to 0.6). 0 means semantic similarity only; higher values increase the keyword-match contribution to the final score.
  • RAG_WATCH เปิดใช้ตัวเฝ้าดูไฟล์อัตโนมัติเพื่อตรวจจับการเปลี่ยนแปลงและจัดทำดัชนีไฟล์ที่แก้ไขใหม่ (true/1 เพื่อเปิดใช้) มีประโยชน์ระหว่างการพัฒนาอย่างต่อเนื่อง
    ดูต้นฉบับภาษาอังกฤษEnable automatic file watcher to detect changes and re-index modified files (true/1 to enable). Useful during active development.
  • HF_ENDPOINT URL ของ endpoint HuggingFace ที่ใช้ดาวน์โหลดโมเดลแบบระบุชัดเจน เมื่อกำหนดค่านี้ ระบบจะข้ามการตรวจจับมิเรอร์อัตโนมัติและใช้ URL นี้โดยตรง มีประโยชน์เมื่อคุณมีมิเรอร์ที่ครบถ้วน
    ดูต้นฉบับภาษาอังกฤษExplicit HuggingFace endpoint URL to use for model downloads. When set, auto-mirror detection is skipped and this URL is used directly. Useful when you have a full-featured mirror.
  • HF_AUTO_MIRROR เปิดใช้การตรวจจับมิเรอร์อัตโนมัติสำหรับการดาวน์โหลดจาก HuggingFace (ค่าเริ่มต้นเป็น true) ตั้งเป็น "false" หรือ "0" เพื่อปิดและใช้ huggingface.co โดยตรง ลำดับมิเรอร์คือ huggingface.co → hf-mirror.com →…
    ดูต้นฉบับภาษาอังกฤษEnable automatic mirror detection for HuggingFace downloads (defaults to true). Set to "false" or "0" to disable and use huggingface.co directly. The mirror chain is: huggingface.co → hf-mirror.com →…
  • HTTP_PROXY URL ของพร็อกซี HTTP สำหรับดาวน์โหลดโมเดล embedding ใช้เป็นค่าสำรองเมื่อไม่ได้ตั้งค่า HTTPS_PROXY
    ดูต้นฉบับภาษาอังกฤษHTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set.

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ แต่ต้องเตรียมก่อน

ต้องกรอกค่าตั้ง 1 ช่อง (HTTPS_PROXY) · ต้องลง Node.js ในเครื่องก่อน (ทำครั้งเดียว)

ให้ AI ติดตั้งให้

คัดลอกข้อความนี้ไปวางในแชตของ VS Code AI จะเช็กเครื่อง บอกว่าจะแก้ไฟล์ไหน และรอคุณตกลงก่อนทุกครั้ง

ช่วยติดตั้ง MCP server ชื่อ MCP Local Rag ให้ VS Code ในเครื่องนี้ ทำตามลำดับ 1) เช็กว่ามี Node.js ด้วยคำสั่ง node -v ถ้าไม่มี ให้บอกฉันไปลงจาก https://nodejs.org/en/download ห้ามลงเอง 2) ใช้คอนฟิกนี้เท่านั้น (ผ่านตัวตรวจของ PopNx MCP แล้ว): { "servers": { "local-rag": { "type": "stdio", "command": "npx", "args": [ "-y", "@damoqiongqiu/mcp-local-rag" ], "env": { "HTTPS_PROXY": "ใส่ค่าของคุณ" } } } } 3) บอก path เต็มของไฟล์ที่จะแก้ หรือคำสั่งที่จะรัน แล้วรอฉันตกลงก่อน 4) ช่อง HTTPS_PROXY ให้คงคำว่า "ใส่ค่าของคุณ" ไว้ก่อน แล้วบอกให้ฉันวางค่าจริงเองในไฟล์หรือช่องของแอป ห้ามขอให้ฉันพิมพ์คีย์ในแชต 5) ทำตามที่ตกลง แล้วตรวจว่าเครื่องมือของ MCP Local Rag ขึ้นจริง

ข้อความนี้ไม่มีคีย์ของคุณ ถ้าต้องใช้คีย์ AI จะบอกให้คุณวางเองในไฟล์หรือช่องของแอป

  1. ลง Node.js ในเครื่อง (ถ้ายังไม่มี)

    ลงไว้แล้วหรือยัง? เช็กก่อน · เปิด Terminal แล้วพิมพ์คำสั่งนี้ กด Enter

    node -v
    • ขึ้นเลขรุ่น เช่น v26.13.1 = ลงแล้ว ข้ามขั้นนี้ได้
    • ขึ้นว่า "command not found" (Windows ขึ้นว่า "is not recognized") = ยังไม่ได้ลง หรือเพิ่งลงแต่ยังไม่ได้ปิดแล้วเปิด Terminal ใหม่
    เปิด Terminal ยังไง

    Mac: กด ⌘ + Space พิมพ์ Terminal แล้วกด Enter

    Windows: เปิดเมนู Start พิมพ์ Windows PowerShell แล้วกด Open

    ยังไม่ได้ลง: เปิดหน้าดาวน์โหลดทางการ เลือกรุ่น LTS แล้วเลือกตัวติดตั้งแบบกดเอง: Mac ไฟล์ .pkg · Windows ไฟล์ .msi ดับเบิลคลิกแล้วกดถัดไปจนจบ ไม่ต้องใช้คำสั่ง curl

    เปิดหน้าดาวน์โหลด Node.js ↗

    ลงเสร็จแล้ว ปิด Terminal เปิดใหม่ แล้วพิมพ์คำสั่งเดิมอีกครั้ง ต้องขึ้นเลขรุ่น: node -v

    ลงครั้งเดียว ใช้ได้กับทุกตัวที่ต้องใช้ Node.js

  2. กรอกค่าตั้ง 1 ช่อง

    ค่าเหล่านี้เป็นค่าตั้งของโปรแกรม ไม่ใช่คีย์ ไม่ต้องสมัครอะไร ใส่ตามที่ผู้ทำอธิบาย

    • HTTPS_PROXY URL ของพรอกซี HTTPS สำหรับดาวน์โหลดโมเดล embedding (เช่น http://proxy:8080) จำเป็นเฉพาะเมื่ออยู่หลังพรอกซีขององค์กรเท่านั้น
      ดูต้นฉบับภาษาอังกฤษHTTPS proxy URL for downloading embedding models (e.g. http://proxy:8080). Required only if behind a corporate proxy.

    คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

  3. กดปุ่มนี้เพื่อเปิด VS Code

    เปิดใน VS Code

    VS Code จะถามยืนยันการติดตั้ง ให้กด Install

  4. ใส่คีย์ในช่องที่ว่างไว้

    ในค่าตั้งของ MCP Local Rag ช่อง HTTPS_PROXY ยังว่าง ใส่คีย์ของคุณแล้วบันทึก

  5. เปิดแชตของ AI ใน VS Code โหมด Agent

  6. ลองเลย

    ใช้ MCP Local Rag บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ MCP Local Rag หรือมีชื่อเครื่องมือของ MCP Local Rag ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ค่าตั้งเพิ่มเติม 17 ช่อง (ไม่ต้องกรอกก็ใช้ได้)

คำสั่งด้านบนใช้ได้เลยโดยไม่ต้องใส่ค่าเหล่านี้ ถ้าอยากปรับค่อยเพิ่มเองตามคำอธิบายของผู้ทำ

  • BASE_DIR ไดเรกทอรีฐานสำหรับจัดเก็บเอกสาร (ค่าเริ่มต้นคือไดเรกทอรีทำงานปัจจุบัน) จะถูกละเว้นเมื่อมีการตั้งค่า BASE_DIRS
    ดูต้นฉบับภาษาอังกฤษBase directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.
  • BASE_DIRS อาร์เรย์ JSON ของไดเรกทอรีฐาน (เช่น '"/a","/b"') มีลำดับความสำคัญเหนือ BASE_DIR
    ดูต้นฉบับภาษาอังกฤษJSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.
  • DB_PATH เส้นทางไปยังไดเรกทอรีฐานข้อมูล LanceDB (ค่าเริ่มต้นคือ ./lancedb/)
    ดูต้นฉบับภาษาอังกฤษPath to LanceDB database directory (defaults to ./lancedb/)
  • CACHE_DIR ไดเรกทอรีที่แคชโมเดลของ Transformers.js (ค่าเริ่มต้นคือ ./models/)
    ดูต้นฉบับภาษาอังกฤษDirectory where Transformers.js models are cached (defaults to ./models/)
  • MODEL_NAME ชื่อโมเดลการฝัง (ค่าเริ่มต้นคือ Xenova/all-MiniLM-L6-v2)
    ดูต้นฉบับภาษาอังกฤษEmbedding model name (defaults to Xenova/all-MiniLM-L6-v2)
  • MAX_FILE_SIZE ขนาดไฟล์สูงสุดเป็นไบต์ (ค่าเริ่มต้นคือ 104857600 / 100MB)
    ดูต้นฉบับภาษาอังกฤษMaximum file size in bytes (defaults to 104857600 / 100MB)
  • RAG_MAX_DISTANCE Maximum distance threshold for filtering search results. Results with distance greater than this value will be excluded. Lower values mean stricter filtering (e.g., 0.5 for high relevance only)
  • RAG_GROUPING Grouping mode for quality filtering. 'similar' returns only the most similar group (stops at first distance jump). 'related' includes related groups (stops at second distance jump). Unset means no gr…
  • RAG_MAX_FILES Maximum number of files to keep in search results. Results are filtered to include only chunks from the top N best-scoring files. For example, 1 returns only the single best-matching file's chunks. U…
  • CHUNK_MIN_LENGTH ความยาวขั้นต่ำของชังก์เป็นจำนวนอักขระ (1-10000 ค่าเริ่มต้นคือ 50) ชังก์ที่สั้นกว่าค่าขีดจำกัดนี้จะถูกกรองออกระหว่างการนำเข้าข้อมูล
    ดูต้นฉบับภาษาอังกฤษMinimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.
  • RAG_DEVICE Execution device for the embedder (defaults to cpu). Passed straight to ONNX Runtime; see the Transformers.js device source for the supported backend names. If the requested device fails to initializ…
  • RAG_DTYPE Embedding quantization dtype for the embedder (defaults to fp32). Opt-in and pass-through; accepts any dtype the chosen model provides (fp32, fp16, q8, int8, ...). If the model has no variant for the…
  • RAG_HYBRID_WEIGHT Keyword boost factor for hybrid search (0.0-1.0, defaults to 0.6). 0 means semantic similarity only; higher values increase the keyword-match contribution to the final score.
  • RAG_WATCH เปิดใช้ตัวเฝ้าดูไฟล์อัตโนมัติเพื่อตรวจจับการเปลี่ยนแปลงและจัดทำดัชนีไฟล์ที่แก้ไขใหม่ (true/1 เพื่อเปิดใช้) มีประโยชน์ระหว่างการพัฒนาอย่างต่อเนื่อง
    ดูต้นฉบับภาษาอังกฤษEnable automatic file watcher to detect changes and re-index modified files (true/1 to enable). Useful during active development.
  • HF_ENDPOINT URL ของ endpoint HuggingFace ที่ใช้ดาวน์โหลดโมเดลแบบระบุชัดเจน เมื่อกำหนดค่านี้ ระบบจะข้ามการตรวจจับมิเรอร์อัตโนมัติและใช้ URL นี้โดยตรง มีประโยชน์เมื่อคุณมีมิเรอร์ที่ครบถ้วน
    ดูต้นฉบับภาษาอังกฤษExplicit HuggingFace endpoint URL to use for model downloads. When set, auto-mirror detection is skipped and this URL is used directly. Useful when you have a full-featured mirror.
  • HF_AUTO_MIRROR เปิดใช้การตรวจจับมิเรอร์อัตโนมัติสำหรับการดาวน์โหลดจาก HuggingFace (ค่าเริ่มต้นเป็น true) ตั้งเป็น "false" หรือ "0" เพื่อปิดและใช้ huggingface.co โดยตรง ลำดับมิเรอร์คือ huggingface.co → hf-mirror.com →…
    ดูต้นฉบับภาษาอังกฤษEnable automatic mirror detection for HuggingFace downloads (defaults to true). Set to "false" or "0" to disable and use huggingface.co directly. The mirror chain is: huggingface.co → hf-mirror.com →…
  • HTTP_PROXY URL ของพร็อกซี HTTP สำหรับดาวน์โหลดโมเดล embedding ใช้เป็นค่าสำรองเมื่อไม่ได้ตั้งค่า HTTPS_PROXY
    ดูต้นฉบับภาษาอังกฤษHTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set.

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ MCP Local Rag อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ติดตั้งในเครื่อง

Claude Code

claude mcp add --scope user local-rag --env HTTPS_PROXY='ใส่ค่าของคุณ' -- npx -y @damoqiongqiu/mcp-local-rag

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "@damoqiongqiu/mcp-local-rag"
      ],
      "env": {
        "HTTPS_PROXY": "ใส่ค่าของคุณ"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "local-rag": {
      "command": "npx",
      "args": [
        "-y",
        "@damoqiongqiu/mcp-local-rag"
      ],
      "env": {
        "HTTPS_PROXY": "ใส่ค่าของคุณ"
      }
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "local-rag": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@damoqiongqiu/mcp-local-rag"
      ],
      "env": {
        "HTTPS_PROXY": "ใส่ค่าของคุณ"
      }
    }
  }
}

ค่าที่ต้องใส่เอง

  • BASE_DIR env
    ไดเรกทอรีฐานสำหรับจัดเก็บเอกสาร (ค่าเริ่มต้นคือไดเรกทอรีทำงานปัจจุบัน) จะถูกละเว้นเมื่อมีการตั้งค่า BASE_DIRS
    ดูต้นฉบับภาษาอังกฤษBase directory for document storage (defaults to current working directory). Ignored when BASE_DIRS is set.
  • BASE_DIRS env
    อาร์เรย์ JSON ของไดเรกทอรีฐาน (เช่น '"/a","/b"') มีลำดับความสำคัญเหนือ BASE_DIR
    ดูต้นฉบับภาษาอังกฤษJSON array of base directories (e.g. '["/a","/b"]'). Takes precedence over BASE_DIR.
  • DB_PATH env
    เส้นทางไปยังไดเรกทอรีฐานข้อมูล LanceDB (ค่าเริ่มต้นคือ ./lancedb/)
    ดูต้นฉบับภาษาอังกฤษPath to LanceDB database directory (defaults to ./lancedb/)
  • CACHE_DIR env
    ไดเรกทอรีที่แคชโมเดลของ Transformers.js (ค่าเริ่มต้นคือ ./models/)
    ดูต้นฉบับภาษาอังกฤษDirectory where Transformers.js models are cached (defaults to ./models/)
  • MODEL_NAME env
    ชื่อโมเดลการฝัง (ค่าเริ่มต้นคือ Xenova/all-MiniLM-L6-v2)
    ดูต้นฉบับภาษาอังกฤษEmbedding model name (defaults to Xenova/all-MiniLM-L6-v2)
  • MAX_FILE_SIZE env
    ขนาดไฟล์สูงสุดเป็นไบต์ (ค่าเริ่มต้นคือ 104857600 / 100MB)
    ดูต้นฉบับภาษาอังกฤษMaximum file size in bytes (defaults to 104857600 / 100MB)
  • RAG_MAX_DISTANCE env
    Maximum distance threshold for filtering search results. Results with distance greater than this value will be excluded. Lower values mean stricter filtering (e.g., 0.5 for high relevance only)
  • RAG_GROUPING env
    Grouping mode for quality filtering. 'similar' returns only the most similar group (stops at first distance jump). 'related' includes related groups (stops at second distance jump). Unset means no gr…
  • RAG_MAX_FILES env
    Maximum number of files to keep in search results. Results are filtered to include only chunks from the top N best-scoring files. For example, 1 returns only the single best-matching file's chunks. U…
  • CHUNK_MIN_LENGTH env
    ความยาวขั้นต่ำของชังก์เป็นจำนวนอักขระ (1-10000 ค่าเริ่มต้นคือ 50) ชังก์ที่สั้นกว่าค่าขีดจำกัดนี้จะถูกกรองออกระหว่างการนำเข้าข้อมูล
    ดูต้นฉบับภาษาอังกฤษMinimum chunk length in characters (1-10000, defaults to 50). Chunks shorter than this threshold are filtered out during ingestion.
  • RAG_DEVICE env
    Execution device for the embedder (defaults to cpu). Passed straight to ONNX Runtime; see the Transformers.js device source for the supported backend names. If the requested device fails to initializ…
  • RAG_DTYPE env
    Embedding quantization dtype for the embedder (defaults to fp32). Opt-in and pass-through; accepts any dtype the chosen model provides (fp32, fp16, q8, int8, ...). If the model has no variant for the…
  • RAG_HYBRID_WEIGHT env
    Keyword boost factor for hybrid search (0.0-1.0, defaults to 0.6). 0 means semantic similarity only; higher values increase the keyword-match contribution to the final score.
  • RAG_WATCH env
    เปิดใช้ตัวเฝ้าดูไฟล์อัตโนมัติเพื่อตรวจจับการเปลี่ยนแปลงและจัดทำดัชนีไฟล์ที่แก้ไขใหม่ (true/1 เพื่อเปิดใช้) มีประโยชน์ระหว่างการพัฒนาอย่างต่อเนื่อง
    ดูต้นฉบับภาษาอังกฤษEnable automatic file watcher to detect changes and re-index modified files (true/1 to enable). Useful during active development.
  • HF_ENDPOINT env
    URL ของ endpoint HuggingFace ที่ใช้ดาวน์โหลดโมเดลแบบระบุชัดเจน เมื่อกำหนดค่านี้ ระบบจะข้ามการตรวจจับมิเรอร์อัตโนมัติและใช้ URL นี้โดยตรง มีประโยชน์เมื่อคุณมีมิเรอร์ที่ครบถ้วน
    ดูต้นฉบับภาษาอังกฤษExplicit HuggingFace endpoint URL to use for model downloads. When set, auto-mirror detection is skipped and this URL is used directly. Useful when you have a full-featured mirror.
  • HF_AUTO_MIRROR env
    เปิดใช้การตรวจจับมิเรอร์อัตโนมัติสำหรับการดาวน์โหลดจาก HuggingFace (ค่าเริ่มต้นเป็น true) ตั้งเป็น "false" หรือ "0" เพื่อปิดและใช้ huggingface.co โดยตรง ลำดับมิเรอร์คือ huggingface.co → hf-mirror.com →…
    ดูต้นฉบับภาษาอังกฤษEnable automatic mirror detection for HuggingFace downloads (defaults to true). Set to "false" or "0" to disable and use huggingface.co directly. The mirror chain is: huggingface.co → hf-mirror.com →…
  • HTTPS_PROXY จำเป็น env
    URL ของพรอกซี HTTPS สำหรับดาวน์โหลดโมเดล embedding (เช่น http://proxy:8080) จำเป็นเฉพาะเมื่ออยู่หลังพรอกซีขององค์กรเท่านั้น
    ดูต้นฉบับภาษาอังกฤษHTTPS proxy URL for downloading embedding models (e.g. http://proxy:8080). Required only if behind a corporate proxy.
  • HTTP_PROXY env
    URL ของพร็อกซี HTTP สำหรับดาวน์โหลดโมเดล embedding ใช้เป็นค่าสำรองเมื่อไม่ได้ตั้งค่า HTTPS_PROXY
    ดูต้นฉบับภาษาอังกฤษHTTP proxy URL for downloading embedding models. Fallback if HTTPS_PROXY is not set.

คำอธิบายแปลอัตโนมัติ ชื่อตัวแปรคงตามต้นฉบับ ถ้าไม่แน่ใจให้ดูต้นฉบับ

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
129/สัปดาห์
การเชื่อมต่อ
รันบนเครื่อง
รุ่นล่าสุดi
0.21.0
ส่งเข้า registryi
23 ก.ค. 2569
แก้โค้ดล่าสุดi
23 ก.ค. 2569
ผู้ทำ
damoqiongqiu
แพ็กเกจ
npm: @damoqiongqiu/mcp-local-rag
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ติดตั้งบนเครื่องได้ใน

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 19 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub damoqiongqiu ซึ่งเป็นเจ้าของ repo

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด 4 เดือนที่ผ่านมา

  • ✓ ผ่าน

    มีสัญญาอนุญาต (license)

    ใช้ MIT

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

ช่องโหว่ที่เปิดเผยแล้ว (OSV.dev)

ไม่พบรายการใน OSV.dev สำหรับ @damoqiongqiu/mcp-local-rag@0.21.0

ตรวจเฉพาะตัวแพ็กเกจรุ่นนี้ ไม่ใช่ทุก dependency · ตรวจเมื่อ 15 พ.ย. 2569

เราตรวจอะไรบ้าง → · JSON

ผู้ทำ: ขอให้ตรวจใหม่ หรือแจ้งข้อมูลผิด
สำหรับผู้ทำ: ติดป้ายใน README

ถ้าคุณเป็นผู้ทำตัวนี้ คัดลอกโค้ดนี้ไปวางใน README ได้เลย ป้ายลิงก์กลับมาที่หน้านี้

[![แนะนำบน PopNx MCP](https://mcp.popnx.com/badge/damoqiongqiu-mcp-local-rag.svg?lang=th)](https://mcp.popnx.com/th/servers/damoqiongqiu-mcp-local-rag)

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบเพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบเพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด ค้นข้อมูลและความจำของ AIi

  • ดาวมากกว่า 93% ของอีก 6394 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 21% ของอีก 6394 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 99% ของอีก 6394 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

MCP Local Rag ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 3 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด 4 เดือนที่ผ่านมา และส่งรุ่นล่าสุด (0.21.0) เข้า registry 4 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี OpenSEO, Exa, Microsoft Learn MCP, Docs, COTAL actions (cotal.ai)

ตัวอื่นที่ทำงานคล้ายกัน

หมวดเดียวกันจากผู้ทำคนอื่น ผ่านตัวตรวจคำสั่งแล้ว ตัวทางการขึ้นก่อน แล้วเรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

OpenSEO

Keyword research, site audits, rank tracking and AI visibility for your AI agent.

โดย every-appใช้กันมาก★ 28.2Kอัปเดต 5 วันที่ผ่านมา

รันบนคลาวด์✓ everyapp.com

Exa

Connect AI agents to Exa for web search, content fetching, and multi-step research.

โดย exa-labsใช้กันมาก★ 5.2Kอัปเดต 2 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · exa.aiทีม PopNx ลองใช้จริงแล้ว

Microsoft Learn MCP

Official Microsoft Learn MCP Server – real-time, trusted docs & code samples for AI and LLMs.

โดย MicrosoftDocsใช้กันมาก★ 2Kอัปเดต 12 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · microsoft.comทีม PopNx ลองใช้จริงแล้ว

Docs

Search and read Empryo's documentation. Read-only, no auth, no local access.

โดย proxysoulกำลังโต★ 1.6Kอัปเดต 2 เดือนที่ผ่านมา

รันบนคลาวด์✓ empryo.com

COTAL actions (cotal.ai)

cotal.ai actions: product overview, site search, build log, feedback, Cloud waitlist, updates, calls

โดย Cotal-AIกำลังโต★ 399อัปเดต 2 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · cotal.ai
เทียบกับตัวที่คล้ายกัน
ตัวนี้
MCP Local Rag
OpenSEOExaMicrosoft Learn MCPDocsCOTAL actions (cotal.ai)
ทำงานที่ไหนต้องลงในเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่องใช้บนคลาวด์ ไม่ต้องลงเครื่อง
ต้องใส่คีย์ไม่ไม่ไม่ไม่ไม่ไม่
กด + ใน Claude ได้ไม่ใช่ใช่ใช่ไม่ไม่
ผลตรวจเบื้องต้น3/35/52/44/44/44/4
สัญญาอนุญาตMITMITMITCC-BY-4.0NOASSERTIONApache-2.0
ราคาไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียนไม่พบค่าใช้จ่ายในทะเบียน

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

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 — find_definition and find_references 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 BASE_DIR to the folder you want to search (BASE_DIRS for multiple roots — see Configuration).

2.1 Configure Your AI Coding Tool

Cursor — ~/.cursor/mcp.json:

{

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

Claude Code:

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

Codex — ~/.codex/config.toml:

[mcp_servers.local-rag]

command = "npx" args = ["-y", "@damoqiongqiu/mcp-local-rag"]

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

WorkBuddy — Settings → Custom Connectors → Add:

{

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

⚠️ WorkBuddy: you MUST click "Trust" in the Custom Connectors list after adding, otherwise the server is silently blocked.

2.2 CLI Quick Start

No MCP needed — run directly from the terminal:

npx @damoqiongqiu/mcp-local-rag ingest ./src/

npx @damoqiongqiu/mcp-local-rag query "auth middleware" npx @damoqiongqiu/mcp-local-rag status

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

2.3 First-Time Project Indexing
You: "Index the src directory of this project"

Assistant: Successfully ingested 156 files (2,847 chunks created)

You: "Where's the middleware that handles API rate limiting?" Assistant: src/middleware/rateLimiter.ts — useRateLimiter(), lines 42–89

You: "How is the database connection pool configured?" Assistant: src/config/database.ts — createPool() default max: 20, idle: 5


3. Core Concepts

3.1 Dual-Strategy Chunking

Chunking strategy is chosen per file type:

  • Code files (50+ languages) — CodeChunker parses source via tree-sitter AST, splits at structural boundaries (functions, classes, methods). Each chunk's contextualizedText includes its scope chain and import context for precise semantic search.
  • Documents (PDF/DOCX/TXT/MD/HTML) — SemanticChunker splits into sentences, groups by embedding similarity to find natural topic boundaries. Markdown code blocks remain intact — never split mid-block.
3.2 Hybrid Search

Search = semantic similarity + keyword boost (RAG_HYBRID_WEIGHT, default 0.6):

  1. Query vectorization → semantic search finds most relevant chunks
  2. Quality filters apply (distance threshold, grouping)
  3. Keyword matching boosts exact-term rankings

Exact identifiers like useEffect are never buried by semantic approximations.

3.3 Security Boundary

Only files under BASE_DIR / BASE_DIRS are accessible for ingest, list, delete, or read-neighbor operations. Symlinks resolved outside roots are rejected. Sibling-prefix paths (e.g., /foo/barista when root is /foo/bar) are also blocked — prevents path traversal attacks.


4. MCP Tool Reference

15 tools organized into 5 categories.

4.1 Ingest Tools
#ToolPurposeExample
1ingest_fileSingle file (PDF/DOCX/TXT/MD/code)"Ingest ./docs/api-spec.pdf"
2ingest_dataIn-memory text/HTML"Fetch this page and ingest the HTML"
3ingest_directoryBulk directory ingest"Ingest everything under ./src"

`ingest_file` supports 50+ code languages. PDFs support an optional visual mode — a local VLM generates captions for figure pages, making visual content searchable. Two profiles available:

ProfileModelCacheSuited for
fast (default)SmolVLM-256M~250 MBLight visual indexing
qualityQwen2.5-VL-3B-ONNX~2.9 GBFigures with in-image text
# CLI

npx @damoqiongqiu/mcp-local-rag ingest ./spec.pdf --visual --visual-quality quality

MCP

"Ingest ./spec.pdf with visual: true, visualQuality: 'quality'"

`ingest_data` runs Readability → Markdown → index. Perfect for web content fetched by your AI assistant. Re-ingesting replaces old versions automatically.

`ingest_directory` scans recursively, respects .gitignore, shows real-time progress via MCP notifications.

4.2 Search Tools
#ToolPurposeKey Parameters
4query_documentsHybrid search (semantic + keyword)query, limit, scope, highlightContext, fromTimestamp
5read_chunk_neighborsExpand context around resultsfilePath, chunkIndex, before, after

`query_documents` — scope accepts a single path prefix or list, restricting results to that subtree. highlightContext returns snippets around matched terms. fromTimestamp / untilTimestamp enable time-range filtering.

`read_chunk_neighbors` — defaults to 2 chunks before and after (like grep -C 2), max 50 each. Response includes the target chunk marked isTarget: true.

4.3 Management Tools
#ToolPurpose
6list_filesList files with ingestion status (ingested: true/false)
7delete_fileDelete by file path or source URL
8statusIndex stats: docs, chunks, memory, search mode

list_files supports scope filtering with the same prefix-match semantics as search. In large directories, scope accelerates the scan by skipping out-of-scope subtrees.

4.4 Code Intelligence
#ToolPurposeInput
9find_definitionLocate symbol definition (file, line range, scope)Exact symbol name
10find_referencesFind all references (import + text mention)Symbol name

Both tools depend on AST metadata (imports, entities, scope chains) extracted by tree-sitter at ingest time. Only works for code files ingested with `CodeChunker` — files ingested before v0.18.7 lack this metadata and require reindex_all to rebuild.

`find_references` uses a two-phase strategy: (1) exact match in codeMeta.imports → (2) FTS full-text search for the symbol name. Results are deduplicated by (filePath, chunkIndex), with import references listed first.

4.5 System Tools
#ToolPurpose
11configRuntime hot read/write config — no restart needed
12dedup_checkSHA256 + Jaccard similarity to detect duplicate files
13export_indexExport entire index as JSON (backup or migration)
14reindex_allFull re-chunk + re-embed (after model change)
15reindex_staleRe-ingest only files modified on disk (incremental sync)

`config` hot-swaps hybridWeight, modelName, cacheDir, baseDir/baseDirs, etc. Switching models auto-disposes the old Embedder and initializes the new one — note: changing models alters the embedding space and requires reindex_all.

`dedup_check` is especially useful in monorepos — spot ↔ futures mirror code is typically flagged with similarity 1.0.


5. CLI

5.1 Basic Commands
# Ingest

npx @damoqiongqiu/mcp-local-rag ingest ./src/

Search (with scope)

npx @damoqiongqiu/mcp-local-rag query "auth middleware" npx @damoqiongqiu/mcp-local-rag query "auth" --scope /docs/api

Context expansion

npx @damoqiongqiu/mcp-local-rag read-neighbors --file-path /abs/path.md --chunk-index 5

Management

npx @damoqiongqiu/mcp-local-rag list --scope /docs/api npx @damoqiongqiu/mcp-local-rag status npx @damoqiongqiu/mcp-local-rag delete ./docs/old.pdf npx @damoqiongqiu/mcp-local-rag delete --source "https://..."

query, read-neighbors, list, status, delete emit JSON to stdout (pipe to jq). ingest emits progress to stderr.

Global options (--db-path, --cache-dir, --model-name) go before the subcommand:

npx @damoqiongqiu/mcp-local-rag --help

⚠️ The CLI does NOT read your MCP client config (mcp.json, etc.). Configure via flags or environment variables.

5.2 CLI Configuration

Flags — global options before, subcommand options after:

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

`--base

ตัดมาแค่ช่วงต้น อ่านต่อใน repo