One memory. Every agent.
The open-source memory layer for AI tools. Give your AI agents persistent, cross-tool knowledge.
Website · Docs · API Reference · Discord
# Sign up at drivemem.cloud, then:
npx drivemem setupThat's it. Cursor, Claude Desktop, and Windsurf are now connected to your knowledge base.
DriveMem is a persistent knowledge layer that connects all your AI tools. Upload files, have conversations, and every AI agent you use — Cursor, Claude, Windsurf, or any MCP client — automatically gets the context it needs.
Think of it as iCloud for your AI agents. One knowledge base, seamless continuity across every tool.
| Feature | DriveMem | Mem0 | Claude Projects |
|---|---|---|---|
| Open source | ✅ AGPL-3.0 | ✅ Apache-2.0 | ❌ |
| Self-hostable | ✅ | ✅ | ❌ |
| MCP native | ✅ One URL, any client | ❌ SDK only | ❌ |
| Cross-tool memory | ✅ Any MCP client | ✅ API only | ❌ Single tool |
| File sync (Drive/Notion) | ✅ | ❌ | ❌ |
| LLM API Proxy | ✅ Auto-inject context | ❌ | ❌ |
| Claude Code Hooks | ✅ Auto-capture sessions | ❌ | ❌ |
| Self-learning search | ✅ Feedback + citations | ❌ | ❌ |
npx drivemem setupOne command configures Cursor, Claude Desktop, and Windsurf. Get your API key at drivemem.cloud/settings.
git clone https://github.com/DriveMem/drivemem.git
cd drivemem
cp apps/api/.env.example apps/api/.env
# Edit .env with your database and LLM API credentials
pnpm install
pnpm run devRequirements: Node.js 18+, PostgreSQL 15+, an embedding API key (OpenAI, DashScope, or compatible).
Your AI Tools (Cursor, Claude, Windsurf, any MCP client)
↕ MCP Protocol / API Proxy
┌─────────────────────────┐
│ DriveMem │
│ ┌─────────────────┐ │
│ │ Knowledge Base │ │
│ │ Files + Chunks │ │
│ │ Vector Embeddings│ │
│ └─────────────────┘ │
│ ┌─────────────────┐ │
│ │ Context Compiler │ │
│ │ 9-step pipeline │ │
│ │ Model-aware │ │
│ └─────────────────┘ │
│ ┌─────────────────┐ │
│ │ Data Flywheel │ │
│ │ Search feedback │ │
│ │ Citation tracking│ │
│ │ Usage patterns │ │
│ └─────────────────┘ │
└─────────────────────────┘
- 📁 Knowledge Base — Upload files (PDF, Word, Markdown, TXT). Auto-parsed, chunked, and embedded.
- 🔍 Semantic Search — Find anything in your knowledge base with natural language.
- 🤖 MCP Server — Connect any MCP-compatible AI tool with one URL.
- 🔌 LLM API Proxy — Auto-inject context into any OpenAI/Anthropic API call.
- 🪝 Claude Code Hooks — Auto-capture session knowledge after every coding session.
- 📊 Self-Learning — Search gets better with usage. Feedback, citations, and usage patterns improve ranking.
- 🔄 Connectors — Sync from Google Drive, with more coming.
- 💻 Desktop App — Available for macOS, Windows, and Linux.
| Tool | Method | Setup |
|---|---|---|
| Cursor | MCP (native) | npx drivemem setup |
| Claude Desktop | MCP (stdio bridge) | npx drivemem setup |
| Windsurf | MCP (native) | npx drivemem setup |
| Claude Code | Hooks (auto-capture) | npx drivemem setup claude-code |
| Any LLM API | Proxy | npx drivemem proxy --api-key=... |
| REST API | HTTP | API docs |
- Frontend: Next.js 15, React 19, Tailwind CSS
- Backend: Fastify, TypeScript, Drizzle ORM
- Database: PostgreSQL + pgvector
- Embedding: text-embedding-v3 (DashScope/OpenAI compatible)
- MCP: @modelcontextprotocol/sdk (SSE + Streamable HTTP)
- Desktop: Electron
drivemem/
├── apps/
│ ├── api/ # Backend API (Fastify)
│ └── web/ # Frontend (Next.js)
├── packages/
│ ├── sdk/ # CLI + MCP bridge + Proxy (MIT licensed)
│ ├── shared/ # Shared types and utilities
│ └── desktop/ # Electron desktop app
└── docs/ # Deployment guides
The DriveMem SDK (packages/sdk/) is licensed under MIT for maximum compatibility. Use it freely in any project:
npm install drivemem// Setup MCP for all AI tools
npx drivemem setup --api-key=ak_xxx
// Start LLM API Proxy
npx drivemem proxy --api-key=ak_xxx
// Configure Claude Code hooks
npx drivemem setup claude-codeWe welcome contributions! See CONTRIBUTING.md for guidelines.
# Clone and setup
git clone https://github.com/DriveMem/drivemem.git
cd drivemem
pnpm install
# Start development
pnpm run dev # Starts API + Web in dev mode| DriveMem Cloud | Self-Host | |
|---|---|---|
| Setup | 1 command | Deploy yourself |
| Data flywheel | ✅ Cross-user learning | ❌ Single-user only |
| Model profiles | ✅ Auto-optimized | ❌ Static defaults |
| Updates | Automatic | Manual |
| Price | Free tier available | Free forever |