Claude Code and Obsidian Without a Plugin or MCP
My Claude Code memory started as an Obsidian vault. It runs on plain files, a SessionStart hook and git, with no plugin or MCP server. Where it bites.
In this post
TL;DR: An Obsidian vault is a folder of markdown files, and Claude Code already reads, searches and edits files. My vault started as an Obsidian vault and Claude Code uses it with no Obsidian plugin, no MCP server and no running app. A SessionStart hook loads the notes that matter, and git keeps three machines in sync. Two things need care. Hook output is capped at 10,000 characters, so the vault needs a short “load this” section. My scheduled jobs and interactive sessions share one working tree, so I commit by pathspec.
The first commit in my vault is dated 2026-06-07, and the message is “Initial commit: Obsidian vault baseline before memory-system tidy-up”. A later commit that day reads “chore: ignore nested per-folder .obsidian cruft”.
On 2026-11-22 it had about 6,000 commits, 1,613 tracked markdown
files and 5,341 [[wikilinks]] across them. It holds several
separate areas of my work, and it’s a git repo that lives on three
machines: a Mac and two Linux machines.
I open Obsidian rarely, and I treat it as optional. Claude Code reads and writes the plain markdown files. If you’re deciding whether to install an Obsidian plugin or an MCP server so Claude Code can use a vault as its second brain, this is what I run instead, and where it hurts.
What does Claude Code need from a vault?
It needs the files on disk. A plugin, an MCP server and a running Obsidian app are all optional.
Claude Code already has tools for reading files, searching them and
editing them. A vault is a directory of .md files, so the
agent can use it the way it uses any repo. That has a practical side
effect: the same vault works headless, over SSH and from scheduled jobs,
where there’s no desktop app to open.
On my main Linux machine, Claude Code has 13 plugins installed, and
none of them is for Obsidian. There are no user-level MCP servers, the
two plugins that bundle one are for Linear and Playwright, and
~/.claude.json has zero hits for “obsidian”.
I should reconcile that with something I wrote earlier. My July post on my Claude Code plugin stack lists an obsidian plugin: “An Obsidian-style link into a personal knowledge base, so an agent can pull in and write back durable notes instead of every insight evaporating at the end of the session.” As of 2026-11-22, my main Linux machine doesn’t have it installed.
What do Obsidian’s conventions cost or buy?
In my vault they’ve cost one .gitignore decision, and
they buy a nicer view for the human.
The main convention is the wikilink. To Claude Code,
[[some-note]] is plain text that names a file. The agent
can search for some-note.md and open it. Obsidian renders
the same text as a clickable link, a backlink on the target note and a
line in the graph. Both read the same file, and Claude Code doesn’t need
Obsidian running to do it.
The part that takes a decision is .obsidian/, the folder
where Obsidian keeps its settings. If your vault is a git repo, some of
that folder is worth committing and some of it will churn on every
machine. Here’s what I track:
app.json, which turns on vim modeappearance.jsoncore-plugins.jsoncommunity-plugins.jsongraph.json- one community plugin, Obsidian Importer
- a theme
And here’s what I ignore, from the vault’s
.gitignore:
workspace.json
workspace-mobile.json
.obsidian/cache
*/.obsidian/
.trash/
The comment above those lines reads: “Obsidian: keep config &
plugins, but ignore per-device/session cruft”. The workspace files
record which panes are open, which differs on every device and changes
constantly. The nested */.obsidian/ line is the one from
that commit on day one. It keeps any .obsidian/ folder
inside a subfolder out of history.
How does the vault get into a session?
A SessionStart hook does it. Two earlier posts cover how the hook
picks its notes: the setup is in Two Claude Code Accounts
Share One Brain by Default, and the whole loop is in the AIOS post.
Neither covers the sync step. At session start the hook first commits
pending memory, pulls with --rebase and pushes. Then it
prints the notes for the repo I’m in, and Claude Code adds that output
to the session’s context.
The hook prints one section of the project note,
## Current state, cuts it to fit and skips the rest of the
note. That choice comes from a limit I ran into.
The 10,000-character cap
The Claude Code hooks
docs say: “A hook’s additionalContext,
systemMessage, and initialUserMessage strings,
and its plain stdout, are capped at 10,000 characters”. They also say
what happens past that:
If a value exceeds 10,000 characters, Claude Code writes the text to a file in the session directory and passes Claude the file path with a preview of up to the first 2,000 characters instead. Claude can read the file, but Claude Code doesn’t ask it to.
And you can’t raise it: “Unlike that Bash ceiling, this cap has no setting or environment variable to raise it.”
Here’s how that played out in my hook. Back when it printed the whole project note, Claude Code saved the note to a file, and the model saw a preview of about 2 KB. An audit on 2026-09-25 found zero reads of that file in 46 sessions. And the preview is the first 2,000 characters of the hook’s whole output. The hook printed other notes ahead of the project note, so for this site the preview held none of it.
A test on 2026-10-13 found where the line is. An output of 9,986 bytes arrived whole, and one of 10,007 bytes became a preview. The hook now keeps each output under a 9,800-byte budget. Each cut ends with a pointer to the full file, so the agent can read more when a task needs it. There are two hook entries, so the project note gets its own budget, apart from the general notes.
For scale, this site’s project note was 931,382 bytes on 2026-11-22.
The hook injects about 9 KB of it: the ## Current state
section, cut at 9,339 bytes, with a pointer to the rest.
A vault used as memory needs a short, curated “load this” section.
If you print the vault, or a big note, into the context, the model sees the first 2,000 characters, and Claude Code won’t ask it to read the rest. Put what matters at the top of a short section, cut it under the cap with a pointer, and let the agent open the rest by path.
If you want the architecture behind a read-first index and a vault that stays small enough to read, Build an LLM wiki your coding agent actually reads covers it. The case for plain files over vendor memory is in AI memory outlives any agent.
Claude’s own memory goes in the vault too
Claude Code keeps its own auto memory for each repo. I point that
into the vault, so the notes Claude writes about a project sit next to
everything else. The memory docs describe
the setting: “To store auto memory in a different location, set
autoMemoryDirectory in your settings.json. It
is read from any settings scope: user, project, local, policy, or
--settings.” I set it in each repo’s local settings, and
the value looks like this:
"autoMemoryDirectory": "~/code/vault/memory/my-project"
Claude Code on Multiple Computers goes through how this moves across machines.
How does git keep the vault in sync?
Git is the sync layer. The hook syncs at session start, as above. The other half is what happens at the end of a session that edited a vault file.
The rule I follow: commit exactly the paths you changed before you
stop. Commit by pathspec and never run git add -A, because
other sessions share the working tree:
git add notes/some-note.md
git commit -m "Update note" -- notes/some-note.md
Interactive sessions aren’t the only writers. Scheduled jobs use the
same working tree: an ingest and two weekly maintenance jobs. A blanket
git add -A stages every change in the tree, including edits
another session or job hasn’t finished. A file I leave uncommitted can
make a job skip its own commit.
The second one bit me on 2026-09-24. The 08:00 scheduled ingest ended INCOMPLETE, with the reason “queue drained but tree dirty”. An earlier session had left three files uncommitted, so the ingest’s commit step was skipped. Nothing said so until the next session. Since then, a Stop hook warns me at the end of a turn when the vault tree is dirty. The hook only warns. It never commits or stages anything, and it doesn’t block the stop either, because that would push agents to commit half-done edits.
When does a plugin or MCP server make sense?
When you want Claude inside Obsidian. Obsidian plugins and MCP servers for Claude exist, and some of them put Claude in the running editor, with a chat sidebar for example. If your day is spent in Obsidian and you want Claude next to you there, that’s what they’re for.
My case runs the other direction. The agent works in a terminal, and the vault is its memory. For that, a folder of files, a hook and git have been enough.
A post I wrote on onboarding docs for Claude quotes Karpathy’s framing for an agent-maintained wiki: Obsidian is the IDE, the LLM is the programmer, the wiki is the codebase. Two of those three hold for my setup: the LLM is the programmer and the wiki is a repo of markdown. I rarely open the IDE.
What I’d do if you’re starting
Start with the folder. Make a git repo, put markdown in it, and let
Claude Code read it. If you like Obsidian as the viewer, open the folder
in it and commit the config files you want to keep, with the per-device
ones in .gitignore.
Then add a SessionStart hook that prints one short section per project, stays under 10,000 characters and cuts with a pointer when a note runs long. Check the output size on your longest note, since Claude Code won’t ask the model to read past the preview. Commit by pathspec from day one. If scheduled jobs write to the same repo, add a Stop hook that warns you about a dirty tree.
Plugins and MCP servers can come later, if you find you want the agent inside the editor.
If your team wants this set up, with shared agent memory and context loading that stays under the cap, that’s work I take on. Details are on my consulting page.