Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Search Obsidian vaults with hybrid full-text, fuzzy, semantic, and graph retrieval.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"obsidian-hybrid-search": {
"command": "npx",
"args": [
"-y",
"obsidian-hybrid-search",
"mcp"
],
"env": {
"OBSIDIAN_VAULT_PATH": "ใส่ค่าของคุณ",
"OBSIDIAN_PREFIX": "ใส่ค่าของคุณ",
"OBSIDIAN_IGNORE_PATTERNS": "ใส่ค่าของคุณ",
"OBSIDIAN_RESPECT_GITIGNORE": "ใส่ค่าของคุณ",
"OBSIDIAN_INCLUDE_PATTERNS": "ใส่ค่าของคุณ",
"OBSIDIAN_CONTENT_IGNORE_PATTERNS": "ใส่ค่าของคุณ",
"OPENAI_API_KEY": "ใส่ค่าของคุณ",
"OPENAI_BASE_URL": "ใส่ค่าของคุณ",
"OPENAI_EMBEDDING_MODEL": "ใส่ค่าของคุณ",
"LOCAL_EMBEDDING_MODEL": "ใส่ค่าของคุณ",
"RERANKER_MODEL": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add obsidian-hybrid-search --env OBSIDIAN_VAULT_PATH='ใส่ค่าของคุณ' --env OBSIDIAN_PREFIX='ใส่ค่าของคุณ' --env OBSIDIAN_IGNORE_PATTERNS='ใส่ค่าของคุณ' --env OBSIDIAN_RESPECT_GITIGNORE='ใส่ค่าของคุณ' --env OBSIDIAN_INCLUDE_PATTERNS='ใส่ค่าของคุณ' --env OBSIDIAN_CONTENT_IGNORE_PATTERNS='ใส่ค่าของคุณ' --env OPENAI_API_KEY='ใส่ค่าของคุณ' --env OPENAI_BASE_URL='ใส่ค่าของคุณ' --env OPENAI_EMBEDDING_MODEL='ใส่ค่าของคุณ' --env LOCAL_EMBEDDING_MODEL='ใส่ค่าของคุณ' --env RERANKER_MODEL='ใส่ค่าของคุณ' -- npx -y obsidian-hybrid-search mcpวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"obsidian-hybrid-search": {
"command": "npx",
"args": [
"-y",
"obsidian-hybrid-search",
"mcp"
],
"env": {
"OBSIDIAN_VAULT_PATH": "ใส่ค่าของคุณ",
"OBSIDIAN_PREFIX": "ใส่ค่าของคุณ",
"OBSIDIAN_IGNORE_PATTERNS": "ใส่ค่าของคุณ",
"OBSIDIAN_RESPECT_GITIGNORE": "ใส่ค่าของคุณ",
"OBSIDIAN_INCLUDE_PATTERNS": "ใส่ค่าของคุณ",
"OBSIDIAN_CONTENT_IGNORE_PATTERNS": "ใส่ค่าของคุณ",
"OPENAI_API_KEY": "ใส่ค่าของคุณ",
"OPENAI_BASE_URL": "ใส่ค่าของคุณ",
"OPENAI_EMBEDDING_MODEL": "ใส่ค่าของคุณ",
"LOCAL_EMBEDDING_MODEL": "ใส่ค่าของคุณ",
"RERANKER_MODEL": "ใส่ค่าของคุณ"
}
}
}
}วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"obsidian-hybrid-search": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"obsidian-hybrid-search",
"mcp"
],
"env": {
"OBSIDIAN_VAULT_PATH": "ใส่ค่าของคุณ",
"OBSIDIAN_PREFIX": "ใส่ค่าของคุณ",
"OBSIDIAN_IGNORE_PATTERNS": "ใส่ค่าของคุณ",
"OBSIDIAN_RESPECT_GITIGNORE": "ใส่ค่าของคุณ",
"OBSIDIAN_INCLUDE_PATTERNS": "ใส่ค่าของคุณ",
"OBSIDIAN_CONTENT_IGNORE_PATTERNS": "ใส่ค่าของคุณ",
"OPENAI_API_KEY": "ใส่ค่าของคุณ",
"OPENAI_BASE_URL": "ใส่ค่าของคุณ",
"OPENAI_EMBEDDING_MODEL": "ใส่ค่าของคุณ",
"LOCAL_EMBEDDING_MODEL": "ใส่ค่าของคุณ",
"RERANKER_MODEL": "ใส่ค่าของคุณ"
}
}
}
}OBSIDIAN_PREFIX envOBSIDIAN_IGNORE_PATTERNS envOBSIDIAN_RESPECT_GITIGNORE envOBSIDIAN_INCLUDE_PATTERNS envOBSIDIAN_CONTENT_IGNORE_PATTERNS envOPENAI_BASE_URL envOPENAI_EMBEDDING_MODEL envLOCAL_EMBEDDING_MODEL envRERANKER_MODEL envค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 5 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub flowing-abyss ซึ่งเป็นเจ้าของ repo
มีการแก้โค้ดล่าสุด เมื่อวาน
ใช้ MIT
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
ต้องอ่านรายการเครื่องมือของ server ก่อน จะเริ่มตรวจในขั้นถัดไป
เทียบเฉพาะ server ที่อยู่ในต้นแบบนี้ ไม่ใช่ทั้ง registry
จากการตรวจเบื้องต้นของเรา ผ่าน 3 จาก 3 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: OBSIDIAN_VAULT_PATH, OPENAI_API_KEY
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด เมื่อวาน และส่งรุ่นล่าสุด (0.17.4) เข้า registry เมื่อวาน
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี 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 รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
Your Obsidian vault already contains your best thinking. Obsidian Hybrid Search makes that thinking easier to find, reuse, and bring into AI-assisted work.
It gives your vault one retrieval engine and three practical ways to use it. The native Obsidian plugin gives you fast search, previews, similar notes, link discovery, and graph views while you write. The MCP server lets AI agents search and read your notes as tool calls. The CLI gives power users the same engine for indexing, filtering, reranking, reading, and scripting.
The search understands how real vaults are built. It combines semantic search, BM25 full text, fuzzy title and alias matching, tags, folders, frontmatter, wikilinks, backlinks, and similar-note lookup. You can search by idea, phrase, title, relationship, or metadata without remembering the exact words you wrote.
That turns Obsidian into a stronger personal knowledge system and a better starting point for AI work. Agents can begin from your own notes, pull cited context from source files, follow related material, and work with knowledge you already trust. OHS runs locally by default with SQLite, FTS5, sqlite-vec, RRF ranking, and optional OpenAI-compatible embedding APIs.
Evaluated on the Obsidian Help vault (171 notes, 58 queries, local model):
| OHS (this project) | qmd | |
|---|---|---|
| nDCG@5 | 0.733 | 0.659 |
| MRR | 0.788 | 0.665 |
| Hit@1 | 0.724 | 0.500 |
| Avg query time | 571 ms ¹ | 754 ms ² |
| Model download | ~117 MB | ~2.2 GB |
¹ CPU (Apple Silicon), hybrid mode, no rerank. ² GPU (Apple Silicon Metal), LLM query expansion + reranking.
OHS uses Xenova/multilingual-e5-small. How to reproduce → · Full benchmark →
OHS is also evaluated on Andy Matuschak’s public evergreen notes, converted into an Obsidian vault with title-based note filenames, source URLs in frontmatter, local attachments, and 5,000+ internal note links across 1,357 notes.
The curated golden set includes 78 hand-judged queries across known-item lookup, paraphrases, quote fragments, ambiguous topics, citation lookup, and multi-note evidence.
Using the default local embedding model, OHS performs strongly on this dense note network.
| Metric | Value |
|---|---|
| nDCG@5 | 0.722 |
| nDCG@10 | 0.753 |
| MRR | 0.874 |
| Hit@1 | 0.795 |
| Hit@5 | 0.974 |
| Recall@10 | 0.972 |
| AllRel@10 | 0.949 |
The benchmark exercises retrieval over a highly connected real-world knowledge vault, including queries that do not simply repeat note titles.
Result JSON · Reproduce and interpret →
To test retrieval on a larger public dataset, LongMemEval-S was converted into a 22,419-note Obsidian-style vault with 470 retrieval queries. Using baai/bge-m3 embeddings, OHS ranked the answer-bearing notes strongly:
| Metric | Value |
|---|---|
| nDCG@5 | 0.895 |
| MRR | 0.920 |
| Hit@1 | 0.889 |
| Hit@5 | 0.968 |
| Recall@10 | 0.950 |
| AllRel@10 | 0.904 |
For this benchmark, each query uses the LongMemEval-provided haystack as its search scope. That makes the result reproducible and easy to inspect query by query, while still exercising retrieval over a large generated memory vault.
Result JSON · Reproduce and interpret →
aliases: in frontmatter are indexed and searchable by any alias; alias matches are boosted in BM25 (weight 5×) and fuzzy title scoringhybrid, semantic, fulltext, title (for text queries)--path to find semantically related notes using stored chunk embeddings, with a title + content fallback--path --related shows linked notes at configurable depth; filter by --direction outgoing|backlinks|both-notes/dev/)-category/cs)--snippet-length sets the context window; empty snippets always fall back to note content--extended adds a TAGS/ALIASES column to the CLI table showing frontmatter tags (#tag) and aliasesohs "q1" "q2" or queries[] in MCP); results are merged via RRF, so a note that ranks well in any one query floats to the top; useful when the note may use different vocabulary than the query--rerank re-scores results with gte-multilingual-reranker-base (ONNX int8, ~341 MB download once); improves precision for conceptual and multilingual queries; applied after multi-query merge@huggingface/transformers (no API key required); default model: Xenova/multilingual-e5-small, 100+ languagesread fetches one or more notes by vault-relative path; returns full content with title, aliases, tags, links, and backlinks; on path miss returns top-3 fuzzy suggestionsnpm install -g obsidian-hybrid-search
The recommended setup is to set OBSIDIAN_VAULT_PATH once in ~/.zshrc or ~/.bashrc. This lets you run the CLI from any directory.
export OBSIDIAN_VAULT_PATH="/path/to/your/vault"
Open a new terminal and index the vault once.
ohs reindex
You can now search from any directory.
ohs "zettelkasten"
Alternatively, run the CLI without an environment variable from any directory inside your vault. It finds the vault root by walking up to the nearest .obsidian/ folder.
cd /path/to/your/vault
ohs reindex ohs "zettelkasten"
From outside the vault, set OBSIDIAN_VAULT_PATH or pass --db /path/to/vault/.obsidian-hybrid-search.db explicitly.
By default, the CLI uses the local Xenova/multilingual-e5-small model. It works offline without an API key, downloads about 117 MB on first use, and supports more than 100 languages.
To use a remote API, add its settings to your shell profile.
export OPENAI_API_KEY="sk-..."
The CLI supports four search modes called hybrid, fulltext, semantic, and title, plus graph traversal for linked notes. The commands below show how to use them, apply filters, rerank results, and control the output.
# Hybrid search (default)
ohs "zettelkasten atomic notes"
ohs "permanent notes" --mode fulltext
ohs "zettleksten" --mode title
ohs "how to build a knowledge graph" --mode semantic
ohs "productivity systems" --limit 5 --threshold 0.3
ohs "daily review" --scope notes/periodic/ ohs "daily review" --folder notes/periodic/ # alias for --scope
ohs "productivity" --scope notes/pkm/ --scope notes/2024/
ohs "programming" --scope notes/ --scope -notes/archive/
ohs "productivity" --tag pkm ohs "machine learning" --tag note/basic/primary
ohs "learning" --tag pkm --tag work
ohs "notes" --frontmatter status:todo ohs "notes" --prop priority:high # --prop is alias for --frontmatter
ohs "notes" --frontmatter status:todo --frontmatter priority:high
ohs "notes" --frontmatter -status:done
ohs --frontmatter status:todo ohs --folder notes/2024/ ohs --tag pkm ohs --frontmatter status:done --tag archived
ohs --folder notes/ --limit 0
ohs --path notes/pkm/zettelkasten.md
ohs --path notes/pkm/zettelkasten.md --related ohs --path notes/pkm/zettelkasten.md --related --depth 2
ohs --path notes/pkm/zettelkasten.md --related --direction outgoing
ohs --path notes/pkm/zettelkasten.md --related --direction backlinks
ohs --path notes/pkm/zettelkasten.md --related --link-type markdown
ohs --path notes/pkm/zettelkasten.md --related --link-type all
ohs --path notes/pkm/zettelkasten.md --related --snippet-length 500
ohs "zettelkasten atomic notes" --rerank
ohs "zettelkasten" --extended
ohs "spaced repetition" --json
ohs --frontmatter id:OHS-4 --only-paths ohs read ${(f)"$(ohs search --frontmatter status:todo --only-paths)"} # zsh: read all matching notes
ohs "zettelkasten" --only-absolute-paths