io.github.sweir1

obsidian-brain

Obsidian Brain

Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required.

stdiocommunityknowledge

Package Details

Transportstdio
Runtimenpx

Runtime Arguments

Positional
Position 0
-y

Package Arguments

Positional
Position 0
server

Environment Variables

VAULT_PATH(str)
Required

Absolute path to your Obsidian vault (or any folder of .md files).

DATA_DIR(str)

Where to store the SQLite index + embedding cache. Defaults to $XDG_DATA_HOME/obsidian-brain or ~/.local/share/obsidian-brain.

EMBEDDING_PRESET(str)
Default:english

Preset name: english (default, bge-small-en-v1.5), fastest, balanced, multilingual. Ignored when EMBEDDING_MODEL is set.

EMBEDDING_MODEL(str)

Power-user override: any transformers.js checkpoint or Ollama model id. Takes precedence over EMBEDDING_PRESET. Switching auto-reindexes.

EMBEDDING_PROVIDER(str)
Default:transformers

Embedding backend. 'transformers' (local, default) or 'ollama' (requires a running Ollama server).

OLLAMA_BASE_URL(str)
Default:http://localhost:11434

Base URL of a local Ollama server. Only used when EMBEDDING_PROVIDER=ollama.

OLLAMA_EMBEDDING_DIM(num)

Override the embedding dimensionality when EMBEDDING_PROVIDER=ollama. If unset, the server probes the model on startup.

OBSIDIAN_BRAIN_NO_WATCH(str)

Set to '1' to disable the live chokidar file watcher. Useful on SMB/NFS vaults where FSEvents/inotify don't fire reliably — fall back to running `obsidian-brain index` on a schedule (launchd/systemd).

OBSIDIAN_BRAIN_NO_CATCHUP(str)

Set to '1' to disable the startup catchup reindex that picks up edits made while the server was down.

OBSIDIAN_BRAIN_WATCH_DEBOUNCE_MS(num)
Default:3000

Per-file reindex debounce for the live watcher, in milliseconds.

OBSIDIAN_BRAIN_COMMUNITY_DEBOUNCE_MS(num)
Default:60000

Graph-wide community-detection (Louvain) debounce for the live watcher, in milliseconds. Louvain is the only expensive op — batching it prevents per-edit CPU spikes.

OBSIDIAN_BRAIN_TOOL_TIMEOUT_MS(num)
Default:30000

Per-tool-call timeout in milliseconds. Tools exceeding this return an MCP error instead of hanging.