MCP server for Obsidian Smart Connections. Semantic search using your vault's embeddings.
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.
We needed semantic search of our Obsidian vault from Claude Code. Existing options have problems:
This implementation:
| Property | Guarantee |
|---|---|
| Path confinement | All file access validated against vault root |
| No traversal | ../ and symlink attacks blocked |
| Read-only | No write operations exposed |
| Bounded responses | Capped results (50), content length (10KB) |
| Fail closed | Errors deny access, never bypass |
| Audit logging | Security events logged with context |
git clone https://github.com/gogogadgetbytes/smart-connections-mcp
cd smart-connections-mcp
npm install
npm run build
Add to your Claude Code config:
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:
{
"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.
Once configured, Claude Code can use these tools:
"Search my vault for notes about backup strategies"
→ Uses search_by_text tool
"Find notes similar to Topics/Claude_Code.md"
→ Uses search_similar tool
"Show me the content of Topics/Obsidian.md"
→ Uses get_note tool
"What notes are indexed in my vault?"
→ Uses list_indexed tool
| Tool | Description |
|---|---|
search_by_text | Search using freeform text (computes embedding locally) |
search_similar | Find notes semantically similar to a given note |
search_by_embedding | Search using a raw embedding vector |
get_note | Get content of a specific note (path validated) |
get_model_info | Get embedding model configuration |
list_indexed | List all indexed notes |
| Variable | Required | Description |
|---|---|---|
VAULT_PATH | Yes | Absolute path to Obsidian vault |
~/.cache/huggingface/# Build
npm run build
# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js
See CONTRIBUTING.md. Security-focused PRs welcome.
To report security vulnerabilities, please email gogogadgetcode@proton.me. Do not open public issues for security concerns.
MIT - see LICENSE
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @gogogadgetbytes/smart-connections-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-gogogadgetbytes-smart-connections": {
"command": "npx",
"args": [
"-y",
"@gogogadgetbytes/smart-connections-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup reference@gogogadgetbytes/smart-connections-mcpnpmio.github.gogogadgetbytes/smart-connections works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.