obsidian-brain-mcp
Provides MCP tools for working with local Obsidian vaults: listing vaults and notes, reading notes with frontmatter, headings, links and tags, traversing outgoing links/backlinks and N-hop neighborhoods, finding orphans and broken wikilinks, and serving vault-specific guide files. Operates directly on the vault filesystem without requiring the Obsidian app.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
obsidian-brain-mcp
A local Model Context Protocol (MCP) server that lets AI agents (Claude Code, Claude Desktop/Cowork, Cursor, and any other MCP client) work with your Obsidian vaults as a second-brain knowledge graph.
Status: early development (pre-0.1). The read-only and graph tools work today; search and write tools are on the roadmap. Expect breaking changes until
v0.1.0.
Why
Andrej Karpathy's LLM wiki idea describes an agent that maintains a personal, interlinked markdown wiki: it ingests sources, writes and links notes, and answers questions from the knowledge it has built up.
This project provides the plumbing for that idea, with one deliberate twist:
The server does not define your wiki's structure. Your vault does.
The server is a generic, safe gateway. It understands markdown, YAML frontmatter, wikilinks, tags and folders, and nothing about any particular taxonomy.
Each vault describes its own structure, naming rules and ingest workflow in plain files inside the vault (
CLAUDE.md,AGENTS.md,index.md). The server serves those files to the agent (get_vault_guide) and the agent follows them.All "intelligence" (summarising, deciding where a note goes, linking) lives in the calling agent. The server never calls an LLM.
So you can run one server over several very different vaults (a research vault, a work log, a reading list) and each keeps its own rules.
Related MCP server: vault-mcp
Features
Multiple vaults, each with a description agents use to pick the right one.
Works directly on the filesystem: Obsidian does not need to be running; no plugins required.
Obsidian-compatible link resolution: shortest-path names,
[[Note|alias]],[[Note#Heading]], embeds![[...]], frontmatteraliases, and links in frontmatter (e.g.parent: "[[X]]").Link graph tools: outgoing links, backlinks, N-hop neighbourhoods, orphans, broken links.
Safety first: every path is confined to its vault (no
.., absolute paths or symlink escapes),.obsidian/,.git/and.trash/are always hidden, and you can mark folders read-only.Content hashes on every read, ready for safe optimistic-concurrency writes.
Tools
Tool | What it does |
| Lists configured vaults with their descriptions, note counts and guide files. |
| Returns the vault's own instructions ( |
| Lists notes, filtered by folder, glob, tag or modified time; paginated. |
| Reads a note by path or by name: frontmatter, body, headings, links, tags, hash. Can return a single section. |
| Outgoing links and backlinks of a note, with the line each link appears on. |
| Notes within N link-hops of a note (depth and size capped). |
| Notes with no inbound and/or outbound links. |
| Wikilinks that point to notes that do not exist. |
| Health check. |
Planned: full-text search (BM25), frontmatter queries, and safe write tools (create, append, patch section, update frontmatter, rename with link rewriting, delete to OS trash). See the roadmap.
Quick start
Requirements: Node.js 20 or newer.
The package is not yet published to npm, so install from source:
git clone https://github.com/kalana/obsidian-brain-mcp.git
cd obsidian-brain-mcp
npm install
npm run build1. Create a config file
Copy the example config to the default location and edit it:
OS | Default config path |
macOS / Linux |
|
Windows |
|
You can also pass --config <file> or set OBSIDIAN_BRAIN_CONFIG.
vaults:
- name: research
path: ~/Obsidian/Research
description: >
Research papers and course notes. Use for anything about ML theory or papers.
readonly: ["sources/**"]Key | Required | Default | Meaning |
| yes | Identifier agents pass to tools. Unique. | |
| yes | Vault folder. | |
| no |
| When an agent should choose this vault. Be specific. |
| no |
| Files served by |
| no |
| File whose latest lines are shown with the guide; |
| no |
| Globs that may be read but never written. |
| no |
| Extra globs to hide ( |
Your config contains paths on your machine: keep it outside this repository (the default location is) and never commit it.
2. Connect your MCP client
Claude Code
claude mcp add obsidian-brain -- node /absolute/path/to/obsidian-brain-mcp/dist/index.jsCursor / Claude Desktop (mcp.json / claude_desktop_config.json)
{
"mcpServers": {
"obsidian-brain": {
"command": "node",
"args": ["/absolute/path/to/obsidian-brain-mcp/dist/index.js"]
}
}
}Add "--config", "/path/to/vaults.yaml" to args to use a non-default config.
3. Try it
Ask your agent: "List my vaults, read the guide for research, and show me the notes connected
to Transformers."
You can also explore the tools interactively with the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsWriting a vault guide
The guide is where your vault's "brain" lives. A minimal CLAUDE.md at the vault root might say:
# Vault guide
- `raw/` holds untouched sources. Never edit it.
- `wiki/concepts/` holds one note per concept; `wiki/entities/` one per person, tool or paper.
- Every wiki note has frontmatter `parent: "[[...]]"` pointing to its topic note.
- When ingesting a source: summarise it into `wiki/`, link it from the relevant topic note,
and append one line to `log.md`.The server never interprets these rules; it hands them to the agent. Change the file and every agent immediately follows the new conventions.
Security model
The server runs locally over stdio and makes no network calls.
It only touches folders listed in your config. Every user-supplied path is resolved and checked to stay inside its vault (rejects
.., absolute paths and symlinks that escape)..obsidian/,.git/and.trash/are never exposed. Useignoreto hide more andreadonlyto protect folders from future write tools.Logs go to stderr only (stdout is the MCP protocol channel).
Found a vulnerability? Please follow SECURITY.md.
Development
npm install
npm run build # compile to dist/
npm test # vitest
npm run lint # eslint + prettier --check
npm run typecheck
npm run check # lint + typecheck + tests (run before opening a PR)Project layout:
src/
config/ config schema (zod) and YAML loader
vault/ vault registry, safe path resolution, walking, reading, guides
markdown/ note parser (frontmatter, headings, wikilinks, tags)
graph/ link index, backlinks, neighbours, orphans, broken links
tools/ one file per MCP tool (thin wrappers over the modules above)
test/
fixtures/vault/ small synthetic vault used by the testsSee CONTRIBUTING.md for the workflow.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md and our
Code of Conduct. Good first steps: pick an issue labelled
good first issue, or open an issue to discuss a new tool before building it.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Remote MCP gateway for 20-folder Obsidian vaults in TOON format (-36.7% to -45% LLM tokens).
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables MCP clients to safely read, search, create, edit, delete, and move notes in an Obsidian vault, with automatic link repair and reversible deletes.10MIT
- FlicenseNot gradedqualityDmaintenanceEnables MCP clients to search, read, list, and append to markdown notes in a local Obsidian vault or folder of .md files.-
- AlicenseAqualityCmaintenanceEnables natural language interaction with a local Obsidian vault, allowing MCP clients to read, search, create, append, and delete markdown notes securely.7MIT
- AlicenseBqualityBmaintenanceEnables AI agents and developers to inspect Obsidian vault knowledge graphs, navigate backlinks, detect broken wikilinks, lint note compliance, search indexed notes, and scaffold standards-compliant Markdown notes via MCP.6MIT