黑曜石语义搜

Obsidian Semantic Search

by celstnblacc

Semantic search across your Obsidian vaults using local embeddings (Ollama + pgvector). 10 MCP tools: hybrid/semantic/keyword search, file CRUD, batch reads, live re-indexing, and a monitoring dashboard. Fully local — no API keys, no cloud, zero cost.

3.9k效率与工作流未扫描2026年3月23日

安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/celstnblacc/obsidian-semantic-search

文档

Obsidian Semantic Search

Search your Obsidian vault by meaning, not just keywords. This skill installs and configures obsidian-semantic-mcp — a local-first MCP server that indexes your vault with vector embeddings (Ollama + pgvector) and exposes 10 tools to any MCP-compatible AI assistant.

What You Get

10 MCP Tools

ToolWhat it does
search_vaultSemantic, keyword, or hybrid search with similarity scores
simple_searchFast exact-text search across all files
list_filesBrowse vault directories
get_fileRead a single file
get_files_batchRead multiple files in one call
append_contentAppend text to a file (creates if missing)
write_fileOverwrite a file completely
recent_changesList recently modified files
list_indexed_notesSee all indexed notes with timestamps
reindex_vaultForce a full re-index

Monitoring Dashboard (port 8484)

  • Real-time service health (PostgreSQL, Ollama, embedding model)
  • Indexed notes count, vault coverage %, database size
  • Search testing UI — test queries without leaving your browser
  • Manual re-index trigger

Search Modes

  • Hybrid (default): Combines semantic meaning + keyword matching for best results
  • Semantic: Search by meaning only — finds related content even with different wording
  • Keyword: Exact text matching via PostgreSQL full-text search

Installation

Prerequisites

  • Docker Desktop (running)
  • uv (Python package manager): curl -LsSf https://astral.sh/uv/install.sh | sh
  • An Obsidian vault on your local filesystem

One-Liner Install

bash
bash <(curl -fsSL https://raw.githubusercontent.com/celstnblacc/obsidian-semantic-mcp/main/install.sh) --mode 2 --vault /path/to/your/vault

This clones the repo to ~/.local/share/obsidian-semantic-mcp, installs the osm CLI, and runs the setup wizard in Docker mode.

Manual Install

bash
git clone https://github.com/celstnblacc/obsidian-semantic-mcp.git
cd obsidian-semantic-mcp
uv sync
uv run osm init

The wizard detects your OS and offers setup modes:

macOS (4 modes):

  • Mode 1: Native (Homebrew — no Docker needed)
  • Mode 2: Docker + host Ollama (if Ollama already installed)
  • Mode 3: Full Docker (recommended — everything in containers)
  • Mode 4: Docker + remote Ollama (SSH tunnel to a GPU server)

Linux (3 modes):

  • Mode 1: Docker + host Ollama
  • Mode 2: Full Docker (recommended)
  • Mode 3: Docker + remote Ollama

Verify Installation

bash
osm status

Should show: Docker containers running, Ollama healthy, embedding model loaded, vault indexed.

Register with Claude Desktop

The wizard auto-configures this, but if you need to do it manually:

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or ~/.config/Claude/claude_desktop_config.json (Linux):

json
{
  "mcpServers": {
    "obsidian-semantic": {
      "command": "docker",
      "args": ["exec", "-i", "obsidian-semantic-mcp-mcp-server-1", "python3", "src/server.py"]
    }
  }
}

Restart Claude Desktop after adding.

Configuration

Set these in .env or as environment variables:

VariableRequiredDefaultNotes
OBSIDIAN_VAULTYesPath to your vault
OBSIDIAN_VAULTSNoComma-separated paths for multi-vault
POSTGRES_PASSWORDYes (Docker)Database password
EMBEDDING_MODELNonomic-embed-textOllama model (~7GB)
RERANK_MODELNoOptional cross-encoder for better ranking
DASHBOARD_PORTNo8484Monitoring dashboard port

Usage Examples

Once installed, your AI assistant can use these tools naturally:

Semantic search:

"Search my vault for notes about authentication patterns" → Uses search_vault with hybrid mode, returns top 5 matches ranked by meaning

Find and read:

"Find my meeting notes from last week and summarize them" → Uses recent_changes to find files, get_files_batch to read them

Append to a note:

"Add this action item to my project-x.md file" → Uses append_content to add text without overwriting

Re-index after bulk changes:

"I just reorganized my vault, re-index everything" → Uses reindex_vault to rebuild the full index

Maintenance

bash
osm status       # Check health
osm rebuild      # Rebuild Docker images after updates
osm remove       # Stop and clean up everything

Architecture

  • PostgreSQL 17 + pgvector: Stores 768-dim vector embeddings, IVFFlat index for fast cosine similarity search
  • Ollama (nomic-embed-text): Local embedding model — no API keys, no cloud calls
  • Watchdog file watcher: Auto-re-indexes when vault files change (0.5s debounce)
  • LRU cache: 256 entries, 10-min TTL — skips redundant Ollama calls for repeated queries

Troubleshooting

ProblemFix
"Ollama not responding"Run osm status — if Ollama is down, the dashboard has a "Start Ollama" button
Slow first searchFirst query loads the model into memory (~5s). Subsequent queries are <1s
Missing notes in searchRun osm status to check indexing coverage. Use dashboard to trigger re-index
Docker errorsEnsure Docker Desktop is running. Try osm rebuild to rebuild images
VirusTotal "suspicious" warning on installThis is a false positive — the skill describes searching vault content, which triggers pattern detection. Use clawhub install obsidian-semantic-search --force to proceed. The skill is MIT-0 licensed and contains no executable code beyond documentation.

Links


Built by celstnblacc — 207 unit tests, Docker + native install, multi-vault support.

相关 Skills

技能工坊

by anthropics

Universal
热门

覆盖 Skill 从创建到迭代优化全流程:起草能力、补测试提示、跑评测与基准方差分析,并持续改写内容和描述,提升效果与触发准确率。

技能工坊把技能从创建、迭代到评测串成闭环,方差分析加描述优化,特别适合把触发准确率打磨得更稳。

效率与工作流
未扫描111.8k

表格处理

by anthropics

Universal
热门

围绕 .xlsx、.xlsm、.csv、.tsv 做读写、修复、清洗、格式整理、公式计算与格式转换,适合修改现有表格、生成新报表或把杂乱数据整理成交付级电子表格。

做 Excel/CSV 相关任务很省心,能直接读写、修复、清洗和格式转换,尤其擅长把乱七八糟的表格整理成交付级文件。

效率与工作流
未扫描111.8k

Word文档

by anthropics

Universal
热门

覆盖Word/.docx文档的创建、读取、编辑与重排,适合生成报告、备忘录、信函和模板,也能处理目录、页眉页脚、页码、图片替换、查找替换、修订批注及内容提取整理。

搞定 .docx 的创建、改写与精排版,目录、批量替换、批注修订和图片更新都能自动化,做正式文档尤其省心。

效率与工作流
未扫描111.8k

相关 MCP 服务

文件系统

编辑精选

by Anthropic

热门

Filesystem 是 MCP 官方参考服务器,让 LLM 安全读写本地文件系统。

这个服务器解决了让 Claude 直接操作本地文件的痛点,比如自动整理文档或生成代码文件。适合需要自动化文件处理的开发者,但注意它只是参考实现,生产环境需自行加固安全。

效率与工作流
83.1k

by wonderwhy-er

热门

Desktop Commander 是让 AI 直接执行终端命令、管理文件和进程的 MCP 服务器。

这工具解决了 AI 无法直接操作本地环境的痛点,适合需要自动化脚本调试或文件批量处理的开发者。它能让你用自然语言指挥终端,但权限控制需谨慎,毕竟让 AI 执行 rm -rf 可不是闹着玩的。

效率与工作流
5.9k

EdgarTools

编辑精选

by dgunning

热门

EdgarTools 是无需 API 密钥即可解析 SEC EDGAR 财报的开源 Python 库。

这个工具解决了金融数据获取的痛点——直接让 AI 读取结构化财报,比如让 Claude 分析苹果的 10-K 文件。适合量化分析师或金融开发者快速构建数据管道。但注意,它依赖 SEC 网站稳定性,高峰期可能延迟。

效率与工作流
2.0k

评论