An agent without memory starts every session from zero: it proposes again what you already ruled out and asks again why you made a decision. The simplest fix I found is a folder of Markdown notes that the agent writes and that you can also open, read and correct. That is obsidian-mcp v2.0.0, a Go MCP server that treats an Obsidian vault as agent memory, whether or not the Obsidian app is running.
If MCP is new to you, start with this post. The code is at github.com/nemesis312/obsidian-mcp and the release is v2.0.0.
Why a folder of Markdown
The .md files are the source of truth. The index lives in memory and is rebuilt from them, so deleting it loses nothing. There is no database, no API key and no runtime: it is one binary that speaks stdio to any MCP client and any model. And because they are ordinary notes, you can read them in Obsidian, link them and fix what the agent got wrong. That last part matters more than it looks: a memory a human cannot review is a memory you will not trust.
The pain behind v2
People wanted a folder of notes as agent memory, but v1 had to be fixed first. Users reported that the graph did not look like Obsidian’s and lost links. A recon on synthetic vaults confirmed it:
With normal name links ([[Note]]), a 5,000-note vault had 0 edges. Backlinks and the graph used different rules, links inside code were counted, and unresolved links were dropped. There was no move or rename, so moving a note broke everything that pointed to it. Every call re-read the whole vault, the orphan scan took about 8 minutes at 5,000 notes, and get_link_graph returned 5.5 MB of JSON that no agent can use.
There was no memory to build on top of that. The foundation came first.
What changed, told as problems solved
It was built in six phases, each with its own review. These are the problems, not the tool list.
The graph did not match Obsidian. There is now one resolver with Obsidian’s rules: name, path suffix, case, Unicode, Markdown links, code ignored, and ghost nodes for targets that do not exist. The tie-break rules were checked against the app. Backlinks, orphans and the graph agree with each other.
Everything was slow. A live in-memory index replaces the whole-vault walk on every call. The orphan scan went from about 8 minutes to about 18 ms at 5,000 notes.
Writing was scary. Every note has a version. Replacing or deleting needs the version you read, and if someone changed the note, the call is refused with the current version. Writes go through a lock shared by all server processes, since you can run several on one vault, and through Go’s os.Root, so a folder swapped for a symlink cannot redirect a write outside the vault. On top of that, edit_section touches one section only, and move_note moves or renames a note and rewrites the links the move changes.
Responses did not fit in context. Ranked search with snippets, a vault overview, a graph walk inside a token budget, shortest path between notes. No response goes over 100 KB.
The agent had nowhere to put what it learned. save_memory, get_session_context, materialize_lessons and search_memory store decisions, bugs and lessons as one note per memory. For the LLM wiki pattern there are read-only folders for raw sources and a built-in guide you install as AGENTS.md.
An example: save a decision, get it back
This example comes from the README, with a made-up project. The agent saves a decision and marks an older one as replaced:
{
"name": "save_memory",
"arguments": {
"project": "billing-api",
"type": "decision",
"title": "Use idempotency keys",
"content": "Every POST carries an Idempotency-Key header.",
"tags": ["api", "payments"],
"supersedes": ["2026-03-02-retry-blindly"]
}
}
That creates memory/billing-api/decision/<date>-use-idempotency-keys.md, a normal note you can open in Obsidian, and returns a wikilink ready to paste. Saving again with the same project and title does not make a copy: it adds a dated entry under ## Updates and keeps the earlier text. The old decision ends up with status: superseded.
In the next session, before touching anything, the agent calls this:
{
"name": "get_session_context",
"arguments": { "project": "billing-api", "max_tokens": 2000 }
}
It gets, in this order and trimmed to the budget, the open bugs, the active decisions, the lessons and the project’s hub notes. Resolved and superseded memories are left out. The call never writes. The instructions the server sends on connect name that loop, get_session_context before the task and save_memory after it. Not every client shows them, so the guide also lives in the vault’s AGENTS.md.
The numbers, with their limits
On 10,000 generated notes: cold index in 0.75 s, search end to end in about 41 ms, and one-note update in 8.5 ms. Two caveats. This was measured on a developer laptop (Apple M5 Pro) against a synthetic vault already in the disk cache, so it says nothing about cold disks or network shares. And about 37 of those 41 ms are the walk that checks what changed, the one cost that grows with vault size. The full report, with the commands to reproduce it, is in docs/performance.md.
What we tested with two clients
To claim it works with any client and model, it has to run on more than one. The same four-prompt wiki flow passed 8 of 8 with Claude Code and with Codex CLI, with zero interventions. That is two clients and one flow, not a benchmark, but it is more than asserting it.
On security, every phase had an independent review. The phase 1 review found a medium-severity denial of service in resolving ambiguous names (32 s, fixed), and the release had no open Medium or higher finding at the tag. Known limits are in SECURITY.md.
If you are coming from v1
v2 breaks compatibility on purpose, because consolidating the tools called for it. What you need to know:
The module is now github.com/nemesis312/obsidian-mcp/v2. The path without /v2 stays on v1 for good. Four tools were removed and one was renamed, with no aliases: a call to an old name fails with unknown tool.
| Before | Now |
|---|---|
search_vault | search_notes |
get_backlinks | get_neighbors with direction="in" |
get_outgoing_links | get_neighbors with direction="out" |
get_notes_by_tag | list_vault_files with tags |
patch_note | replace_note |
Also, get_note returns JSON, and replace_note and delete_note require the expected_version that get_note returns. Search your prompts, instruction files and scripts for the old names. If you copied an earlier AGENTS.md template, replace it, because it names tools that no longer exist. Restart the client so it reads the new tool list. The binary and the flags are the same, so the client configuration does not change. The full table and the steps are in the Upgrading section of the release notes, and it is worth reading all of it before you upgrade.
Install it
go install github.com/nemesis312/obsidian-mcp/v2/cmd/obsidian-mcp@latest
claude mcp add obsidian "$(go env GOPATH)/bin/obsidian-mcp" -- --vault "/path/to/your/vault"
There are also binaries on the release, with a checksums.txt. For another client, the README has the mcpServers block with OBSIDIAN_VAULT_PATH. For memory, ask the agent: “Call get_agent_guide and save the text, unchanged, as AGENTS.md at the vault root with create_note.” If you have raw sources, add --readonly-folders="raw" and no write tool will touch them.
The new version check only informs: obsidian-mcp --check-update makes one request to the GitHub releases API, sends no vault data, and never downloads anything.
Try it and tell me
If you use Obsidian as a second brain, or you want your agents to stop forgetting, install v2 on a test vault and look at what the agent saves in a week. Bugs, links Obsidian resolves differently, or ideas go as an issue on the repo, and a star helps other people find it. Follow me on YouTube and GitHub for what comes next.
