Skip to content

beingPro007/memDx

Repository files navigation

MemDx Memory Layer for Cursor

A powerful VS Code/Cursor extension that integrates a local, private memory layer (formerly Mem0) to provide persistent AI context for your projects. MemDx helps your AI remember important decisions, code patterns, and project structure across sessions.

Features

  • 🧠 Persistent Context: Store and recall project decisions, rules, and architecture.
  • 🔒 100% Local & Private: Runs on your machine using Docker (Qdrant + Ollama). No data leaves your device.
  • 🔍 Semantic Search: Find relevant memories using natural language.
  • 🚀 Cursor Agent Integration: seamlessly works with Cursor's Agent (Composer) via MCP.
  • Zero Config Setup: Built-in Setup Wizard handles everything.
  • 📝 Smart Indexing: One-click to index your README.md, .cursorrules, and project structure.

Quick Start

1. Prerequisites

  • Docker Desktop installed and running.
  • Node.js (v18+) (for the MCP server).

2. Installation

  1. Install this extension from the Marketplace or VSIX.
  2. When prompted, click "Setup Now" or run command MemDx: Quick Setup Wizard.
  3. Enter a User ID (e.g., your name) and Product ID (your project name).

3. Usage

  • Add Memory: Select code/text -> Right click -> MemDx: Add Memory from Selection.
  • Search: Ctrl+Shift+P -> MemDx: Search Memories -> Type query (e.g., "authentication logic").
  • View All: Ctrl+Shift+P -> MemDx: View All Memories.

Setup Cursor AI (MCP) Integation

To let Cursor's Agent (Composer) read/write memories automatically:

  1. Press Ctrl+Shift+P and run MemDx: Copy MCP Config for Cursor.
  2. Open Cursor Settings (gear icon) -> Features -> MCP.
  3. Paste the config into the MCP settings editor.
  4. Click Add.

Now you can type @MemDx Memory Layer in chat, or just ask the Agent:

"Save this architectural decision to memory" "What did we decide about error handling? Search memory."

Commands

Command Description
MemDx: Quick Setup Wizard Run first-time setup (User/Product IDs, start Docker)
MemDx: Start Service Spin up the local memory backend (Docker)
MemDx: Add Memory Save selected text to memory
MemDx: Search Memories Semantic search through your saved context
MemDx: Index Project Automatically saves README, rules, and structure to memory
MemDx: Copy MCP Config Generates the JSON needed for Cursor integration
MemDx: View Logs See what the backend is doing
MemDx: Reset Service Fix DB issues by wiping local data (use if you see dimension errors)

Configuration

You can customize these in VS Code Settings:

  • memdx.userId: Your unique identifier.
  • memdx.productId: Project identifier (allows separating memories by project).
  • memdx.autoStart: Automatically start backend on launch (default: false).

Troubleshooting

"Memories map is not a function" / Vector Dimension Error

If you switched models or versions, your database might have a dimension mismatch. Fix: Run command MemDx: Reset Service (Fix DB). This wipes the local Qdrant data and restarts cleanly.

"Model not found"

The first time you run MemDx, it downloads AI models (qwen2.5, nomic-embed-text) inside Docker. This takes a few minutes. Check status with MemDx: Check Service Status.

Service won't start

Ensure Docker Desktop is running. You can view detailed logs with MemDx: View Service Logs.


MemDx - Your AI's Long-Term Memory. Originally based on Mem0, optimized for local developer workflows.

About

Long Term Memory layer for your IDE, with full Local integration using MCP

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors