Smart Connections

io.github.gogogadgetbytes由 GitHub 帳號 gogogadgetbytes 發布v0.2.0更新於 Oct 24, 2026

MCP server for Obsidian Smart Connections. Semantic search using your vault's embeddings.

發布方自己的服務:Connections

已驗證STDIO僅桌面檔案與儲存知識與記憶

概覽

AI 產生的概覽

讓助理對 Obsidian 儲存庫的 Smart Connections 嵌入進行語意搜尋,並讀取已索引的筆記。

可以做什麼
將 Obsidian 儲存庫的 Smart Connections 嵌入開放給助理做語意搜尋。工具包括 search_by_text(自由文字查詢,於本機計算嵌入)、search_similar(找出與指定筆記相似的筆記)、search_by_embedding(以原始向量查詢)、get_note(讀取筆記內容)、get_model_info 與 list_indexed。它為唯讀,會驗證路徑並限制回應大小。
適用情境
當你希望助理依語意而非精確關鍵字尋找與閱讀 Obsidian 筆記時使用,例如找出某主題的筆記,或找出與某篇筆記相似的內容。適合唯讀檢索,編輯仍在 Obsidian 中進行。
執行需求
以 Node.js 18+ 本機程序執行(npm 套件 @gogogadgetbytes/smart-connections-mcp,stdio)。需要安裝 Obsidian 與 Smart Connections 外掛,並已建立嵌入索引。必須將環境變數 VAULT_PATH 設為儲存庫的絕對路徑。首次執行會下載約 50MB 的模型到 Hugging Face 快取。僅支援桌面端。
安裝前請注意
它會讀取你的儲存庫內容,助理因此能看到筆記文字;回應雖有上限,仍會隨 MCP 用戶端傳出。它為唯讀,不提供寫入或 shell 操作。首次執行會從網路下載模型。每個伺服器實例只對應一個儲存庫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Smart Connections,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Smart Connections MCP Server

[License: MIT] [Node.js Version]

A security-first MCP server for Smart Connections. Read-only. Path-validated. Auditable.

Exposes Smart Connections embeddings to Claude Code and other MCP clients for semantic search of your Obsidian vault.

Why This Exists

We needed semantic search of our Obsidian vault from Claude Code. Existing options have problems:

  • No path validation - User input passed directly to file operations
  • Write access - Some expose mutation tools we don't need
  • Heavy dependencies - PyTorch/transformers for what's essentially vector math

This implementation:

  • Minimal dependencies - MCP SDK + Transformers.js (for text search)
  • Fail-closed security - path validation with realpath, symlink detection
  • Auditable - small TypeScript codebase you can actually read

Features

  • Text search - query with plain text, not just note paths
  • Semantic search using Smart Connections embeddings
  • Local inference - uses Transformers.js (same model as Smart Connections)
  • Read-only - no write operations, no shell execution
  • Secure - strict path validation, bounded responses
  • Offline - works without Obsidian running

Security Model

PropertyGuarantee
Path confinementAll file access validated against vault root
No traversal../ and symlink attacks blocked
Read-onlyNo write operations exposed
Bounded responsesCapped results (50), content length (10KB)
Fail closedErrors deny access, never bypass
Audit loggingSecurity events logged with context

Installation

Prerequisites

  • Node.js 18+
  • Obsidian with Smart Connections plugin installed
  • Embeddings built (open vault in Obsidian, let Smart Connections index)

Setup

bash
git clone https://github.com/gogogadgetbytes/smart-connections-mcpcd smart-connections-mcpnpm installnpm run build

Configure Claude Code

Add to your Claude Code config:

bash
claude mcp add smart-connections \  -e VAULT_PATH="/path/to/your/obsidian/vault" \  -- node /path/to/smart-connections-mcp/dist/index.js

Or manually add to ~/.claude.json:

json
{  "mcpServers": {    "smart-connections": {      "command": "node",      "args": ["/path/to/smart-connections-mcp/dist/index.js"],      "env": {        "VAULT_PATH": "/path/to/your/obsidian/vault"      }    }  }}

Restart Claude Code to load the server.

Usage

Once configured, Claude Code can use these tools:

Search by Text

"Search my vault for notes about backup strategies"→ Uses search_by_text tool

Search Similar Notes

"Find notes similar to Topics/Claude_Code.md"→ Uses search_similar tool

Get Note Content

"Show me the content of Topics/Obsidian.md"→ Uses get_note tool

List Indexed Notes

"What notes are indexed in my vault?"→ Uses list_indexed tool

Tools

ToolDescription
search_by_textSearch using freeform text (computes embedding locally)
search_similarFind notes semantically similar to a given note
search_by_embeddingSearch using a raw embedding vector
get_noteGet content of a specific note (path validated)
get_model_infoGet embedding model configuration
list_indexedList all indexed notes

Configuration

VariableRequiredDescription
VAULT_PATHYesAbsolute path to Obsidian vault

Limitations

  • Single vault - Configure one vault per MCP server instance
  • Index from Smart Connections - Note embeddings come from the plugin; text queries are embedded locally
  • No write access - By design; use Obsidian for edits
  • First run downloads model - ~50MB model cached in ~/.cache/huggingface/

Development

bash
# Buildnpm run build
# Test with MCP Inspectornpx @modelcontextprotocol/inspector node dist/index.js

Contributing

See CONTRIBUTING.md. Security-focused PRs welcome.

Security

To report security vulnerabilities, please email [email protected]. Do not open public issues for security concerns.

License

MIT - see LICENSE

Credits

來源:README.md,提交 24481f8

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Connections 整合