# Obsidian Brain

A local MCP server that hands your agent semantic search, a link graph and write access to an Obsidian vault. It works on plain .md files on disk.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: sweir1
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sweir1/obsidian-brain
- Updated: 2026-08-12
- HTML: https://affpapa.org/en/nevibecode/mcp/obsidian-brain

## What it does

Obsidian Brain reads the vault straight from the filesystem, so Obsidian can stay closed. A single Node process splits notes into heading-aware chunks and keeps them in a SQLite index alongside FTS5 full-text search. The default `search` mode is hybrid: semantic hits are fused with BM25 through Reciprocal Rank Fusion.

The tools come in groups. Lookup: `search`, `list_notes`, `read_note`. Graph work: `find_connections`, `find_path_between`, `detect_themes`, `rank_notes`. Writing: `create_note`, `edit_note`, `apply_edit_preview`, `link_notes`, `move_note`, `delete_note`. Housekeeping: `reindex`, `index_status`. Edits hit the disk right away and the affected file gets re-indexed.

You need Node 20+ and a vault path in `VAULT_PATH`; without it the server won't start. The first boot indexes the vault and downloads an embedding model of about 34 MB, so tools take a while to show up in the client. Local embeddings can come from Ollama, with the model picked through an env var. The live-editor tools, Dataview and Bases need the separate companion plugin, and its major.minor version has to match the server's.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `VAULT_PATH`, `DATA_DIR`, `EMBEDDING_PRESET`, `EMBEDDING_MODEL`, `EMBEDDING_PROVIDER`, `OLLAMA_BASE_URL`, `OLLAMA_EMBEDDING_DIM`, `OLLAMA_NUM_CTX`, `OBSIDIAN_BRAIN_OLLAMA_AUTO_PULL`, `OBSIDIAN_BRAIN_OLLAMA_BYOM_AUTO_PULL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Obsidian

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env VAULT_PATH=<VAULT_PATH> --env DATA_DIR=<DATA_DIR> --env EMBEDDING_PRESET=<EMBEDDING_PRESET> --env EMBEDDING_MODEL=<EMBEDDING_MODEL> --env EMBEDDING_PROVIDER=<EMBEDDING_PROVIDER> --transport stdio obsidian-brain -- npx -y obsidian-brain
```
Replace <…> with your own values. 14 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add obsidian-brain --env VAULT_PATH=<VAULT_PATH> --env DATA_DIR=<DATA_DIR> --env EMBEDDING_PRESET=<EMBEDDING_PRESET> --env EMBEDDING_MODEL=<EMBEDDING_MODEL> --env EMBEDDING_PROVIDER=<EMBEDDING_PROVIDER> -- npx -y obsidian-brain
```
Replace <…> with your own values. 14 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "obsidian-brain": {
            "command": "npx",
            "args": [
                "-y",
                "obsidian-brain"
            ],
            "env": {
                "VAULT_PATH": "<VAULT_PATH>",
                "DATA_DIR": "<DATA_DIR>",
                "EMBEDDING_PRESET": "<EMBEDDING_PRESET>",
                "EMBEDDING_MODEL": "<EMBEDDING_MODEL>",
                "EMBEDDING_PROVIDER": "<EMBEDDING_PROVIDER>"
            }
        }
    }
}
```
Replace <…> with your own values. 14 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "obsidian-brain": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "obsidian-brain"
            ],
            "env": {
                "VAULT_PATH": "<VAULT_PATH>",
                "DATA_DIR": "<DATA_DIR>",
                "EMBEDDING_PRESET": "<EMBEDDING_PRESET>",
                "EMBEDDING_MODEL": "<EMBEDDING_MODEL>",
                "EMBEDDING_PROVIDER": "<EMBEDDING_PROVIDER>"
            }
        }
    }
}
```
Replace <…> with your own values. 14 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e VAULT_PATH=<VAULT_PATH> -e DATA_DIR=<DATA_DIR> -e EMBEDDING_PRESET=<EMBEDDING_PRESET> -e EMBEDDING_MODEL=<EMBEDDING_MODEL> -e EMBEDDING_PROVIDER=<EMBEDDING_PROVIDER> obsidian-brain npx -y obsidian-brain
```
Replace <…> with your own values. 14 more environment variables are in the server README

## When to use it
- pull the right passage out of a vault by meaning, not exact wording
- see which notes bridge two themes in your notes
- write or amend a note from inside a chat with the agent
- rename a file without breaking links pointing at it
- check what is indexed and when it was last refreshed

## Example prompts
- Search the vault for everything I wrote about indexing and show the closest chunks by meaning
- Which notes connect my MCP notes with my Obsidian notes? Trace a path between them
- Create a note for this week's plan and link it from `inbox.md`

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
