Using an Obsidian vault or second brain as an AI’s memory
An AI can use your Obsidian vault as memory because a vault is just a folder of Markdown files. Claude Code started in that folder can read, search and edit every note. Desktop apps reach it through an MCP server. claude.ai gets to it only through a server on the internet, because it connects to tools from Anthropic’s cloud, not from your computer. ChatGPT works the same way: Basic Memory’s docs say its ChatGPT setup needs their hosted Cloud.
What a vault gives the AI is your notes, kept whole, in your words. It doesn’t remember anything on its own: the AI knows what it finds when it looks, and what it writes back is only as good as your review of it. A dedicated AI memory works the other way round. The AI writes down what it learned about you, loads it at the start of each conversation, and lets some of it fade.
A question that keeps coming up is whether Obsidian itself does anything for the AI (“Is obsidian vault worth it?”, r/ClaudeCode, October 2026). The agent reads text files. The links in them are text it can follow, but the graph view, the backlinks pane and the plugins are for you, unless the agent asks Obsidian through its CLI or an MCP server.
An AI drafted this page from the sources below and another AI checked it. No person has run these steps for this page: it’s a research summary of each tool’s own docs and repositories, read 3 December 2026. Counterparts, which this page names, is ours.
Side by side
| Who writes it | Reads your existing vault? | Reaches claude.ai or ChatGPT? | Where it lives | Cost | |
|---|---|---|---|---|---|
| Claude Code in the vault folder | You, and Claude when you let it | Yes, as plain files | No (Claude Code only) | Your vault, on your disk | Your Claude plan |
| Obsidian MCP server (Local REST API plugin, mcp-obsidian) | You, and any connected AI with your API key | Yes, through the running Obsidian app | Not claude.ai: it runs on your computer | Your vault, on your disk | Free (both MIT) |
| Basic Memory | You and the AI, in the same Markdown files | Yes: point a project at the vault folder | claude.ai and ChatGPT through Basic Memory Cloud only | Local: your disk. Cloud: Basic Memory’s servers | Local free (AGPL-3.0); Cloud from $19 a month |
| Smart Connections | You | Yes: indexes it with a local model | No: you copy context into a chat | Inside Obsidian | Core free; Pro for supporters |
| Copilot for Obsidian | You, and the agent you run inside Obsidian | Yes | No: it runs Claude Code, Codex or OpenCode inside Obsidian | Inside Obsidian | Plugin free with your own account or key; hosted models paid |
| Claude’s or ChatGPT’s built-in memory | The AI, from your chats (ChatGPT also from files saved in ChatGPT and connected apps) | Not from your disk, by their docs | Each in its own app | The vendor’s servers | Included in the plan |
| Counterparts (ours) | The AI, in its own words | No, and can’t import notes or Markdown | claude.ai through the hosted beta; ChatGPT in beta with a known connection issue | Local: one SQLite file on your computer. Hosted: our server | Local free (BSL 1.1, source on GitHub); hosted a free beta with limited spots |
Which fits whom
- You use Claude Code and your notes are already in Obsidian. Start Claude Code in the vault folder, or add the vault to a code project with
--add-dir. Write a short CLAUDE.md that says where things are. No plugin needed. How. - You want Claude Desktop, Cursor or another app to search the vault while you work. Use an MCP server. The Local REST API plugin has one built in, and it works only while Obsidian is open. Claude Desktop runs local MCP servers from its config file, and a Cowork session running locally on your device can use them too. MCP servers.
- You want the AI to keep notes you can open and edit as files, and reach them from claude.ai, ChatGPT and your phone. Basic Memory fits this better than anything else here, including Counterparts. Its docs say claude.ai and ChatGPT need its Cloud. The local version is free; reaching claude.ai or ChatGPT takes its paid Cloud. Basic Memory.
- You want related notes and answers inside Obsidian itself. Smart Connections finds notes related to the one you’re writing. Copilot for Obsidian runs an agent beside your notes. Plugins.
- You want the AI to remember you (your preferences, decisions, where you left off) without keeping a vault for it. That’s a memory’s job: Claude’s or ChatGPT’s built-in one, or Counterparts if you want one memory that writes in its own words and lets things fade. Memory.
- You want both. Keep the vault for your documents and let a memory carry the relationship. Both.
Claude Code in the vault folder
Claude Code reads files in the folder where you start it without asking, and by default asks before it edits them. Because Obsidian keeps notes “as Markdown-formatted plain text files in a vault”, and “a vault is a folder on your local file system”, there’s nothing to connect:
cd ~/path/to/your-vault
claudeFrom a code project, claude --add-dir ~/path/to/your-vault (or /add-dir during a session) gives Claude access to the vault as well. By default the vault’s own CLAUDE.md isn’t loaded then; set CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 if you want it to be.
A CLAUDE.md at the vault root is the part that makes it work. Claude Code loads it every session, and it shows up in Obsidian as an ordinary note. Say which folders are yours, which the agent may write to, how you name files, and that links use [[wikilinks]]. Anthropic suggests keeping each CLAUDE.md under 200 lines. With hundreds of notes, an index note that names each folder or topic in a line saves the agent from reading everything. One r/ClaudeCode commenter put it this way:
“With 70 notes, Claude can’t read all of them every time, so it reads the index, decides which 2 or 3 are relevant, and opens just those. No index and it either misses the right note or burns the context window reading everything.” (r/ClaudeCode comment, October 2026)
Fencing off folders. A Read deny rule in .claude/settings.json, such as Read(./Journal/**), stops Claude’s file tools from reading that folder, and also blocks editing it. Anthropic’s docs warn that some shell commands can still read a denied file, for example grep -r run from the folder above it, or a script that opens files itself. If a folder has to stay private, keep it outside the vault you open. Otherwise turn on Claude Code’s sandbox and turn off its unsandboxed retry, as the docs advise.
Obsidian’s own CLI. Obsidian has a command-line interface (it needs the 1.12 installer or later, switched on under Settings > General > Command line interface) that can search the vault, list backlinks and tags, and append to the daily note: for example obsidian search query="meeting notes". It talks to the running app (“Obsidian CLI requires the Obsidian app to be running”), so an agent can use it to ask Obsidian for backlinks it can’t see in the raw files.
What Claude Code keeps on its own. Besides your vault, Claude Code has auto memory, on by default: Claude writes notes to a MEMORY.md per repository, and the first 200 lines or 25 KB load each session. It stays on that one machine.
Obsidian MCP servers
An MCP server lets an app that isn’t sitting in your vault folder use it through tools: list, read, search, patch, append.
- Local REST API with MCP is an Obsidian community plugin with an MCP server built in, at
https://127.0.0.1:27124/mcp/, behind an API key. It can patch one heading, block or frontmatter key without touching the rest of a note, and search frontmatter, tags and paths. It refuses to read or write Obsidian’s.obsidianconfiguration folder by default. Claude Code adds it withclaude mcp add --transport http obsidian https://127.0.0.1:27124/mcp/ --header "Authorization: Bearer <your-api-key>"; Claude Desktop needs themcp-remotebridge, by the plugin’s README. The plugin uses its own certificate, so if the connection fails, trust that certificate (the README explains how) or turn on its plain HTTP server and usehttp://127.0.0.1:27123/mcp/. - mcp-obsidian is a separate MCP server that talks to that plugin’s REST API: list files, get a file, search, patch, append and delete. Its README advises telling Claude to use Obsidian first, “Then it will always call the tool.” MIT licence.
Both depend on the Obsidian app running on your computer. Neither reaches claude.ai: Anthropic says custom connectors connect “from Anthropic’s cloud infrastructure, rather than from your local device”, and local servers set up in Claude Desktop “aren’t available in claude.ai”.
Basic Memory
Basic Memory is the closest thing to a memory built for a vault. You and the AI write the same Markdown files; it keeps a local SQLite index for search by keyword and by meaning, and serves the files to any MCP app. Its docs give the step for an existing vault:
basic-memory project add main ~/path/to/your/obsidian-vault
basic-memory project default mainTo connect Claude Code to it, the README gives claude mcp add basic-memory -- uvx --prerelease=allow basic-memory mcp; its README also has a Claude Desktop config.
Notes the AI writes appear in Obsidian at once, and its wikilinks show in your graph and backlinks.
What to know before pointing it at a vault you care about:
- It edits your notes’ frontmatter. Its docs say “Canonical permalinks are always added”: any note without a
permalink:line gets one the next time it’s indexed, and by default it also adds a title and type where they’re missing (ensure_frontmatter_on_sync). It doesn’t rewrite your links. Commit the vault to git first, or try it on a copy. - It works best with its own note shape. Its docs say facts written as
- [category] textlines are each indexed individually, so search can surface the one fact you need; typed relations such as- requires [[Burr Grinder]]build its graph. - claude.ai, ChatGPT and your phone need Basic Memory Cloud. It’s in Claude’s connector directory and ChatGPT’s plugin directory, from $19 a month after a 7-day trial. After
bm cloud loginandbm cloud setup, link the vault as a cloud project (bm project add <name> --cloud --local-path ~/path/to/obsidian-vault). Thenbm cloud push --name <name>andbm cloud pull --name <name>sync it (add--dry-runfirst to preview), never deleting files on the other side and stopping on a conflict. - The local version is free under AGPL-3.0 and needs Python (it runs with
uvx).
Plugins that bring AI into Obsidian
- Smart Connections indexes your vault with a local embedding model (“no API key required”) and shows notes related to the one you’re on. It doesn’t connect your vault to Claude or ChatGPT: its “Send to Smart Context” button copies the related notes to your clipboard to paste into any chat. Its chat feature moved to a separate plugin, Smart Chat. The core is free and source-available; Connections Pro is for project supporters.
- Copilot for Obsidian brings agents into the vault: version 4 runs OpenCode, Claude Code or Codex inside Obsidian, with Projects that keep their own instructions, context and chat history. The plugin is open source (AGPL-3.0) and free with your own Claude or Codex login, provider key or local model; Copilot-hosted models are paid, and the backend for hosted features is closed source.
Both work inside Obsidian. Neither carries your vault into claude.ai or ChatGPT.
A dedicated AI memory instead, or as well
A vault holds what you decided to write down. A memory holds what the AI picked up from talking to you, written by the AI without you having to file it.
Claude’s built-in memory is on by default for Free, Pro, Max and Ultra. Claude “saves memory as a set of individual topics as you chat”, and you can tell it to “remember this”. Each project has its own memory. You can review and edit it in Settings.
ChatGPT’s memory remembers “relevant preferences and details from your chats and other available sources”, and OpenAI says it “does not retain every detail from every conversation”.
Counterparts (ours) gives Claude a memory it writes in its own words: what matters sticks and the rest fades unless it comes up again. Each session opens with a short note the AI wrote itself on who it is, who you are and where you left off, and each session becomes a chapter in its journal. When something changes, the old version stays beside the new one, marked earlier.
Where it loses on this page’s question:
- It doesn’t read your vault, and it can’t import notes or Markdown. Its
counterparts importcommand takes only a Counterparts memory file, such as the one Counterparts’ hosted service lets you download. - Its memory isn’t your notes. It’s one SQLite file under
~/.counterparts, written by the AI, and some of it fades on purpose. If you want every word kept as you wrote it, that’s a vault’s job. - It can go out the other way:
counterparts export --markdown --plaintext --out ~/counterparts-exportwrites a folder with a README, the AI’s self page, the journal and one Markdown file per memory, to open in any text editor. We haven’t tried that folder in Obsidian.
Install it where you work:
- Claude Code: with Node 22.15 or newer,
npm install -g counterparts@latest(orbun add -g counterpartswith bun 1.3 or newer), thencounterparts, then restart Claude Code. On a Mac or Linux you can instead run/plugin marketplace add mlapeter/counterpartsand/plugin install counterparts@counterpartsinside Claude Code. Windows works through npm and is new, so tell us how it goes. Counterparts for Claude Code. - Claude Desktop on a Mac: the same install, then
counterparts install --host claude-desktop, restart Desktop, and set the counterparts tools to Always allow. - claude.ai: the hosted version is a free beta with limited spots, by email sign-up, with a waiting list when it’s full: Counterparts for claude.ai. ChatGPT through the same account is in beta, with a known connection issue we’re fixing. The hosted memory and a local install are two separate memories.
Free to use (BSL 1.1), with the source on GitHub.
Using a vault and a memory together
The two don’t overlap much, so you can use both:
| A vault | A memory | |
|---|---|---|
| What’s in it | Your notes, documents, research | What the AI learned about you and your work together |
| Who writes it | You (and the AI, if you let it) | The AI |
| When the AI sees it | When it searches or you point it there | At the start of each session, and as related things come up |
| What happens to old things | Kept until you delete them | Fade unless they come up again (Counterparts); kept until edited (Claude Code’s auto memory) |
With Counterparts, what it knows about you reaches every folder, and notes about a project’s work show up in that project. Run Claude Code in your vault with Counterparts installed, and the vault’s CLAUDE.md tells it how your notes work while the memory tells it who you are and what you were doing yesterday. We haven’t tested that pairing ourselves yet.
What breaks
- Trust in what the agent writes. An agent can file a misreading as fact, and later sessions will read it back as yours. Keep the vault in git, give the agent its own folder, and read the diffs.
- Files nobody opens. One user counted “3,950 markdown files created in one year, mostly by Claude Code, Codex and friends”, and found “89% were never opened within 7 days of being created” (r/AI_Agents post, October 2026). Give agent notes their own folder and clear it out now and then.
- Size. A large vault costs context if the agent reads widely. An index note, a short CLAUDE.md and search tools (Basic Memory, an MCP server’s search, the Obsidian CLI) keep it to the notes that matter.
- Reach. A vault on your disk serves only the apps on that computer. On your phone or in claude.ai, it has to be reachable online.
- Upkeep. A vault needs maintaining to keep helping. As one user said of theirs, “It’s actual work maintaining it though” (r/ClaudeCode comment).
The Reddit quotes on this page were read from the Arctic Shift archive, not opened live.
What we haven’t tested
No one here has run the setups on this page: Claude Code in a vault, either MCP server, Basic Memory on an existing vault, the plugins, Counterparts beside a vault, or a Counterparts Markdown export opened in Obsidian. Everything about other tools comes from their own docs and repositories as read on 3 December 2026.
More on choosing: Claude Code memory, Claude memory alternatives, local AI memory, memory vs RAG vs the context window, and the directory.
Questions people ask
Can Claude use my Obsidian vault as memory?
Yes. A vault is a folder of Markdown files, so Claude Code started in that folder can read, search and edit your notes with no plugin. Claude Desktop and other MCP apps can reach it through an MCP server, such as the Local REST API plugin’s built-in one or Basic Memory. claude.ai can’t reach a server on your own computer: it connects to connectors from Anthropic’s cloud, so it needs a server claude.ai can reach over the internet: a hosted service such as Basic Memory Cloud, or one you expose yourself on the public internet over HTTPS (port 443).
Does Obsidian’s graph view help the AI?
Not directly. An agent reading your files sees the text, including any [[wikilinks]] written in it, and can follow those links. The graph view is drawn by the app for you. An agent sees backlinks only if it asks Obsidian, for example through the Obsidian CLI’s backlinks command (which needs the app running) or through an MCP server that runs inside Obsidian. What helps the agent most is a short index note or CLAUDE.md that tells it where things are.
Is a vault better than ChatGPT’s or Claude’s built-in memory?
They do different jobs. A vault holds what you wrote, whole and in your words, and the AI reads it when it searches or is told to. A built-in memory holds what the AI picked up from your chats, saved by the AI and loaded without being asked. You can use both: the vault for documents and reference, the memory for who you are and where you left off.
Can Counterparts read or import my Obsidian vault?
No. Counterparts, which is ours, keeps the AI’s own memory in one SQLite file and doesn’t read a vault or import notes or Markdown. Its counterparts import command takes only a Counterparts memory file, such as the one Counterparts’ hosted service lets you download. It can go the other way: counterparts export --markdown --plaintext --out ~/counterparts-export (any empty folder) writes its memory out as Markdown files you can open in any text editor. If you want an AI to work from your vault, Basic Memory, an Obsidian MCP server or Claude Code in the vault folder fit better.
Should I let the AI write into my vault?
Only where you can see and undo what it did. Put the vault under git so every change is a diff, give the agent its own folder, and block the folders it shouldn’t touch with deny rules (Claude Code) or a read-only setup. Claude Code’s deny rules cover its file tools but, by Anthropic’s own docs, not every shell command, so use its sandbox when a folder has to stay private.
Questions? Ask in r/AIMemorySystems.
References
- Obsidian: How Obsidian stores data, Obsidian CLI
- Claude Code docs: How Claude remembers your project, Permissions
- Anthropic: Custom connectors using remote MCP, Chat search and memory
- OpenAI: Memory FAQ
- Basic Memory: README, Obsidian, Knowledge format, Configuration, Claude Desktop and claude.ai, ChatGPT, Cloud sync, Pricing
- Local REST API with MCP, mcp-obsidian
- Smart Connections, Copilot for Obsidian
- Counterparts: Get started, Changelog, 0.4.5