Obsidian Brain
A lightning-fast, zero-dependency Rust MCP server linking AI Agents to local Obsidian vaults. Safely read, search, trace backlinks, resolve tags, and interact with visual Obsidian Canvas boards.
Ask AI about Obsidian Brain
Powered by Claude Β· Grounded in docs
I know everything about Obsidian Brain. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Obsidian MCP Server
A Node.js MCP server that gives Claude Code persistent, token-efficient access to any Obsidian vault. Includes hybrid full-text + semantic search and built-in issue tracking.
Prerequisites
- Node.js 18+
- Ollama running locally with
nomic-embed-textpulled (optional β server works without it, FTS-only mode)
ollama pull nomic-embed-text
Setup
npm install
npm run build
Register with Claude Code
Add the server to your MCP configuration. Create a .mcp.json file in your project root, or add to ~/.claude/mcp.json for global access:
{
"mcpServers": {
"obsidian": {
"command": "node",
"args": ["/absolute/path/to/obsidian-brain/dist/server.js"],
"env": {
"VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
}
}
}
}
For development, you can use tsx to run TypeScript directly without building:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/obsidian-brain/src/server.ts"],
"env": {
"VAULT_PATH": "/absolute/path/to/your/obsidian/vault"
}
}
}
}
Important:
- Use absolute paths for both the server script and
VAULT_PATH VAULT_PATHmust point to an existing directory β the server will exit immediately if it is missing or invalid- One server instance per vault
Verify connection
After configuring, restart Claude Code. The server should appear in the MCP tools list. If the connection fails, check:
VAULT_PATHis set and points to an existing directory- The path to the server script is correct and absolute
npm install(andnpm run buildif using compiled mode) has been run in the obsidian-brain directory- Node.js 18+ is available
Tools
Notes
| Tool | Description |
|---|---|
read_note | Read a note by path relative to vault root |
write_note | Create a new note, auto-indexes it |
update_note | Append, prepend, or replace a section; re-indexes |
move_note | Move or rename a note, updates index |
list_notes | List notes in a folder, optionally recursive |
Search
| Tool | Description |
|---|---|
search_vault | Hybrid FTS5 + vector semantic search. Returns top N results with paths and excerpts (default 5) |
reindex_vault | Full vault crawl, rebuilds FTS5 and vector index. Skips unchanged files via mtime |
Projects
| Tool | Description |
|---|---|
create_project | Scaffold 02-projects/<name>/ with starter files |
Issue Tracking
| Tool | Description |
|---|---|
create_issue | Create a tracked issue with type, priority, and description. Stored as a note in the project's issues/ folder |
update_issue | Change status, priority, or append progress notes. Updates both the SQLite record and the markdown note |
list_issues | Filter issues by status, type, priority, or project. Sorted by priority |
Statuses: backlog, not_started, in_progress, code_review, done, blocked
Priorities: P1 (critical), P2 (high), P3 (medium), P4 (low), P5 (trivial)
Types: bug, feature, task
Vault Structure
The server expects (and works with) this folder layout:
00-inbox/ -- unprocessed captures
01-ideas/ -- raw ideas
02-projects/ -- active projects (each in its own subfolder)
<project>/
issues/ -- project-scoped issues
03-research/ -- external knowledge by domain
04-knowledge/ -- refined long-term concepts
05-life/ -- personal planning
06-finance/ -- financial strategy
07-work/ -- professional material
meta/ -- system notes
issues/ -- global issues (not tied to a project)
How It Works
Search
reindex_vaultwalks all.mdfiles, strips frontmatter, embeds via Ollama, and stores in SQLite (FTS5 + sqlite-vec)search_vaultruns keyword (FTS5) and semantic (vector cosine) queries in parallel, merges and deduplicates results- Claude calls
read_noteonly on relevant results β this is the token efficiency mechanism
If Ollama is unavailable, the server falls back to FTS5-only search automatically. If sqlite-vec fails to load (e.g. missing native binary), the server falls back to FTS-only mode as well.
Issue Tracking
Issues are dual-stored:
- Markdown note in
02-projects/<project>/issues/β browsable in Obsidian, includes frontmatter metadata and a notes log. Kept in sync when issues are updated. - SQLite table in
.vault-index.dbβ enables fast structured queries (filter by status, priority, type, project)
Security
- All note paths are validated to stay within the vault boundary β path traversal attacks (e.g.
../../etc/passwd) are rejected - FTS5 search input is sanitized to prevent query operator injection
Indexing
Each vault stores its index at <VAULT_PATH>/.vault-index.db. This file is generated and should not be committed to version control.
CLAUDE.md
Place a CLAUDE.md at your vault root with instructions for Claude. It loads automatically each session. Example rules:
- Never delete notes β move to
00-inbox/if unsure - Search before creating β avoid duplicate notes
- Use the MCP tools instead of reading/writing files directly
- Respect folder roles
Dependencies
| Package | Purpose |
|---|---|
@modelcontextprotocol/sdk | MCP server framework |
better-sqlite3 | SQLite driver (FTS5) |
sqlite-vec | Vector similarity extension for SQLite |
zod | Schema validation for tool parameters |
tsx | Run TypeScript directly |
typescript | Language |
