DS

dan6684/smart-connections-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

11 stars 7 forks 质量 52 趋势 18

MCP server that exposes Obsidian Smart Connections vector database to Claude Code via semantic search

概览

Exposes your Obsidian Smart Connections vector database to Claude Code via Model Context Protocol (MCP). Instead of using text-based Grep, Claude Code can now perform across your vault: - : Find notes by meaning, not keywords - : Get related notes (like Smart Connections sidebar) - : Get best context for RAG queries The script will: - ✅ Install UV package manager (if needed) - ✅ Create virtual environment - ✅ Install all dependencies - ✅ Auto-detect your Obsidian vault - ✅ Configure ~/.mcp.json - ✅ Verify installation Click to expand manual installation steps - mcp>=1.0.0 - Official Model Context Protocol SDK - sentence-transformers>=2.2.0 - For semantic search - numpy =2.0.0 and transformers>=4.30.0 - ML dependencies Use the virtual environment Python, not system Python! Keep this MCP server in a from your Obsidian vault. See DEPLOYMENT.md for rationale and best practices.

README

以下为原文 README 节选,完整内容请查看原文。

Smart Connections MCP Server

Exposes your Obsidian Smart Connections vector database to Claude Code via Model Context Protocol (MCP).

What This Does

Instead of using text-based Grep, Claude Code can now perform semantic search across your vault:

  • semantic_search: Find notes by meaning, not keywords
  • find_related: Get related notes (like Smart Connections sidebar)
  • get_context_blocks: Get best context for RAG queries

Architecture

Smart Connections Plugin
    ↓ (creates)
.smart-env/multi/*.ajson
    ↓ (reads)
This MCP Server
    ↓ (exposes via)
MCP Protocol
    ↓ (consumed by)
Claude Code

Installation

cd ~/smart-connections-mcp
./install.sh

The script will:

  • ✅ Install UV package manager (if needed)
  • ✅ Create virtual environment
  • ✅ Install all dependencies
  • ✅ Auto-detect your Obsidian vault
  • ✅ Configure ~/.mcp.json
  • ✅ Verify installation

Manual Installation

Migration to New Machine

See DEPLOYMENT.md for detailed migration guide.

Quick migration:

# On new machine
git clone https://github.com/dan6684/smart-connections-mcp.git ~/smart-connections-mcp
cd ~/smart-connections-mcp
./install.sh

Important: Keep this MCP server in a separate repository from your Obsidian vault. See DEPLOYMENT.md for rationale and best practices.

Troubleshooting

If you see timeout issues, see TROUBLESHOOTING.md.

Usage Examples

Old way (Grep):

Grep pattern: "self-compassion"
→ Only finds notes with exact word "self-compassion"

New way (Semantic Search):

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "smart-connections": { "command": "/Users/YOUR_USERNAME/smart-connections-mcp/.venv/bin/python", "args": ["/Users/YOUR_USERNAME/smart-connections-mcp/server.py"], "env": { "OBSIDIAN_VAULT_PATH": "/path/to/your/obsidian/vault" } } } }