loading…
Search for a command to run...
loading…
Enables AI agents to find semantic connections and perform text searches in Obsidian vaults using the Smart Connections plugin data.
Enables AI agents to find semantic connections and perform text searches in Obsidian vaults using the Smart Connections plugin data.
Command-line tool and MCP (Model Context Protocol) server for Smart Connections - find semantic connections in your Obsidian vaults.
# Install globally
npm install -g @yejianye/smart-connections-mcp
After installing globally, you can use the smart-cli command:
export OBSIDIAN_VAULT=/path/to/your/vault
smart-cli connection "path/to/note.md"
smart-cli lookup "AI Coding"
smart-cli stats
Install the MCP server for AI agent integration (e.g., with Claude Desktop):
Option 1: Using Claude MCP CLI
claude mcp add ob-smart-connections -e OBSIDIAN_VAULT=/path/to/your/vault @yejianye/smart-connections-mcp
Option 2: Manual Configuration
Add the following json to your MCP client config (for example, claude_desktop_config.json):
{
"mcpServers": {
"smart-connections": {
"command": "npx",
"args": ["-y", "@yejianye/smart-connections-mcp"],
"env": {
"OBSIDIAN_VAULT": "/path/to/your/vault"
}
}
}
}
# Set via environment variable (recommended)
export OBSIDIAN_VAULT=/path/to/your/vault
# Or use --vault flag with each command
smart-cli --vault=/path/to/vault <command>
Find notes semantically similar to a specific note:
smart-cli connection "ML/Neural Networks.md"
# JSON output
smart-cli connection "Projects/Project A.md" --format=json
# Limit results
smart-cli connection "Daily/2024-01-15.md" --limit=5
Example Output:
Found 5 connection(s):
[0.85] Machine Learning Basics
[0.78] Deep Learning
[0.72] AI Applications
[0.68] Data Science
[0.65] Python Programming
Show vault embedding statistics:
smart-cli stats
# JSON output
smart-cli stats --format=json
Example Output:
Smart Connections Vault Statistics
===================================
Sources:
Total entries: 1234
Files: 1100
Blocks: 134
Embeddings:
With embeddings: 1200
Without embeddings: 34
Coverage: 97.2%
Model Info:
Embedding model(s): TaylorAI/bge-micro-v2
Vector dimension: 384
Estimated size: 1.85 MB
Settings:
Min characters: 200
File exclusions: Untitled
Folder exclusions: (none)
Exclude blocks: false
Check Smart Connections data integrity:
smart-cli validate
Example Output:
Validating Smart Connections data...
✓ Vault path is valid
✓ Smart Connections data found
✓ Data file is valid JSON
✓ Plugin settings found
✓ All embeddings are valid
✓ No orphaned files detected
==================================================
Validation Summary
==================================================
Checks passed: 6
Issues: 0
Warnings: 0
✅ All checks passed!
Perform text-based search across your vault:
smart-cli lookup "machine learning concepts"
# With options
smart-cli lookup "React hooks best practices" --limit=10 --skip-blocks
# JSON output
smart-cli lookup "project management" --format=json
The MCP server provides the following tools for AI agents:
connection ToolFind notes semantically similar to a specified note.
{
"name": "connection",
"arguments": {
"note_path": "projects/my-project.md",
"limit": 10
}
}
lookup ToolPerform semantic search using query text.
{
"name": "lookup",
"arguments": {
"query": "machine learning algorithms",
"limit": 15
}
}
stats ToolGet vault embedding statistics.
{
"name": "stats",
"arguments": {}
}
validate ToolValidate Smart Connections data integrity.
{
"name": "validate",
"arguments": {}
}
Configure vault access via:
OBSIDIAN_VAULT=/path/to/vault (set during installation)vault_path parameter to each tool callThe CLI and MCP server read embedding data generated by the Smart Connections Obsidian plugin:
.smart-env/smart_sources.json (single-file) or .smart-env/multi/ (multi-file AJSON) from your vault.obsidian/plugins/smart-connections/data.json# Clone the repository
git clone https://github.com/smart-connections/cli.git
cd cli
# Install dependencies
npm install
# Run locally
npm start -- connection "path/to/note.md"
# Run MCP server
npm run mcp
# Run tests
npm test
Make sure:
.smart-env/smart_sources.json or .smart-env/multi/ directory exists in your vaultEither:
OBSIDIAN_VAULT environment variable--vault flag: smart-cli --vault=/path/to/vault commandThe note may:
Run smart-cli validate to diagnose issues.
MIT
Выполни в терминале:
claude mcp add ob-smart-connections-mcp -- npx Web content fetching and conversion for efficient LLM usage.
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolProvides auto-configuration for setting up an MCP server in Spring Boot applications.
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzНе уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai