lil memory
Stores memories as plain Markdown files in a folder that can be opened in Obsidian, allowing users to view and edit the same memories that the AI client reads and writes.
Supports ChatGPT as a remote client through HTTP mode and a custom connector, letting it read, change, and forget memories in the local vault.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lil memoryRemember that I prefer British spelling."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lil memory
Your AI memory as a folder of Markdown files. Works with any model. No account, no cloud, no company in the middle.
lil memory is a small local MCP server. Every AI client you connect (Claude Desktop, Claude Code, and others) reads and writes the same memories. The memories are plain files in a folder you own, so you can read and edit them in Obsidian or any text editor.
Quickstart
uvx lil-memory init # 1. create the vault at ~/lil-memory
uvx lil-memory install claude-desktop # 2. connect a client (or: claude-code)Restart the client and talk to it:
"Remember that I prefer British spelling."
"Load my context for acme-site."
Open ~/lil-memory in Obsidian to see and edit your memories.
lil-memory doctor checks your setup. lil-memory reindex rebuilds the search index from the files. Use --vault PATH or $LIL_MEMORY_VAULT to keep the vault somewhere else.
Related MCP server: AIBrain
The format at a glance
One memory is one Markdown file. Its folder is its scope.
~/lil-memory/
├── global/prefers-british-spelling.md
├── projects/acme-site/deploys-to-cloudflare.md
└── .lil-memory/ # search index and trash; safe to delete the index---
id: 01J9XK3M7Q2R8S5T6V7W8X9Y0Z
type: preference
status: active
tags:
- writing
source: claude-desktop 1.0
created: 2026-10-05T09:12:00Z
updated: 2026-10-05T09:12:00Z
---
Prefers British spelling and short paragraphs in client-facing copy.Updating a memory never overwrites it. The old file is marked
supersededand links to the new one.Forgetting a memory moves it to
.lil-memory/trash/.The full format is in docs/SPEC.md. Other tools can implement it without reading this code.
The connected AI exposes six tools: remember, recall, get, update, forget and list_scopes. It also has a memory://profile resource and a load_context prompt.
Security
Local by default. Claude Desktop and Claude Code start lil memory as a local process and talk to it over stdio. Nothing listens on the network.
Memories are untrusted input. Memories written by one AI are read by another, so stored text could try to give instructions. lil memory returns memories inside clearly marked
<memory>blocks, labeled as data and not instructions. It never acts on their content itself.Remote clients such as ChatGPT can only reach a server through an HTTPS URL, and ChatGPT can't send a static token. So HTTP mode keeps things minimal: the URL itself is the secret. Use it with caution, because anyone who has the URL gets full access to your memories (see the trade-off below).
lil-memory serve --http # prints http://127.0.0.1:8765/mcp/<secret> cloudflared tunnel --url http://127.0.0.1:8765 # or any other tunnelIn ChatGPT, turn on developer mode in the settings, then add
https://<tunnel-host>/mcp/<secret>as a custom connector with no authentication.The trade-off: anyone who has that URL can read, change and forget all of your memories. A URL leaks more easily than a password, for example through screenshots, shell history or the tunnel provider. OpenAI also stores it in your connector settings, and sees every memory ChatGPT reads. HTTP mode only runs while you keep
serve --httpopen.lil-memory serve --http --rotatereplaces the secret, and the old URL stops working immediately. It is good practice to rotate the URL once in a while, and right away if you think it has leaked.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Portable AI memory shared across models and harnesses - plain markdown you own.
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to have persistent memory by storing facts and transcripts as markdown files in an Obsidian vault, allowing manual editing and immediate effect without sync.8MIT
- AlicenseNot gradedqualityAmaintenanceA personal, offline-first memory for AI assistants that enables them to read, search, and write to a shared folder of Markdown files, so they all remember you without needing a cloud.MIT
- AlicenseNot gradedqualityBmaintenanceProvides portable memory for AI agents using plain Markdown files. Enables storing, recalling, and managing memories via MCP tools like recall, remember, forget, list, and get.9 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to capture, structure, remember, and retrieve source-backed memory as local Markdown files, with reviewable writes and no cloud dependency.190MIT