obsidian-memory-mcp
Turns an Obsidian vault into Claude's long-term memory by searching and reading notes, and by creating, updating, appending to, and archiving Markdown memory notes under a dedicated folder while maintaining indexes, logs, and version history.
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-memory-mcp
A self-hosted MCP server that turns an Obsidian vault into Claude's long-term memory, shared by all your Claude clients: claude.ai, the desktop app, the mobile apps (iPhone, Android) and Claude Code.
Claude searches and reads the vault before rediscovering something.
Claude writes what is worth keeping (setups, decisions, procedures, findings) to a dedicated folder of the vault, as Markdown with frontmatter and
[[links]]: you see it and fix it in Obsidian.A skill (
obsidian-memory) tells Claude when to look things up and what to record.
claude.ai · desktop app · mobile Claude Code (any machine)
│ OAuth (password) │ static token (Bearer)
└───────────────┬─────────────────────────┘
▼ HTTPS
reverse proxy (Caddy, nginx…) https://memory.example.com/mcp
│ /mcp: Anthropic's IP ranges (+ yours) only
▼ http://127.0.0.1:8765
obsidian-memory-mcp (systemd or Docker, no root privileges)
▼
Obsidian vault ── read: the whole vault (configurable)
└─ write: only <vault>/Claude/Contents
Related MCP server: obsidian-brainstorm
1. What the server does
Tools given to Claude
Tool | Effect |
| Every memory note (title, one-line summary, date), the latest changes, the vault's top-level folders |
| Full-text search, ignoring accents and case |
| A note's content (by path or by name, like a |
| Notes in a folder, with summary and date |
| Create a memory note, or update one |
| Add text at the end of a memory note |
| Move an obsolete note to |
Rules it enforces, whatever Claude asks
Writes only in the memory folder (
Claude/by default). The rest of the vault is read-only, or even invisible if you choose so (READ_SCOPE=memory,EXCLUDE=...).Nothing is ever deleted. Before each rewrite, the previous version is copied to
Claude/.history/. An obsolete note is moved toClaude/_Archive/.No silent overwrites. To update a note, Claude must pass the
sha256it got when reading it. If you edited the note in Obsidian in the meantime, the write is refused and Claude has to read it again.No duplicates: creating a note whose name already exists in the memory is refused.
No secrets: a note containing a private key, an API key (Anthropic, OpenAI, GitHub, Slack, AWS, Google, Stripe), a JWT or a
password: …is refused.Hidden files (
.obsidian/,.trash/…) and paths leading outside the vault are off limits./mcpanswers only Anthropic's IP ranges (plus the addresses you add): a leaked token is useless from anywhere else. See section 9 for the rest of the hardening.
What you see in Obsidian
MyVault/
└── Claude/
├── _Index.md ← kept up to date by the server: every note, by folder, with its summary
├── _Log.md ← log: what was created, updated, archived, and why
├── Home server.md
├── Projects/
│ └── Website.md
├── _Archive/ ← retired notes
└── .history/ ← previous versions (hidden folder, ignored by Obsidian)A note written by Claude looks like this:
---
summary: Debian home server, its services and how to reach them.
tags:
- infra
created: '2026-12-03'
updated: '2026-12-03'
source: claude
---
## Services
- `obsidian-memory-mcp`: systemd, port 8765, behind Caddy (`memory.example.com`)
...You can edit these notes by hand: the server keeps the frontmatter keys it does not manage (aliases,
cssclass…).
2. Requirements
A Linux server that is always on (a VPS, a mini PC, a NAS…) with systemd and Python 3.11+ (Debian 12+, Ubuntu 24.04+), or Docker.
The Obsidian vault on that server, as plain files, synced with your devices (see section 7).
For claude.ai and mobile: a public HTTPS address. Anthropic's servers connect to your server, not your phone. So you need:
a domain (or subdomain) pointing to the server, for example
memory.example.com;ports 80 and 443 open to the server (port forwarding on your router if it is at home);
a reverse proxy that handles the HTTPS certificate: Caddy (simplest), nginx, Apache, Traefik…
If you only use Claude Code, private access is enough (Tailscale, WireGuard, local network), or even no network at all if Claude Code runs on the vault's machine (
stdiomode, section 5.3).
In what follows, replace:
Example | With |
| your subdomain |
| the Linux user who owns the vault |
| the path of the vault on the server |
3. Install on a Linux server (systemd)
Run every command on the server, over SSH.
3.1 Install the base packages
Debian / Ubuntu:
sudo apt update
sudo apt install -y git python3 python3-venv
python3 --version # must be 3.11 or later3.2 Get the project
sudo git clone https://github.com/vdeabreu/obsidian-memory-mcp.git /opt/src/obsidian-memory-mcp
cd /opt/src/obsidian-memory-mcp(Or copy the folder to the server with scp -r or rsync.)
3.3 Run the installer
sudo ./deploy/install.sh \
--user alice \
--vault /home/alice/Obsidian/MyVault \
--url https://memory.example.comThe script:
installs the application in
/opt/obsidian-memory-mcp(isolated Python environment) and theobsidian-memory-mcpcommand in/usr/local/bin;creates the configuration
/etc/obsidian-memory-mcp/env(readable by root only);generates a random token in
/etc/obsidian-memory-mcp/token;installs and starts the
obsidian-memory-mcpservice, which runs asalice, without any privileges, with the whole system read-only except the vault.
It must end with Running. Check:
curl -s http://127.0.0.1:8765/healthz # {"status":"ok","version":"0.1.0"}
systemctl status obsidian-memory-mcpThe Claude/ folder is created in the vault on first start, with an empty _Index.md.
3.4 Set a password (for claude.ai and mobile)
claude.ai cannot send a static token: it connects with OAuth. In practice, when you add the connector, a page of your server opens and asks for a password. Create it:
obsidian-memory-mcp hash-password | sudo tee /etc/obsidian-memory-mcp/password-hash >/dev/null
sudo systemctl restart obsidian-memory-mcpThe command asks for the password twice (20 characters minimum) and keeps only a hash (scrypt). Generate one
with openssl rand -base64 30 and keep it in your password manager: it is what protects your memory on the
Internet.
3.5 Adjust the configuration (optional)
sudo nano /etc/obsidian-memory-mcp/env
sudo systemctl restart obsidian-memory-mcpThe most useful settings:
OBSIDIAN_MEMORY_DIR=Claude # folder where Claude writes
OBSIDIAN_MEMORY_READ_SCOPE=vault # "memory" so that Claude reads only its own folder
OBSIDIAN_MEMORY_EXCLUDE=Private/*,Journal/* # folders Claude must never read
OBSIDIAN_MEMORY_MCP_ALLOWED_IPS=160.79.104.0/21,153.61.208.0/20,100.64.0.0/10
# who may call /mcp: Anthropic + your machines (here Tailscale)Every option is listed in section 11.
3.6 Set up the HTTPS reverse proxy
First, point DNS: an A record (and AAAA for IPv6) memory.example.com → the server's public IP. Check
with dig +short memory.example.com.
Both sample configurations below restrict /mcp to Anthropic's outbound IP ranges, on top of the same
check inside the server (OBSIDIAN_MEMORY_MCP_ALLOWED_IPS). If Claude Code reaches the server from your own
machines over the Internet, add their addresses in both places (see 5.2).
Anthropic publishes its ranges under "Outbound IP addresses" on
https://platform.claude.com/docs/en/api/ip-addresses: check them now and then.
With Caddy (simplest: the certificate is automatic)
sudo apt install -y caddy
sudo cp deploy/Caddyfile /etc/caddy/Caddyfile # or add the block to your existing Caddyfile
sudo sed -i 's/memory.example.com/YOUR-DOMAIN/' /etc/caddy/Caddyfile
sudo mkdir -p /var/log/caddy && sudo chown caddy: /var/log/caddy
sudo systemctl reload caddyWith nginx
sudo apt install -y nginx certbot python3-certbot-nginx
sudo cp deploy/nginx.conf /etc/nginx/sites-available/obsidian-memory-mcp
sudo sed -i 's/memory.example.com/YOUR-DOMAIN/g' /etc/nginx/sites-available/obsidian-memory-mcp
# Get the certificate first (comment out the "listen 443" block during this step if nginx refuses to start)
sudo certbot certonly --nginx -d YOUR-DOMAIN
sudo ln -s ../sites-available/obsidian-memory-mcp /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl reload nginxWith Apache: deploy/apache.conf holds the steps and the virtual host (with the /mcp IP rule);
certbot adds the HTTPS part.
With another proxy (Traefik, Nginx Proxy Manager…): forward the whole subdomain to
http://127.0.0.1:8765, keep the Host header, set X-Forwarded-For to the client address and
X-Forwarded-Proto: https, turn off response buffering, and allow /mcp only from Anthropic's ranges. If
the proxy is not on the same machine (or runs in a container), put its IP in OBSIDIAN_MEMORY_TRUSTED_PROXIES,
and set OBSIDIAN_MEMORY_HOST=0.0.0.0 with OBSIDIAN_MEMORY_ALLOW_NON_LOOPBACK_LISTEN=true only if a private
network or a firewall isolates the server: it speaks plain HTTP.
3.7 Check from the outside
From your computer:
curl -s https://memory.example.com/healthz
# {"status":"ok","version":"0.1.0"}
curl -s -o /dev/null -w "%{http_code}\n" -X POST https://memory.example.com/mcp
# 403 ← expected: your computer is not in Anthropic's ranges
# (401 if you added its address: then it is the missing token that is refused)It is installed. Go on to section 5.
4. Alternative: install with Docker
git clone https://github.com/vdeabreu/obsidian-memory-mcp.git
cd obsidian-memory-mcp
# Secrets
mkdir -p secrets state
docker build -t obsidian-memory-mcp:local .
docker run --rm obsidian-memory-mcp:local gen-token > secrets/token
touch secrets/password_hash # empty = no password login (claude.ai)
# For claude.ai and mobile, store the password hash (the prompts stay on screen, only the hash is saved):
docker run --rm -it -u "$(id -u):$(id -g)" -v "$PWD/secrets:/out" --entrypoint sh obsidian-memory-mcp:local -c 'obsidian-memory-mcp hash-password > /out/password_hash'
chmod 600 secrets/*
# Configuration
cp deploy/env.example .env
nano .envIn .env, on top of the usual options, set:
VAULT_PATH=/home/alice/Obsidian/MyVault # the vault on the host
VAULT_UID=1000 # id -u alice
VAULT_GID=1000 # id -g alice
OBSIDIAN_MEMORY_PUBLIC_URL=https://memory.example.com
#HOST_PORT=8767 # if 8765 is already taken on the host(The OBSIDIAN_MEMORY_VAULT, ..._TOKEN_FILE and ..._PASSWORD_HASH_FILE lines of .env are ignored:
compose.yaml sets them.)
sudo chown "$(id -u alice):$(id -g alice)" state
docker compose up -d --build
curl -s http://127.0.0.1:8765/healthzThe container listens only on 127.0.0.1:8765 (don't change that line to 8765:8765: Docker publishes ports
past host firewalls such as ufw). Add the HTTPS reverse proxy as in 3.6.
The server trusts X-Forwarded-For from the Docker bridge range 172.16.0.0/12; if your Docker uses another
address pool, change OBSIDIAN_MEMORY_TRUSTED_PROXIES in compose.yaml. If your proxy itself runs in Docker, put both containers on the same
network and target obsidian-memory-mcp:8765.
5. Connect Claude
5.1 claude.ai, the desktop app and mobile
A connector added on claude.ai belongs to your account: it also shows up in the desktop app and in the mobile apps. Your plan must allow custom connectors (Pro, Max, Team, Enterprise; on Team and Enterprise an admin may have to allow it).
On claude.ai, open Settings → Connectors and choose Add custom connector.
Name:
Obsidian memory. URL:https://memory.example.com/mcp. Leave the advanced OAuth settings empty.Click Connect. A page of your server opens ("Connect to your memory"): type the password from step 3.4, then Allow. Only ever type it right after clicking Connect yourself: if a link to that page reaches you any other way, someone may be trying to connect their claude.ai account to your memory.
In a conversation, check in the tools menu that the connector is enabled, then ask for example: "What is in my memory?".
The connection lasts as long as it is used: Claude renews its access by itself (one-hour access tokens, renewed for 30 days after the last use).
5.2 Claude Code (on any machine)
With the static token (simplest):
# On the server, show the token:
sudo cat /etc/obsidian-memory-mcp/token
# On the machine running Claude Code:
claude mcp add --scope user --transport http obsidian-memory https://memory.example.com/mcp \
--header "Authorization: Bearer <the token>"Then, in Claude Code, /mcp should show obsidian-memory as connected.
Claude Code connects from your machine, not from Anthropic's ranges, so /mcp refuses it (403) until you
allow its address. Either:
allow your home's public IP: add it to
OBSIDIAN_MEMORY_MCP_ALLOWED_IPSand to the proxy's rule (only if that IP is fixed);or reach the proxy over Tailscale (for example by mapping
memory.example.comto the server's Tailscale IP in the client's/etc/hosts, or with Tailscale split DNS), and allow Tailscale's range100.64.0.0/10in both places;or run Claude Code on the server itself in
stdiomode (5.3).
Without a token, Claude Code can also use the password: leave out --header, then run /mcp and choose to
authenticate; the same login page opens in the browser.
5.3 Claude Code on the vault's machine (no network)
claude mcp add --scope user obsidian-memory \
--env OBSIDIAN_MEMORY_VAULT=/home/alice/Obsidian/MyVault \
-- /opt/obsidian-memory-mcp/.venv/bin/obsidian-memory-mcp stdioIn stdio mode there is no network and no authentication: only Claude Code starts the server.
5.4 Avoid two competing memories
Claude also has its own memories (the claude.ai app memory, Claude Code's automatic memory). To make the vault the reference, either:
turn off the built-in memory in the claude.ai settings;
or add to your personal preferences on claude.ai (Settings → Profile), and to your
~/.claude/CLAUDE.md: "My reference memory is my Obsidian vault, through the obsidian-memory connector: look things up there and fill it with the obsidian-memory skill."
6. Install the skill
The connector provides the tools; the skill tells Claude when to use them (look before rediscovering, save
as you go, one note per subject, no secrets). It lives in
plugin/obsidian-memory/skills/obsidian-memory/SKILL.md.
claude.ai, desktop app, mobile — two ways:
As a plugin: in claude.ai, open the customization menu, Plugins tab, Add marketplace, enter
vdeabreu/obsidian-memory-mcp, then installobsidian-memory.As a standalone skill: zip it and upload it in Settings → Capabilities → Skills (code execution must be on):
cd plugin/obsidian-memory/skills && zip -r obsidian-memory.zip obsidian-memory
Claude Code — two ways:
# As a plugin:
/plugin marketplace add vdeabreu/obsidian-memory-mcp
/plugin install obsidian-memory@obsidian-memory
# Or by copying the folder:
cp -r plugin/obsidian-memory/skills/obsidian-memory ~/.claude/skills/The skill asks Claude to write notes in the language you speak to it.
7. Sync the vault with your devices
The server works on plain files: the vault on the server and the vaults on your devices must stay in sync. Some options:
Tool | For | Notes |
Syncthing | PC, Mac, Linux, Android | Free, peer to peer, no third-party server. On iPhone, through a compatible third-party app. |
Obsidian Sync | Every device, iPhone included | Paid, official. The server must be part of the sync too: check that a sync client can run on a headless server. |
Self-hosted LiveSync (plugin) | Every device | Self-hosted (CouchDB), but the server's vault must also be kept up to date by a client. |
git (Obsidian Git plugin) | People comfortable with git | Full history, but syncing is less immediate. |
Conflicts are rare (Claude only writes in Claude/), and the server refuses to overwrite a note that changed
since Claude read it.
8. Backups
Sync is not a backup: a note deleted or damaged on one device is deleted or damaged everywhere. Back the vault up somewhere else, encrypted and versioned. Example with restic to any storage (disk, S3, Backblaze B2, or a cloud drive through rclone):
sudo apt install -y restic
export RESTIC_REPOSITORY=sftp:backup@other-machine:/backups/obsidian # or s3:…, b2:…, rclone:…
export RESTIC_PASSWORD_FILE=/root/.restic-password # keep a copy of it elsewhere!
restic init
restic backup /home/alice/Obsidian/MyVault /var/lib/obsidian-memory-mcp
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --pruneSchedule it daily (systemd timer or cron), and test a restore now and then
(restic restore latest --target /tmp/test).
Inside the vault itself, Claude/.history/ keeps the previous versions of every note Claude rewrote.
9. Security
What is protected
/mcpanswers only allowed addresses: Anthropic's outbound ranges by default, plus the ones you add, checked both by the reverse proxy and by the server. A leaked token is useless from anywhere else. When the proxy sends no client address, the server refuses (fail closed).No access without authentication:
/mcpanswers 401 without a valid token. Only/healthzand the OAuth pages are public (your own browser uses them).The static token is compared in constant time and must be at least 32 characters.
The password is at least 20 characters and stored only as a scrypt hash.
OAuth: PKCE required, single-use codes valid for 5 minutes, one-hour access tokens, refresh tokens that change on every use and cannot widen their scope. The server stores only hashes of tokens.
Login page: a 2-second delay after each wrong password, and a 15-minute lockout after 5 (tokens already issued keep working). It shows which client asks and where the code will go, warns against links sent by someone else, cannot be framed, and runs no script.
Clients can register only claude.ai's and claude.com's exact callback URLs, or
localhost(Claude Code; a code sent there only reaches the machine of whoever typed the password). At most 20 clients are kept (the oldest idle ones are evicted) and 50 logins can wait at once, so registrations cannot fill the disk or memory.The
Hostheader is checked (protection against DNS rebinding).The server refuses to listen on anything but loopback unless you opt in: it speaks plain HTTP.
Every tool call is logged (tool, arguments, duration, outcome) with note text replaced by its size:
journalctl -u obsidian-memory-mcp | grep audit.The service runs without privileges, with the whole system read-only except the vault and its state directory.
Found a vulnerability? See SECURITY.md.
What to keep in mind
The password and the token give access to the whole memory. Keep them only in Claude and in your password manager.
Known limit of the password login: someone who adds your server URL as a connector in their own claude.ai account gets a genuine claude.ai link to your login page. If you open it and type your password, their account gets access. Only type the password right after clicking "Connect" yourself.
What Claude reads, Anthropic processes. With
READ_SCOPE=vault, Claude can read the whole vault: exclude what is too personal (EXCLUDE=Journal/*,Health/*) or switch toREAD_SCOPE=memory.Prompt injection. A note may contain text that came from elsewhere (an email, a web page). The server and the skill tell Claude that notes are data, not instructions, but stay mindful of what goes into the vault.
Secret detection is an extra safeguard, not a guarantee.
Revoking access
Every device connected with the password:
sudo systemctl stop obsidian-memory-mcp && sudo rm /var/lib/obsidian-memory-mcp/oauth.json && sudo systemctl start obsidian-memory-mcpChange the static token:
obsidian-memory-mcp gen-token | sudo tee /etc/obsidian-memory-mcp/token >/dev/null && sudo systemctl restart obsidian-memory-mcp, then update Claude Code (claude mcp remove obsidian-memory, thenclaude mcp add …).Change the password: redo step 3.4, then revoke the devices as above.
10. Upgrades, maintenance, troubleshooting
Upgrade
cd /opt/src/obsidian-memory-mcp
sudo git pull
sudo ./deploy/install.sh # the options from the first install are reusedWith Docker: git pull && docker compose up -d --build.
Status and logs
systemctl status obsidian-memory-mcp
journalctl -u obsidian-memory-mcp -f # live
sudo obsidian-memory-mcp --env-file /etc/obsidian-memory-mcp/env checkCommon problems
Symptom | Likely cause | Fix |
The service does not start | Configuration error |
|
| The service does not run as the vault's owner | Run |
| The client's address is not allowed | Expected from your browser. For Claude Code, allow its address (5.2); the server logs |
claude.ai gets | Anthropic added a range, or the proxy hides the client address | Update both lists from Anthropic's page; check the proxy sends |
| Missing or wrong token | Check the |
| The proxy drops the | Keep |
claude.ai: "couldn't connect" | DNS, certificate, port 443 closed, or no password set | Test |
claude.ai: "redirect URI not allowed" | Anthropic changed its callback address | The server logs |
Login page: "Too many failed attempts" | 5 wrong passwords in 15 minutes (maybe not yours: check the log) | Wait 15 minutes, or restart the service |
Cut or very slow responses | The proxy buffers responses |
|
Claude does not use the memory | Skill missing, or connector off in the conversation | Install the skill (section 6); enable the connector in the tools menu |
11. Configuration reference
Every variable starts with OBSIDIAN_MEMORY_. Secrets also accept a _FILE variant pointing to a file that
holds the value.
Variable | Default | Purpose |
| — (required) | Path of the vault |
| — (required in HTTP mode) | Public HTTPS address, without a path: |
| — | Static token (32 characters minimum), for Claude Code |
| — | Password hash ( |
|
| Vault folder where Claude writes |
|
|
|
| — | Comma-separated globs Claude never reads: |
|
| IPs or CIDR ranges that may call |
|
| Listen address; anything but loopback needs |
|
| Allow listening on a non-loopback address (private container network) |
|
| Listen port |
|
| IPs of proxies whose |
|
| OAuth sessions; must be outside the vault |
| claude.ai's and claude.com's | OAuth redirect URIs a client may register (exact; |
|
| Size of a note chunk returned to Claude (longer notes are read in several calls) |
|
| Maximum size of a note written by Claude |
|
|
|
Commands:
Command | Effect |
| HTTP server (default) |
| Local server for Claude Code, no network |
| Check the configuration and count notes |
| Print a new random token |
| Ask for a password and print its hash |
| Read variables from a |
12. Development
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/ruff check .
.venv/bin/pytestCI runs the same on Python 3.11 to 3.13, plus shellcheck on the installer and a Docker build; dependabot keeps
dependencies, the Docker image and the actions up to date.
The tests create a temporary vault and start a real server: a full MCP session with the token, the full OAuth flow (client registration, login page, code exchange, refresh), and every safeguard above (IP filter, redirect allow-list, caps, lockout, audit log, listening address).
Layout:
src/obsidian_memory_mcp/
config.py configuration (environment variables)
vault.py reading the vault, writing the memory, history, index, log
auth.py static token and single-user OAuth server (login page)
server.py MCP tools, HTTP app, command line
plugin/obsidian-memory/ the skill, as a Claude plugin
deploy/ systemd, installer, Caddy, nginx, sample configuration
Dockerfile, compose.yaml Docker installMIT 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
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Notes and memory assistant: one Markdown vault that Claude, ChatGPT and any MCP client can share.
Your own memory inside ChatGPT and Claude, with the source of every note.
A second brain for Claude: remembers your work, plans your day, encrypted under a key only you hold.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to read, write, search, and manage Obsidian vault notes with Git-backed sync support for multi-device access and extensible AI workflows.3,379 npm-
- AlicenseAqualityDmaintenanceConnects Claude Desktop to an Obsidian vault, enabling reading, searching, capturing ideas, and managing notes through natural language.213 npmMIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables bidirectional interaction with Obsidian vaults, allowing reading, writing, and organizing notes through Claude.MIT
- AlicenseBqualityBmaintenanceTurns an Obsidian vault of plain Markdown notes into memory shared by every Claude client, so notes, people, meetings, and follow-ups carry across chats and devices. Provides tools to search, read, capture, write, and link notes, and to track people, organizations, connections, and interactions.17MIT