Agent Drive
OfficialThis 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.
Agent Drive
Persistent memory for Claude Code and Codex that follows you to every device.
Agent Drive captures what your coding agents do, summarizes every session, and stores the result in a cloud folder you already sync: Google Drive, OneDrive, Dropbox, iCloud Drive or Syncthing. Start a session on your laptop and it already knows what you decided on your desktop yesterday, whether you used Claude or Codex.
It's like claude-mem, but with these differences:
Cross-device by default. Memory lives in your synced folder, not in a local database.
Cross-agent. Claude Code and Codex share one memory. Any other MCP agent (Gemini CLI, Cursor, Windsurf, Claude Desktop, your own) can join.
No server, database or account. It's plain JSONL files, needs Node 18+ and has zero npm dependencies.
Persistent. Every write is fsynced. It works offline and syncs later. A local mirror keeps memory readable when the drive is unmounted, and nothing is ever deleted.
Quick start (Claude Code + Codex)
Put the repo in your synced folder.
# Google Drive on Windows (adjust for your drive letter or sync app) cd "G:\My Drive" git clone https://github.com/CreativLogic/Agent-Drive.gitOn macOS the Google Drive folder is usually
~/Library/CloudStorage/GoogleDrive-<you>/My Drive.Install on this device.
node Agent-Drive/install.mjsThis registers the MCP server and the capture hooks for Claude Code and Codex, plus any other supported agent it finds.
Restart Claude Code and Codex. That's it.
Each additional device: wait for the folder to sync, then run step 2 there.
Check the setup any time:
node Agent-Drive/server/memory.mjs doctorKeep the code in Git, the memory in the cloud
To keep the clone outside your synced folder, point the memory to it:
node install.mjs --data "G:\My Drive\Agent-Drive-memory"Related MCP server: memory-ferry
What happens automatically
When | Claude Code | Codex | What Agent Drive does |
Session starts |
|
| Injects a brief: recent sessions for this project, project memories, global preferences, decisions and lessons |
You send a prompt |
|
| Records it, with secrets redacted |
A tool runs |
|
| Records a one-line observation (file edited, command run, failed or not) |
A turn ends |
|
| Every few minutes of activity, summarizes the session in the background |
Session ends or compacts |
| – | Final summary |
The summary is written by your own agent CLI running headless (Claude Haiku via claude -p, or codex exec), so no extra API key is needed. It records what was asked, investigated, learned and completed, plus the next steps. It also pulls out up to 3 durable memories (decisions, preferences, lessons). If no CLI is available, it falls back to a simple rule-based summary that uses no model.
Sessions that end before they get summarized are picked up the next time you start a session on that device.
Tools your agents get (MCP)
Tool | Use |
| Keyword search across everything; returns a compact index |
| Full text for ids from the index |
| Recent session summaries |
| Replay the prompts and tool calls of one session |
| Save a decision, preference, lesson or fact |
| Correct a memory instead of duplicating it |
| Hide a wrong memory (restore anytime) |
| The session-start brief, on demand |
| Counts and sync status |
Search uses progressive disclosure, like claude-mem: an index first, full text on request, so it costs few tokens.
Web viewer
node server/memory.mjs viewerThis opens a local, read-only viewer at http://127.0.0.1:37778, or the next free port if that one is taken. You can search, filter by type and project, and expand any session into its timeline.
Other agents
install.mjs also detects and configures these agents:
Agent | What gets installed |
Gemini CLI | MCP server + |
Cursor | MCP server |
Windsurf | MCP server |
Claude Desktop | MCP server |
Choose explicitly with --agents claude,codex,gemini. For any other MCP client:
node install.mjs --print-configPaste the printed block into that client's MCP settings and set AGENT_MEMORY_CLIENT to a short name. If the agent supports lifecycle hooks, point them at server/memory.mjs hook <Event> --client <name> (hook JSON on stdin) to get automatic capture too.
How storage works
Agent-Drive/data/
desktop__claude.jsonl memories written by Claude on "desktop"
laptop__codex.jsonl memories written by Codex on "laptop"
sessions/2026-11/desktop__claude.jsonl captured observations, one file per month
~/.agent-drive/ per device, never synced
mirror/ last known copy of everything (offline reads)
outbox/ writes made while the folder was unavailable
state.json session bookkeeping
config.json optional { "dataDir": "..." }No sync conflicts. Each device and agent appends only to its own files, and every device reads all of them.
Durable writes. Every append is fsynced, and a half-synced last line is ignored on read and repaired on the next write.
Offline safe. If the folder is missing (drive not mounted, laptop offline), writes go to
outbox/and flush automatically on the next write once the folder is back. Reads come frommirror/.Nothing is deleted. Updates and archives are new events, so the full history is always there.
Backups.
node server/memory.mjs exportwrites everything to one JSONL file.
Privacy and safety
Memory stays in your files and your cloud account. Agent Drive has no server and no telemetry.
Text that looks like an API key, token or private key is refused by
memory_save. In captured prompts and tool calls it's redacted, along withpassword=…style values.The viewer binds to
127.0.0.1only and is read-only.The summarizer runs your agent CLI with tools disabled, and its own run is excluded from capture.
Configuration
Variable | Default | Meaning |
|
| Synced memory folder |
|
| Local mirror, outbox and state |
| hostname | Device name in file names |
| set by the installer | Agent name in file names |
|
|
|
|
| Model for |
| Codex default | Model for |
|
| New observations needed before a mid-session summary |
|
| Minimum minutes between mid-session summaries |
| – |
|
Command line
node server/memory.mjs context --project my-app # the session brief
node server/memory.mjs search "auth flow"
node server/memory.mjs add "We use pnpm, not npm" --type preference
node server/memory.mjs sessions
node server/memory.mjs timeline <session-id>
node server/memory.mjs export backup.jsonl
node server/memory.mjs flush # push queued offline writes now
node server/memory.mjs doctorUninstall
node install.mjs --uninstallThis removes Agent Drive from every agent config and leaves your memory files alone. Every config file the installer touched has a .bak-<date>-agent-drive copy.
Development
node --testThe tests cover the MCP protocol, capture and redaction, summaries, offline queueing, mirror reads, multi-device sync and torn-line recovery. Pull requests are welcome.
License
MIT
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
Shared memory for coding agents. Stop re-explaining your codebase every session.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Hosted MCP memory for coding agents: persistent across sessions, editable markdown, team sharing.
One memory for you and your AI agents, shared by ChatGPT, Claude, Gemini, Grok, Codex and Cursor.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenancePersistent shared memory for AI coding agents that turns a folder of markdown files into searchable memory across sessions, repos, and machines.18 npmFunctional Source , Version 1.1, MIT Future
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to maintain and sync long-term memory and reusable skills across devices using local folder sync, with support for multiple agents and optional semantic recall.21 npm1MIT
- AlicenseAqualityCmaintenanceGives AI coding agents persistent, searchable typed memory stored as plain markdown files, allowing them to record decisions, contracts, tasks, evaluations, and session logs and update entries by id.5MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to save, recall, read, list, and forget plain Markdown memories shared across tools and sessions, so facts are retrieved on demand instead of being repeated.39 npmMIT