How to connect Claude Code to your Obsidian vault.

An Obsidian vault is a folder of markdown files, so there are three ways to connect Claude Code to it. Run Claude Code inside the vault folder with a CLAUDE.md file. Connect an Obsidian MCP plugin. Or use Mote for Mac, which gives Claude Code your vault through its own MCP server, without Obsidian running.

By , who makes Mote·Updated

On this page
  1. Why use them together
  2. Option 1: Claude Code in the vault
  3. Option 2: an Obsidian MCP plugin
  4. Option 3: Mote as the bridge
  5. Your vault as memory
  6. Which to pick
  7. Keep your vault safe
  8. Common questions

Why do people use Obsidian with Claude Code?

Obsidian stores a vault as plain markdown files in a folder on your disk (Obsidian Help), and Claude Code works by reading and editing files. Point one at the other and your notes become context Claude can search, quote and update: meeting notes, project docs, the half-finished plan from last Tuesday. Nothing to export.

There’s a second reason. Each Claude Code session starts with a fresh context window (Anthropic: how Claude remembers your project). Your vault already holds what you know about your projects and the people you work with, so it’s a natural place for Claude to look things up instead of asking you again. What the vault can and can’t do as memory has its own section below.

There are three common ways to connect the two. They differ in what has to be running, where you talk to Claude, and what happens when an edit goes wrong. In short:

  • Terminal first? Option 1: run Claude Code in the vault folder. Nothing to install beyond Claude Code.
  • Obsidian always open? Option 2: an MCP plugin gives Claude Obsidian’s own search, tags and commands, from any project.
  • Want it over any Mac app? Option 3: Mote opens Claude and your vault in a floating window. Paid, Mac only.

The comparison below has the details side by side.

Diagram of the three ways to connect Claude Code to an Obsidian vault: Claude Code run in the vault folder; Claude Code talking to the Local REST API plugin inside Obsidian over MCP; and Mote’s agent, opened with Control-Shift-1, using Mote’s note tools on the attached vault folder
What runs where in each option. Only Option 2 needs Obsidian open.

Option 1: run Claude Code inside your vault folder.

The simplest route needs nothing extra. Open a terminal, cd into your vault folder and run claude. Claude Code then works on the vault like any project: it can search, read and edit your notes. Add a CLAUDE.md file at the vault root to tell it how your vault is organized and what it may touch.

Steps

  1. Install Claude Code. The first time you run claude, it asks you to log in with a Claude subscription or an Anthropic Console account (Claude Code overview).

  2. Open a terminal, move into your vault, and start Claude Code (the commands are below).

  3. Run /init to have Claude Code draft a starting CLAUDE.md, or write your own (Anthropic: memory).

  4. Ask it something only your notes know, like “what did I decide about the pricing page last week?”

Terminal
cd "/path/to/your/Obsidian Vault"
claude

Keep the quotes: vault folder names often have spaces. Claude Code doesn’t load the whole vault into its context. It searches for the notes a task needs and reads those (Anthropic: how Claude Code works), so a large vault is fine.

If Claude gets an edit wrong, run /rewind (or press Esc twice while the prompt is empty) to restore the files it changed. Checkpoints have limits (Anthropic: checkpointing):

  • They track files Claude edited with its own file tools. A note that only shell commands changed isn’t tracked.
  • Most subagent edits aren’t restored.
  • Anthropic says checkpoints aren’t a replacement for version control, so keep git or a backup too.

A project CLAUDE.md can sit at the vault root or in .claude/CLAUDE.md, and Claude reads it at the start of every session. A personal one in ~/.claude/CLAUDE.md applies to every project (Anthropic: memory). Here’s a small one for a vault. Change the folder names to match yours:

CLAUDE.md
# My Obsidian vault

This folder is an Obsidian vault: plain markdown notes.

- Search the vault before answering questions about my notes,
  projects or people. Say which note you used.
- Don't create, edit, move or delete notes without asking first.
- Skip the .obsidian/ folder. It's Obsidian's settings, not notes.
- Link notes with [[wikilinks]], the way Obsidian does.
- Daily notes live in Daily/ and are named YYYY-MM-DD.md.
- Keep a note's YAML frontmatter intact when you edit it.

Claude treats CLAUDE.md as context, not enforced configuration (Anthropic: memory). “Don’t edit without asking” is a request it will usually follow, not a lock. The same docs note that specific, concise instructions are followed more consistently, so keep the file short.

Keep Claude Code’s own permission prompts on (Anthropic: permissions). For anything that must never happen, Anthropic’s docs point to a PreToolUse hook, which blocks an action regardless.

Optional: Obsidian’s own command line

Obsidian has an official CLI, obsidian. Claude Code can run terminal commands, so with the CLI on it can use Obsidian’s own search, daily note and move commands (Obsidian Help: CLI).

  1. Install Obsidian 1.12.7 or later. The CLI needs that installer version.

  2. Turn it on in Settings → General → Command line interface, and follow the prompt to register it.

obsidian move updates internal links when that’s turned on in your vault settings. The catch: the CLI needs the Obsidian app running, and the first command launches it.

Terminal
obsidian search query="meeting notes"
obsidian daily:read
obsidian move path="Inbox/Idea.md" to=Projects

Pros

  • Nothing to install beyond Claude Code
  • /rewind restores files Claude edited
  • Obsidian doesn’t need to be open
  • Works on any folder of markdown, vault or not

Cons

  • You work from a terminal opened in the vault
  • Checkpoints only rewind Claude’s own file edits: keep git or a backup
  • Claude can still ignore a CLAUDE.md rule: hard limits need a hook
  • Claude sees the files, not what Obsidian plugins compute from them

Option 2: connect Obsidian through an MCP plugin.

An Obsidian MCP server lets Claude Code work through Obsidian itself, with tools for search, tags and commands, instead of reading raw files (MCP is the open standard behind it). The best-documented route is the Local REST API with MCP plugin, which runs that server inside Obsidian on your computer.

Claude Code supports MCP out of the box: you add a server with claude mcp add, list servers with claude mcp list, and check their status with /mcp inside a session (Anthropic: connect Claude Code to tools via MCP).

Set up the Local REST API with MCP plugin

This is the route for when Obsidian is open while you work and you want Claude to use Obsidian’s own search, tags and commands.

  1. In Obsidian, install and enable Local REST API with MCP, by Adam Coddington, from Community plugins (plugin page, source on GitHub). It’s free, open source (MIT) and desktop only.

  2. Open Settings → Local REST API and copy your API key. The plugin serves everything over HTTPS with a certificate authority it generates locally, and every request needs that key (README).

  3. Check the server is answering: run curl -k https://127.0.0.1:27124/.

  4. Pick how Claude Code connects: either trust the plugin’s local certificate (a), which the README requires for HTTPS, or turn on its plain HTTP server (b). Then run the matching command below with your key pasted in.

(a) Over HTTPS, with the certificate trusted

Download the plugin’s certificate authority from https://127.0.0.1:27124/obsidian-local-rest-api.crt and trust it in your operating system (README). Then add the server:

Terminal
claude mcp add --scope user --transport http obsidian https://127.0.0.1:27124/mcp/ --header "Authorization: Bearer <your-api-key>"
  • Claude Code reads the OS certificate store by default with the native installer, or with Node 22.15 or later for npm installs (Anthropic: network configuration).
  • Per the README, that certificate authority can only vouch for 127.0.0.1, localhost and hostnames you add yourself, so trusting it doesn’t let it impersonate other sites.

(b) Over plain HTTP, on port 27123

Turn on Settings → Local REST API → Enable non-encrypted (HTTP) server (plugin source). Requests still need the API key, and the plugin warns never to expose this server to the internet. Then add the server:

Terminal
claude mcp add --scope user --transport http obsidian http://127.0.0.1:27123/mcp/ --header "Authorization: Bearer <your-api-key>"

Then, with Obsidian open, start Claude Code, run /mcp, and check that obsidian shows up.

In both commands, --scope user makes the server available in every project on your machine while keeping it private to your account. Without it, the server is only added for the folder you ran the command in (Anthropic: MCP).

What Claude can do once it’s connected

From the plugin’s README; the full API is in its interactive docs:

  • Read, write and patch notes with vault_read, vault_write and vault_patch.
  • Search and browse tags with search_simple, search_query and tag_list.
  • Run Obsidian commands with command_execute.
  • vault_delete moves notes to the trash by default.
  • The plugin refuses to read or write inside .obsidian unless you change that.

Pros

  • Works with any MCP client, not only Claude Code
  • Structured tools for reading, patching, searching and tags
  • Deletes go to the trash by default
  • Obsidian’s settings folder is off-limits by default
  • Free and open source

Cons

  • Obsidian has to be open: the server runs inside it
  • API key, plus a certificate to trust or an HTTP server to enable
  • The API key is a credential to guard
  • No edit undo of its own: keep git or a backup

Or run a separate server: obsidian-mcp-server

Pick this one if you want the server outside Obsidian, with a read-only mode to start in. cyanheads’ obsidian-mcp-server is an MCP server that runs on its own and talks to the same Local REST API plugin. What it needs:

  • The Local REST API plugin, version 4.0.0 or later, enabled, and its API key.
  • Node.js 24 or later, or Bun 1.4.4 or later (package.json).

By default it connects to http://127.0.0.1:27123, which only answers once you enable the plugin’s non-encrypted (HTTP) server. The command below is the README’s with two variables added: OBSIDIAN_BASE_URL points it at the always-on HTTPS port instead, so the HTTP server can stay off, and OBSIDIAN_READ_ONLY=true removes its write tools so you can test search and recall before you allow edits (obsidian-mcp-server README).

Terminal
claude mcp add --scope user obsidian-mcp-server -e OBSIDIAN_API_KEY=your-api-key -e OBSIDIAN_BASE_URL=https://127.0.0.1:27124 -e OBSIDIAN_READ_ONLY=true -- npx -y obsidian-mcp-server

Its README says the plugin’s self-signed certificate is accepted by default on that HTTPS address. To allow edits later, remove the server with claude mcp remove obsidian-mcp-server and add it again without OBSIDIAN_READ_ONLY.

Or skip the plugin: the Filesystem MCP server

For the vault from any project, or from another MCP client, with Obsidian closed, there’s a third way. The MCP project’s reference Filesystem server reads and writes files in the folders you give it. It needs no API key or certificate and runs on Node through npx.

Point it at the vault folder only, not your home folder:

Terminal
claude mcp add --scope user vault -- npx -y @modelcontextprotocol/server-filesystem "/path/to/your/Obsidian Vault"

To start read-only, add --read-only after the package name, so it reaches the server rather than claude mcp add. The server then offers only tools that can’t change files (Filesystem server README). Everything after -- goes to the server untouched (Anthropic: MCP).

Terminal
claude mcp add --scope user vault -- npx -y @modelcontextprotocol/server-filesystem --read-only "/path/to/your/Obsidian Vault"

You trade Obsidian’s own tools (tags, search syntax, commands) for plain file access. Inside Claude Code that is close to Option 1.

Or work inside Obsidian: Claudian and Claude Code IDE

If you’d rather talk to Claude from inside Obsidian, two community plugins bring Claude Code into it:

  • Claudian. Embeds Claude Code, Codex and other agents in an Obsidian sidebar. It needs one of those installed and is desktop only (Claudian on GitHub).
  • Claude Code IDE. Lighter: it shares what you have open or selected in Obsidian with Claude Code in your terminal. Connect it by running /ide and choosing Obsidian (Claude Code IDE on GitHub).

A note on older guides: some point to MCP Tools for Obsidian. Its repository is archived and no longer maintained, and its README targets Claude Desktop (MCP Tools on GitHub), so skip it for Claude Code.

Option 3: use Mote as the bridge.

Mote for Mac is a floating markdown notepad that can attach your Obsidian vault folder. Its Agent mode runs your own Claude Code inside Mote, and Mote’s built-in MCP server gives Claude Code tools to search, read and edit your vault notes from a window that opens over any app, without Obsidian running.

Full disclosure: I make Mote, so it’s the option I know best, and it’s the only paid one of the three. Here’s how it works and where it falls short.

Mote for Mac’s floating window open beside Obsidian, showing the same daily note from the vault
Mote’s floating window beside Obsidian, on the same daily note from the vault.

How it works

  1. Install Mote for Mac from getmote.md (macOS 15 or later, Apple silicon). In Settings → Connectors → Obsidian, choose your vault folder.

  2. In Settings → Agents, turn on Agent mode. It’s off by default and uses the Claude Code you already have, on your own account.

  3. On the Defaults tab, set the provider for new conversations to Claude.

  4. On the Tools & integrations tab, under Mote & your notes, check that Mote notes reads Available and Obsidian vault shows your vault.

  5. Press ⌃⇧1 from any app to open Agent. New chats start in Mote’s own folder; to load your vault’s CLAUDE.md too, choose the vault folder on the chat’s welcome screen before your first message.

  6. Ask, and name your vault or @mention it in the request. Mote keeps the vault out of a chat unless you ask for it, so a question that doesn’t mention it searches your Mote notes, not the vault. Through Mote’s mote MCP server, Claude Code can list, search, read, create, edit and write notes in ~/.mote/notes and in the attached vault.

Your usual setup comes along. “Include my Claude setup” is on by default for regular chats, so Claude loads your ~/.claude/CLAUDE.md, skills and MCP servers. Switch it per chat from the permissions menu inside the model picker.

What’s protected, and what isn’t

  • Revision checks. Edits made through Mote’s note tools are refused if the note changed since Claude read it.
  • Session undo. Those edits can be undone during the current app session, so a wrong rewrite isn’t permanent.
  • Your own backup. Changes Claude makes with its own file or shell tools aren’t covered, so keep a backup of the vault.

Mote reads and writes the vault folder on disk. It doesn’t run Obsidian plugins and doesn’t replace Obsidian, which stays the place for your graph, your plugins and long-form work. Two shortcuts help around the vault: ⌘⇧E sends a scratch note into the vault, and ⌥⌘D opens today’s daily note (how to set up Obsidian daily notes).

Mote’s note tools work with Claude Code and Codex, not OpenCode. Separately, a public Mote skill teaches Claude Code in any terminal session to read and write your Mote scratch notes in ~/.mote/notes; add it with the command below. More on the Obsidian side of Mote: quick capture for Obsidian.

Terminal
npx skills add marcelvict/mote

Pros

  • Obsidian doesn’t need to be open
  • Opens over any Mac app with ⌃⇧1, not just a terminal
  • Note-tool edits can be undone during the session
  • Can load your CLAUDE.md, skills and MCP servers
  • Covers scratch notes in ~/.mote/notes too

Cons

  • Mac only: macOS 15 or later on Apple silicon
  • Paid: $18.99 once for the first 100 copies, then $24.99 (3-day free trial)
  • Note tools need Claude Code or Codex as the agent
  • Edits land in your real vault on disk, so keep a backup
  • No Obsidian plugins: it sees the files

Can your Obsidian vault be Claude Code’s memory?

Partly. Your vault works as reference context, not as Claude Code’s built-in memory. That memory is two things: CLAUDE.md files you write, which load at the start of every session, and auto memory, notes Claude writes itself from your corrections. Claude reads the vault only when a task or an instruction sends it there.

Per Anthropic’s docs, auto memory is on by default in local sessions and is stored per project in ~/.claude/projects/<project>/memory/, with a MEMORY.md index whose first 200 lines or 25KB load at session start. It’s plain markdown on your machine, so you can read, edit or delete it. /memory lists your memory files and toggles auto memory; /context all shows which memory files loaded at launch. The full rundown is in CLAUDE.md and Claude Code memory, explained.

To make the vault work as memory, give Claude a small, predictable place to look, and tell it in CLAUDE.md when to look there. For example, a folder like this:

Vault
Memory/
  people.md        # who's who, roles, how they like to work
  projects.md      # active projects, status, key decisions
  preferences.md   # how you like answers: format, tone, length

And these lines in the vault’s CLAUDE.md:

CLAUDE.md
## Memory
- Before answering questions about people or projects,
  read the matching file in Memory/.
- Ask before changing anything in Memory/.

Keep those files short and specific, for the same reason as CLAUDE.md itself. Claude reads Memory/ because CLAUDE.md asks it to, not because the vault loads into every session. Ask “what do you know about project X?” now and then to check it still looks.

Which option should you pick?

Pick Option 1 if you live in the terminal and want zero extra pieces. Pick Option 2 if Obsidian is always open and you want Claude to use it through structured tools, from Claude Code or another MCP client. Pick Option 3 if you want Claude and your vault in a floating window over any Mac app, with undo for its note edits.

Best for
Terminal-first work in one vault
Setup
Low: cd, claude, CLAUDE.md
Platforms
macOS, Windows, Linux
Obsidian open?
No
Undo
/rewind checkpoints; git for the rest
Cost
Free, plus a Claude plan or Console account
Best for
Obsidian’s own tools, from any project
Setup
Medium: plugin, API key, and a certificate or HTTP server
Platforms
macOS, Windows, Linux
Obsidian open?
Yes, the server runs inside it
Undo
Deletes go to the trash; no edit undo
Cost
Free (MIT), plus Claude Code

Option 3

Mote for Mac

Best for
Quick questions over any Mac app
Setup
Low: attach the vault, turn on Agent mode
Platforms
macOS 15+, Apple silicon
Obsidian open?
No
Undo
Note-tool edits, during the app session
Cost
$18.99 once (first 100 copies), then $24.99, plus Claude Code

You don’t have to pick one. A common mix is Claude Code in the vault for long working sessions, and something lighter for a quick question while you’re in another app.

How do you keep your vault safe?

Assume Claude will eventually edit the wrong note, and make that cheap to fix. Back up your Obsidian vault or put it in git, keep approval prompts on for edits, treat any API key like a password, and only connect MCP servers you trust.

  • Back it up. Put the vault in git and commit before a session, or make sure your regular backup covers the folder. If you use git, add a .gitignore first (below).
  • Approve edits. Leave Claude Code’s permission prompts on for file edits, at least until you trust your CLAUDE.md (Anthropic: permissions). For a hard rule, use a PreToolUse hook (Anthropic: hooks).
  • Guard API keys. The Local REST API key grants access to your vault through the plugin. Don’t commit an .mcp.json with a key in it: add the server with the default local scope or --scope user rather than --scope project (Anthropic: MCP).
  • Trust your servers. Anthropic’s docs say to verify you trust each MCP server before connecting it, and warn that servers which fetch outside content can expose you to prompt injection (Anthropic: MCP). A web page you clipped into a note counts as outside content too.
  • Start read-only. With obsidian-mcp-server, OBSIDIAN_READ_ONLY=true removes the write tools (obsidian-mcp-server README).

Before the first commit, create a .gitignore file at the vault root. Plugins keep their settings in .obsidian/plugins/<plugin>/data.json, and that’s where the Local REST API plugin stores your API key (README); committing it puts the key in your history for good. Obsidian’s own docs also suggest ignoring workspace.json and workspaces.json, which change every time you open a file (Obsidian Help). If you don’t need Obsidian’s settings in git at all, ignore .obsidian/ instead.

.gitignore
.obsidian/workspace.json
.obsidian/workspaces.json
.obsidian/plugins/*/data.json

Then start the repository and make the first commit. git status lists what’s about to go in, and no data.json should be on that list.

Terminal
cd "/path/to/your/Obsidian Vault"
git init
git add -A
git status
git commit -m "Before Claude"

Claude Code and Obsidian: common questions

Something else? Ask in the Discord

No account, no card. $18.99 once after that.