Anamnesis
Used in the Docker deployment to provide HTTPS for the self-hosted Anamnesis node.
Supports deploying an always-on Anamnesis node on any Docker-capable server (VPS, NAS, home server) via the provided docker-compose setup, for syncing memory and serving web/mobile connectors.
Can be used as the shared folder for end-to-end encrypted computer-to-computer memory sync via anam share and anam join.
Deploys an always-on Anamnesis node on Fly.io with anam node deploy fly, creating the app and volume used to sync memory and serve claude.ai/ChatGPT connectors.
Imports Gemini web history via Google Takeout (JSON) and reads Gemini CLI local session files into the shared memory for recall across tools.
Default shared folder location ([iCloud](/mcp/servers/integrations/icloud) Drive/Anamnesis) for end-to-end encrypted memory sync between computers.
Imports ChatGPT conversation history via data export and reads Codex CLI local session files, adding them to the unified memory so agents can recall decisions made in ChatGPT/Codex.
Local SQLite storage backend for the unified memory.
Can serve as the synced folder for end-to-end encrypted memory sync between computers.
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.
Your AI tools don't keep your history for long. Claude Code deletes sessions after 30 days, and web chats stay locked inside their apps. Anamnesis keeps a permanent, word-for-word archive of your conversations from Claude Code, Codex, Gemini CLI, Cursor, ChatGPT, claude.ai and Gemini on your computer, and gives it back to every AI tool over MCP. Ask Claude Code "what did we decide about auth?" and it finds the answer, even if you worked it out in ChatGPT months ago.
Keeps: every conversation, permanently, even after the tool itself has deleted it.
Collects: reads the history your AI tools already keep, in the background.
Recalls: keyword and semantic search, run locally, for every connected agent. A search takes about a tenth of a second.
Remembers: agents save decisions with
remember, visible to all your tools.Stays yours: everything in local SQLite, with a small local embedding model. No account, no API keys, no telemetry.
It is only the memory: it never calls a model, and you keep using the tools you already use.
Why "Anamnesis"?
Anamnesis (Greek ἀνάμνησις) means "recollection". In Plato it's the idea that learning is remembering what you already knew; in medicine it's a patient's history, taken so nobody starts from scratch. Both fit: your AI tools recall what you already worked out, with your whole history in front of them.
Related MCP server: agents-memory
Install
On macOS or Linux:
curl -LsSf https://devhaitham481.github.io/anamnesis/install.sh | shThe script installs uv if needed, then Anamnesis in its own environment, with its own Python (nothing to preinstall; your system Python is never touched). Then it runs anam setup, which:
finds the AI tools on your computer,
archives their history (the first run downloads a 70 MB search model),
offers to stop Claude Code deleting old sessions,
asks, then connects them (each config is backed up first),
shows what's archived and how to add your web chats.
Then restart your AI tools. That's it.
uv tool install anamnesis-cli # or: pipx install anamnesis-cli
anam setupNeeds macOS or Linux (on Windows, use WSL) and Python 3.11+ (uv fetches it if needed).
Update: run the install command again. Setup re-runs safely and repairs tool connections left by an older version.
Uninstall:
anam disconnect all # remove Anamnesis from your AI tools' configs
uv tool uninstall anamnesis-cli
rm -rf ~/.anamnesis # your memory; skip this to keep itanam: command not found: open a new terminal. The installer added~/.local/binto your PATH, which only applies to new terminals.A tool doesn't seem to use the memory: restart it. If
anam statusshows it as outdated, runanam setup.The first import takes a while: the semantic index is built once. Keyword search works right away.
No internet on first run: semantic search stays off until the model can be downloaded; keyword search works.
Using it
Just keep working. While any connected tool is running, new conversations are archived in the background, and agents search the memory when earlier work comes up.
anam # browse and search everything in the terminal
anam search "auth decision" # search from the shell (or just: anam auth decision)
anam import chatgpt.zip # add a ChatGPT, claude.ai or Gemini data export
anam status # your archive: what's kept per tool, what's missing
anam keep # stop Claude Code deleting its sessions after 30 daysTool | How | Read from |
Claude Code, Codex CLI, Gemini CLI, Cursor | automatic | their local session files (read-only) |
ChatGPT |
| Settings → Data controls → Export data |
claude.ai / Claude Desktop |
| Settings → Privacy → Export data |
Gemini (web) |
| Google Takeout → My Activity → Gemini Apps, format JSON |
anam status shows the archive, what it has kept after a tool deleted it, how often your agents used it this week, and which web chats you haven't imported yet. Only what you and the assistant said is kept: tool calls and output, reasoning, and injected system context are skipped. Re-importing is safe.
Browse it yourself
anam opens the archive in the terminal: every conversation from every tool, and search across all of them. It's keyboard-first with vim keys: j/k to move, l to open, h to go back, Ctrl+D/Ctrl+U to scroll, and / to fuzzy-filter your conversations as you type (Enter searches every message).
In claude.ai, ChatGPT and on your phone
Web and mobile apps can't reach your laptop, and your laptop isn't always on. So you run a node: your own always-on copy of the memory, on a server you control. There is no Anamnesis cloud. It also keeps all your computers in sync.
1. Deploy it once. On Fly.io:
anam node deploy fly # creates the app, a 1 GB volume and your password, then links this computerOr on any server with Docker (VPS, NAS, home server). Point a domain at it first:
curl -O https://raw.githubusercontent.com/devHaitham481/anamnesis/main/docker-compose.yml
printf 'ANAMNESIS_DOMAIN=memory.example.com\nANAMNESIS_NODE_PASSWORD=%s\n' "$(openssl rand -base64 18)" > .env
docker compose up -d # HTTPS via Caddy; the password is in .env2. Link each computer: anam node link https://your-node. You choose what it uploads: everything, everything except some projects, or only saved notes (anam node scope changes it).
3. Add the connector: anam connect claude-web (or chatgpt-web) prints the steps. You paste https://your-node/mcp into the app and sign in with the node password, choosing search-only or search and save. Custom connectors need a paid claude.ai or ChatGPT plan; Gemini doesn't support them.
anam node status shows computers and connected apps, anam node activity every search and save an app made, anam node revoke claude cuts one off, and anam node wipe starts over.
Security: HTTPS, plus end-to-end encryption (AES-256-GCM) of synced data with a key only your computers and your node hold. The node must read your memory to search it, which is why it runs on your server. Apps get revocable OAuth tokens, never the password. Wrong passwords are rate-limited.
Cost: one small machine. Fly.io's default here is 1 shared CPU, 1 GB of memory and a 1 GB volume; it stops when idle and wakes on the next request. A server you already have costs nothing extra.
Updates: both paths use the prebuilt image
ghcr.io/devhaitham481/anamnesis(x86 and ARM). Rundocker compose pull && docker compose up -d, or re-runanam node deploy fly --app <name>.
anam share # on your first computer: prints a pairing code
anam join XXXX-XXXX-… # on each other computerThe default folder is iCloud Drive/Anamnesis; pass a path for Dropbox, Syncthing or anything else. Everything in it is end-to-end encrypted and the key lives only in the pairing code. anam devices lists computers; anam unshare stops syncing this one.
Reference
anam setup guided setup; safe to re-run (after upgrades too)
anam terminal memory browser
anam sync [--watch] import new local history now (or keep watching)
anam import FILE... import ChatGPT / claude.ai / Gemini Takeout exports
anam search QUERY search everything from the shell [--source chatgpt] (or just: anam QUERY)
anam connect [TOOL|all] claude-code, claude-desktop, cursor, gemini-cli, codex
anam disconnect TOOL|all
anam status your archive per tool, what's missing, sync state, connected tools
anam keep stop Claude Code deleting its sessions after 30 days
anam share | join | devices | unshare sync computers through a folder
anam node deploy fly create your node on Fly.io (or use docker-compose.yml)
anam node link URL sync this computer through your node
anam node status|activity|revoke|scope|wipe
anam connect claude-web use your memory in claude.ai (also chatgpt-web)
anam mcp the MCP server (connected tools start it for you)connect merges into each tool's existing config and writes a .bak copy first. For Claude Code it runs claude mcp add --scope user anamnesis …. MCP tools: search_memory, recent_conversations, get_conversation, remember.
Each conversation shows a dot in its tool's color; search results carry the tool's name as a label. Press / (or Ctrl+F) for the search box at the top: typing filters the list, Enter searches every message.
Key / command | Action |
text or | Search all memory, open a result |
| Recent conversations, e.g. |
| Import new history now |
| Move or scroll (list and conversation) |
| Open the highlighted conversation / back to the list |
| Search box: typing fuzzy-filters the list, Enter searches every message |
| Clear the search box, then back to the list |
| Focus the conversation list / the search box |
| Manage, help, quit |
anam-web, then open http://127.0.0.1:8000.
Endpoint | |
| Tools with conversation counts |
| Browse |
| Semantic + keyword search |
| Rename / delete a conversation |
| Live updates as new history is imported |
To reach it from other devices, set ANAMNESIS_HOST=0.0.0.0, ANAMNESIS_ALLOWED_HOSTS and ANAMNESIS_AUTH_TOKEN, then open http://<host>:8000/?token=<token> once.
Nothing is required. Settings come from the environment or a .env file (see .env.example). Data lives in ~/.anamnesis (ANAMNESIS_DATA_DIR), with logs in anamnesis.log and mcp.log there.
Development
git clone https://github.com/devHaitham481/anamnesis && cd anamnesis
uv venv -p 3.13 .venv && uv pip install -p .venv -e ".[dev]"
.venv/bin/pytest -q # all offline: importers, MCP, TUI, web, node, browser e2e
.venv/bin/ruff check . && .venv/bin/mypy srcUse your checkout as your everyday anam with uv tool install -e . then anam setup.
Code lives in src/anamnesis/: ingest/ (one parser per tool), memory_mcp/ (MCP server), core/ (storage, search, sync), node/ (self-hosted node), cli/ and web/ (interfaces), connect.py (tool registration). The website and install.sh are in site/.
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
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Shared AI memory. ChatGPT, Claude, Cursor and any MCP app read and write the same memory.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- AlicenseAqualityBmaintenanceLocal-first AI PKM memory server for coding conversations. Imports Claude Code, Cursor, Codex CLI, Trae, and GitHub Copilot chats into notes, semantic search, tag graphs, Markdown exports, and MCP memory tools.763Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA local markdown memory and cross-agent context engine for AI coding assistants. It provides an MCP server with tools to search, add, retrieve, and distill persistent memory across tools like Claude Code, Cursor, and Zed.5MIT
- FlicenseNot gradedqualityCmaintenanceLocal-first memory for AI coding agents. Indexes your Claude Code, Codex, Cursor, Cline and Gemini CLI history by repo/branch/worktree and hands a context capsule (decisions, touched files, next steps) to the next agent over MCP.-
- AlicenseNot gradedqualityAmaintenanceGives any MCP-compatible AI client a private, on-device memory mind it can query for the most useful context, save facts, decisions and preferences into, and give feedback on so relevance improves over time. Runs locally with no accounts or cloud, exposing recall, remember and feedback tools to agents such as Claude Code, Codex, Cursor or Goose.MIT