Never lose context. Never repeat yourself.
Your AI pair programmer, now with perfect memory.
The Problem
MemCTX transforms Claude Code into a context-aware development companion by automatically capturing, analyzing, and intelligently injecting your development history.
Features
Automatically captures every Claude Code session with full context and tool-use preservation.
Claude analyzes each session and generates structured summaries with key insights and decisions.
Modern, responsive UI to browse, search, and analyze your complete development history.
Lightning-fast search across all sessions, conversations, and code snippets instantly.
Real-time view of active sessions with WebSocket updates and live metrics.
Automatically injects relevant history into new sessions via CLAUDE.md for perfect continuity.
Organize sessions with custom tags and bookmark the moments that matter most.
Add custom notes and annotations to any session for future reference and team sharing.
Beautiful adaptive themes that match your environment and preference perfectly.
Quick Start
Two commands. Zero configuration. You're done.
# Install globally (choose one) npm install -g memctx pnpm add -g memctx yarn global add memctx
# Start the background worker memctx start # Open the dashboard (optional) memctx open
# Required for AI summaries export ANTHROPIC_API_KEY="sk-ant-..." # Optional: Use a proxy provider export ANTHROPIC_BASE_URL="https://your-proxy.com/v1" # Optional: Custom port (default: 9999) export MEMCTX_PORT=8080 # Optional: Custom database path export MEMCTX_DB_PATH="/path/to/db.sqlite"
CLI Reference
| Command | Description |
|---|---|
memctx install | Install hooks and start the daemon process |
memctx start | Start the background worker daemon |
memctx stop | Stop the worker daemon gracefully |
memctx restart | Restart the worker daemon |
memctx status | Show daemon status and health check |
memctx open | Open the dashboard in your default browser |
memctx search <query> | Search sessions from the terminal |
memctx export | Export all sessions as markdown files |
memctx config | Show current configuration |
memctx uninstall | Remove all hooks and stop daemon |
Architecture
A lightweight daemon hooks into Claude Code's lifecycle and handles everything automatically.
Claude Code session begins → session-start hook fires automatically
MemCTX worker creates a session record in the local SQLite database
Every tool use is captured in real-time via the post-tool-use hook
Session ends → stop hook fires and finalizes the record
Worker sends the full transcript to Claude for intelligent AI analysis
Structured summary is stored in the database alongside the raw transcript
Next session auto-loads relevant context from CLAUDE.md — zero manual effort
View everything in the beautiful real-time dashboard at localhost:9999
Requirements
build-essential, python3# Ubuntu / Debian sudo apt install build-essential python3 # macOS xcode-select --install # Windows — download from: # https://visualstudio.microsoft.com/downloads/
Troubleshooting
# Check if port is already in use lsof -i :9999 # Check logs for errors tail -f /tmp/memctx.log # Restart the service memctx restart
# Verify hooks are registered in settings cat ~/.claude/settings.json | grep memctx # Reinstall hooks from scratch memctx uninstall memctx install
# Rebuild native modules npm rebuild better-sqlite3 # Or do a clean reinstall npm uninstall -g memctx npm install -g memctx
# Check API key is set echo $ANTHROPIC_API_KEY # Set API key in shell export ANTHROPIC_API_KEY="sk-ant-..." # Or configure via the dashboard memctx open # → navigate to Settings
Roadmap
Contributing
We love contributions of all kinds — bug reports, feature ideas, or pull requests.
Have a great idea? We want to hear it — vote or suggest new features.
Suggest Feature# Clone repository git clone https://github.com/bbhunterpk-ux/memctx.git cd memctx # Install dependencies pnpm install # Build the project pnpm run build # Link locally for testing npm link # Verify it works memctx install && memctx start
Community
Connect with thousands of developers who are building smarter with MemCTX.
Support
License
Copyright (c) 2026 Fahad Aziz Qureshi 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.