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 集成