A lightweight wrapper system that provides isolated, persistent memory for Claude Code sessions based on your current working directory. Each project gets its own dedicated memory space that persists across sessions.
- 🧠 Per-Directory Memory: Automatic isolation of memories by project directory
- 💾 Persistent Storage: Memories survive between Claude Code sessions
- 🔒 Automatic Lock Management: Cleans up stale locks from crashed sessions
- 🌍 Global Configuration: Single MCP setup works across all projects
- 🚀 Zero Configuration: Just
cdto your project and start Claude Code - 🔍 Visual Explorer: Included
claude-peektool to inspect stored memories
The system intercepts the standard mcp-server-qdrant calls and automatically:
- Creates a unique Qdrant database for each directory you work in
- Maps your current working directory to an isolated memory store
- Manages database locks to prevent corruption
- Provides seamless memory persistence across sessions
When you start Claude Code in /home/user/project-a, it uses a completely different memory store than when you're in /home/user/project-b.
- Claude Code CLI (
claude) uvx(Install with:curl -LsSf https://astral.sh/uv/install.sh | sh)lsof(Optional but recommended for automatic lock cleanup)
git clone https://github.com/yourusername/qdrant-memory.git
cd qdrant-memory
./install.shThe installer will:
- Copy the wrapper script to
~/.local/bin/ - Configure Claude Code MCP with user-global scope
- Create storage directories at
~/.qdrant/sessions/ - Set up the
qdrant-memorycommand alias
Once installed, simply start Claude Code in any directory:
cd /path/to/your/project
claudeClaude will automatically have access to:
qdrant-store- Store information in memoryqdrant-find- Search and retrieve from memoryqdrant-delete- Remove specific memories
Each directory maintains its own isolated memory. Switch directories, and you switch memory contexts!
Inspect what's stored in your current directory's memory:
claude-peekThis shows all stored memories with their metadata and content.
qdrant-memory/
├── bin/
│ ├── mcp-server-qdrant-session # Main wrapper script
│ └── claude-peek # Visual memory explorer
├── install.sh # Installation script
├── uninstall.sh # Uninstallation script
└── README.md # This file
Memories are stored in: ~/.qdrant/sessions/{directory-name}/
For example:
- Working in
/home/user/Documents/project→~/.qdrant/sessions/Documents-project/ - Working in
/home/user/work/client-a→~/.qdrant/sessions/work-client-a/
To remove the MCP configuration and wrapper (preserves memories):
./uninstall.shTo completely remove everything including all stored memories:
./uninstall.sh --purgeIf Claude Code can't connect to the MCP server:
- Check MCP status:
claude mcp list - Verify configuration:
claude mcp get qdrant - Restart Claude Code
If you see lock file errors, the wrapper automatically cleans stale locks. If problems persist:
rm ~/.qdrant/sessions/*/.lockEnsure you're in the same directory where memories were created. The system uses the full path to determine which memory store to use.
- Vector Database: Qdrant (local mode)
- Embedding Model: sentence-transformers/all-MiniLM-L6-v2
- Storage Format: Qdrant native format
- Lock Management: Uses
lsofto detect stale locks
MIT License
Copyright (c) 2024 Jack Darcy
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contributions are welcome! Please feel free to submit a Pull Request.
Created by Jack Darcy as a personal side project to enhance Claude Code with persistent, per-project memory capabilities using Qdrant vector database.