Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Local FAISS vector database for RAG with document ingestion, semantic search, and MCP prompts.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"local-faiss": {
"command": "uvx",
"args": [
"local-faiss-mcp"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add local-faiss -- uvx local-faiss-mcpวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"local-faiss": {
"command": "uvx",
"args": [
"local-faiss-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"local-faiss": {
"type": "stdio",
"command": "uvx",
"args": [
"local-faiss-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub nonatofabio ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.2.0-rc.3) เข้า registry 11 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
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.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
A Model Context Protocol (MCP) server that provides local vector database functionality using FAISS for Retrieval-Augmented Generation (RAG) applications.
local-faiss command for standalone indexing and search# Install
pip install local-faiss-mcp
local-faiss index document.pdf
local-faiss search "What is this document about?"
Or use with Claude Code - configure MCP client (see Configuration) and try:
Use the ingest_document tool with: ./path/to/document.pdf
Then use query_rag_store to search for: "How does FAISS perform similarity search?"
Claude will retrieve relevant document chunks from your vector store and use them to answer your question.
⚡️ Upgrading? Run pip install --upgrade local-faiss-mcp
pip install local-faiss-mcp
For DOCX, HTML, EPUB, and 40+ additional formats, install pandoc:
# macOS
brew install pandoc
sudo apt install pandoc
Note: PDF, TXT, and MD work without pandoc.
git clone https://github.com/nonatofabio/local_faiss_mcp.git
cd local_faiss_mcp pip install -e .
After installation, you can run the server in three ways:
1. Using the installed command (easiest):
local-faiss-mcp --index-dir /path/to/index/directory
2. As a Python module:
python -m local_faiss_mcp --index-dir /path/to/index/directory
3. For development/testing:
python local_faiss_mcp/server.py --index-dir /path/to/index/directory
Command-line Arguments:
--index-dir: Directory to store FAISS index and metadata files (default: current directory)--embed: Hugging Face embedding model name (default: all-MiniLM-L6-v2)--rerank: Enable re-ranking with specified cross-encoder model (default: BAAI/bge-reranker-base)Using a Custom Embedding Model:
# Use a larger, more accurate model
local-faiss-mcp --index-dir ./.vector_store --embed all-mpnet-base-v2
local-faiss-mcp --index-dir ./.vector_store --embed paraphrase-multilingual-MiniLM-L12-v2
local-faiss-mcp --index-dir ./.vector_store --embed sentence-transformers/model-name
Using Re-ranking for Better Results:
Re-ranking uses a cross-encoder model to reorder FAISS results for improved relevance. This two-stage "retrieve and rerank" approach is common in production search systems.
# Enable re-ranking with default model (BAAI/bge-reranker-base)
local-faiss-mcp --index-dir ./.vector_store --rerank
local-faiss-mcp --index-dir ./.vector_store --rerank cross-encoder/ms-marco-MiniLM-L-6-v2
local-faiss-mcp --index-dir ./.vector_store --embed all-mpnet-base-v2 --rerank BAAI/bge-reranker-base
How Re-ranking Works:
Popular re-ranking models:
BAAI/bge-reranker-base - Good balance (default)cross-encoder/ms-marco-MiniLM-L-6-v2 - Fast and efficientcross-encoder/ms-marco-TinyBERT-L-2-v2 - Very fast, smaller modelThe server will:
{index-dir}/faiss.index (or create a new one){index-dir}/metadata.json (or create new)The server provides two tools for document management:
Ingest a document into the vector store.
Parameters:
document (required): Text content OR file path to ingestsource (optional): Identifier for the document source (default: "unknown")Auto-detection: If document looks like a file path, it will be automatically parsed.
Supported formats:
Examples:
{
"document": "FAISS is a library for efficient similarity search...", "source": "faiss_docs.txt" }
{
"document": "./documents/research_paper.pdf" }
Query the vector store for relevant document chunks.
Parameters:
query (required): The search query texttop_k (optional): Number of results to return (default: 3)Example:
{
"query": "How does FAISS perform similarity search?", "top_k": 5 }
The server provides MCP prompts to help extract answers and summarize information from retrieved documents:
Extract the most relevant answer from retrieved document chunks with proper citations.
Arguments:
query (required): The original user query or questionchunks (required): Retrieved document chunks as JSON array with fields: text, source, distanceUse Case: After querying the RAG store, use this prompt to get a well-formatted answer that cites sources and explains relevance.
Example workflow in Claude:
query_rag_store tool to retrieve relevant chunksextract-answer prompt with the query and resultsCreate a focused summary from multiple document chunks.
Arguments:
topic (required): The topic or theme to summarizechunks (required): Document chunks to summarize as JSON arraymax_length (optional): Maximum summary length in words (default: 200)Use Case: Synthesize information from multiple retrieved documents into a concise summary.
Example Usage:
In Claude Code, after retrieving documents with query_rag_store, you can use the prompts like:
Use the extract-answer prompt with:
The prompts will guide the LLM to provide structured, citation-backed answers based on your vector store data.
The local-faiss CLI provides standalone document indexing and search capabilities.
Index documents from the command line:
# Index single file
local-faiss index document.pdf
local-faiss index doc1.pdf doc2.txt doc3.md
local-faiss index documents/
local-faiss index -r documents/
local-faiss index "docs/**/*.pdf"
Configuration: The CLI automatically uses MCP configuration from:
./.mcp.json (local/project-specific)~/.claude/.mcp.json (Claude Code config)~/.mcp.json (fallback)If no config exists, creates ./.mcp.json with default settings (./.vector_store).
Supported formats:
brew install pandoc (macOS) or apt install pandoc (Linux)Search the indexed documents:
# Basic search
local-faiss search "What is FAISS?"
local-faiss search -k 5 "similarity search algorithms"
Results show:
Add this server to your Claude Code MCP configuration (.mcp.json):
User-wide configuration (~/.claude/.mcp.json):
{
"mcpServers": { "local-faiss-mcp": { "command": "local-faiss-mcp" } } }
With custom index directory:
{
"mcpServers": { "local-faiss-mcp": { "command": "local-faiss-mcp", "args": [ "--index-dir", "/home/user/vector_indexes/my_project" ] } } }
With custom embedding model:
{
"mcpServers": { "local-faiss-mcp": { "command": "local-faiss-mcp", "args": [ "--index-dir", "./.vector_store", "--embed", "all-mpnet-base-v2" ] } } }
With re-ranking enabled:
{
"mcpServers": { "local-faiss-mcp": { "command": "local-faiss-mcp", "args": [ "--index-dir", "./.vector_store", "--rerank" ] } } }
Full configuration with embedding and re-ranking:
{
"mcpServers": { "local-faiss-mcp": { "command": "local-faiss-mcp", "args": [ "--index-dir", "./.vector_store", "--embed", "all-mpnet-base-v2", "--rerank", "BAAI/bge-reranker-base" ] } } }
Project-specific configuration (./.mcp.json in your project):
{
"mcpServers": { "local-faiss-mcp": { "command": "local-faiss-mcp", "args": [ "--index-dir", "./.vector_store" ] } } }
Alternative: Using Python module (if the command isn't in PATH):
{
"mcpServers": { "local-faiss-mcp": { "command": "python", "args": ["-m", "local_faiss_mcp", "--index-dir", "./.vector_store"] } } }
Add this server to your Claude Desktop configuration:
{
"mcpServers": { "local-faiss-mcp": { "command": "local-faiss-mcp", "args": ["--index-dir", "/path/to/index/directory"] } } }
--embed flag (default: all-MiniLM-L6-v2 with 384 dimensions)faiss.index, metadata saved as metadata.jsonDifferent models offer different trade-offs:
| Model | Dimensions | Speed | Quality | Use Case |
|---|
| all-MiniLM-L6-v2
ตัดมาแค่ช่วงต้น อ่านต่อใน repo