Open Source · MIT License

Your AI agents
finally remember.

Persistent, encrypted memory for every AI coding agent you use. One command to install. Works with Claude Code, Cursor, Windsurf, and any MCP tool.

View on GitHub
AES-256-GCM encryptedSQLite + FTS54 MCP toolsMIT licensedZero cloud dependencies

The Problem

AI agents have amnesia

🧠

Your agent forgets everything

Every new session starts from zero. That auth pattern you explained 3 times? Gone. The migration strategy you spent 20 minutes on? Gone.

🔒

Memories are siloed

Claude Code memories don't work in Cursor. Switch tools and you lose everything you've built up.

👁️

No encryption

Your code context, architecture notes, and project details sit in plaintext on vendor servers.

Memex gives your AI agents a shared, encrypted brain.

How It Works

Three steps to persistent memory

01

Install in 10 seconds

One command registers the MCP server with your AI tool.

$ npx memex-mcp init

✔ Generated encryption key
✔ Created database
✔ Registered with Claude Code

Ready. Your agent now has memory.
02

Your agent saves context automatically

When your agent learns something important, it stores it as an encrypted memory.

// Agent calls save_memory tool
{
  "tool": "save_memory",
  "arguments": {
    "content": "Auth uses Clerk with JWT. Protected routes
      go through middleware.ts. API routes
      verify via getAuth().",
    "tags": ["auth", "architecture"]
  }
}
03

Context persists everywhere

Next session, different tool — memories are always there.

// Agent calls recall_memories tool
{
  "tool": "recall_memories",
  "arguments": {
    "query": "how does auth work in this project?"
  }
}

// Returns the saved memory — encrypted at rest,
// decrypted only on your machine.

Security

We can't read your data.
No one can.

Every memory is encrypted with AES-256-GCM before it touches disk. Your encryption key is derived locally and never transmitted. Even when cloud sync ships, only encrypted blobs leave your machine.

AES-256-GCM

Military-grade authenticated encryption with unique IVs per memory

Local-first

Your encryption key never leaves your machine. Data stays on disk.

Zero-knowledge

No server, no cloud, no third party can access your data.

Open source

MIT licensed. Read every line of the encryption code yourself.

Your Agent

"Auth uses Clerk with JWT..."

AES-256-GCM Encryption

key = PBKDF2(passphrase) | random

iv = crypto.randomBytes(12)

Stored on Disk

a4f8c2...e91b (encrypted blob)

+ iv + authTag

Plaintext never leaves your machine

Features

Lightweight by design

Cross-agent compatible

Works with Claude Code, Cursor, and any MCP-compatible AI coding tool.

Project-scoped

Memories are automatically organized by project. No cross-contamination.

Full-text search

SQLite FTS5 powers instant, ranked search across all your memories.

E2E encrypted

AES-256-GCM encryption. Your key never leaves your machine.

Local-first

SQLite database on your machine. No servers, no accounts, no dependencies.

Open source

MIT licensed. Audit every line. Contribute. Fork. It's yours.

Comparison

How Memex compares

MemexMem0PiecesCopilot Memory
E2E Encrypted
Cross-agent (MCP)GitHub only
Local-firstSelf-host
One-command install
Open sourcePartial
FreeFreemiumFreemiumPaid

Get Started

Up and running in 10 seconds

1

Run the init command

$ npx memex-mcp init

This generates your encryption key, creates the local database, and registers Memex with Claude Code.

2

MCP configuration (added automatically)

{
  "mcpServers": {
    "memex": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "memex-mcp", "serve"]
    }
  }
}

Added to ~/.claude.json automatically. No manual config needed.

Works with Cursor too. Add the same MCP config to your Cursor settings. Any MCP-compatible tool can connect to Memex.

Cloud sync is coming

E2E encrypted cloud sync. Your memories travel across machines — only encrypted blobs leave your device. Be first to get access.

No spam. One email when it's ready.