MCP-Memory-LanceDB-Pro
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-Memory-LanceDB-Pro What did I decide about logging last time?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🧠 MCP-Memory-LanceDB-Pro
Give your AI coding assistant a brain that actually remembers.
Full-featured long-term memory system for Claude Code via the Model Context Protocol (MCP).
The Problem
Every time you start a new Claude Code session, your AI assistant forgets everything — your preferences, past decisions, project context, lessons learned. You end up repeating yourself, wasting time, and losing momentum.
Related MCP server: Claude Persistent Memory
The Solution
MCP-Memory-LanceDB-Pro is a standalone MCP server that gives Claude Code persistent, intelligent long-term memory. It runs alongside Claude Code as an independent process, automatically capturing important information and recalling it when needed — across sessions, across projects, across time.
Before & After
Without memory — every session starts from zero:
You: "Use tabs for indentation, always add error handling."
(next session)
You: "I already told you — tabs, not spaces!"
(next session)
You: "...seriously, tabs. And error handling. Again."With MCP-Memory-LanceDB-Pro — your assistant learns and remembers:
You: "Use tabs for indentation, always add error handling."
(next session — assistant auto-recalls your preferences)
Assistant: (silently applies tabs + error handling)
You: "Why did we pick PostgreSQL over MongoDB last month?"
Assistant: "Based on our discussion on Feb 12, the main reasons were..."Features
Feature | Description |
Hybrid Retrieval | Vector similarity + BM25 full-text search with RRF fusion |
Cross-Encoder Reranking | Jina / SiliconFlow / Voyage / Pinecone rerankers |
Smart Extraction | LLM-powered 6-category classification: preferences, decisions, facts, entities, events, patterns |
Intelligent Forgetting | Weibull decay model — important memories stay, noise naturally fades |
Auto-Capture | Claude Code hooks automatically store important info after each response |
Auto-Recall | SessionStart hook automatically injects relevant context |
Multi-Scope Isolation | Agent-private, global shared, and project-scoped boundaries |
Noise Filtering | Embedding-based noise prototype bank + regex filters |
Reflection Pipeline | Extract invariant rules and derived knowledge |
Self-Improvement | Structured learning/error logging with skill extraction |
14 MCP Tools | Complete memory management API |
Quick Start
1. Clone & Install
git clone https://github.com/bcornish1797/MCP-Memory-LanceDB-Pro.git \
~/.claude/mcp-servers/memory
cd ~/.claude/mcp-servers/memory
npm install2. Configure Claude Code
Add to ~/.claude.json under projects.<your-project>.mcpServers:
{
"memory": {
"command": "node",
"args": ["~/.claude/mcp-servers/memory/server-full.mjs"],
"env": {
"JINA_API_KEY": "your-jina-api-key",
"LLM_API_KEY": "your-llm-api-key",
"LLM_BASE_URL": "https://api.openai.com/v1",
"LLM_MODEL": "gpt-4o-mini",
"RERANK_API_KEY": "your-reranker-key",
"RERANK_PROVIDER": "jina",
"RERANK_MODEL": "jina-reranker-v3",
"RERANK_ENDPOINT": "https://api.jina.ai/v1/rerank"
}
}
}3. Set Up Automation Hooks (Optional)
Add to ~/.claude/settings.json for fully automatic memory capture:
{
"hooks": {
"SessionStart": [{
"matcher": "",
"hooks": [{"type": "command", "command": "path/to/hooks/session-start.sh"}]
}],
"Stop": [{
"matcher": "",
"hooks": [{"type": "command", "command": "path/to/hooks/auto-capture.sh"}]
}],
"PostCompact": [{
"matcher": "",
"hooks": [{"type": "command", "command": "path/to/hooks/post-compact.sh"}]
}],
"SessionEnd": [{
"matcher": "",
"hooks": [{"type": "command", "command": "path/to/hooks/session-end.sh"}]
}]
}
}4. Restart Claude Code
The memory server loads automatically on next session.
MCP Tools
Core Memory
Tool | Description |
| Hybrid search with vector + BM25 + cross-encoder reranking |
| Store with auto-chunking, smart metadata, and auto-categorization |
| Delete by ID or search query |
| Update text, importance, or category (triggers re-embedding) |
| Usage statistics by scope and category |
| List recent memories with scope/category filters |
Intelligent Processing
Tool | Description |
| LLM-powered smart extraction from conversation text |
| Weibull intelligent forgetting — clean stale memories |
| Reflection pipeline — extract invariant rules and derived knowledge |
| Bulk delete by scope, category, or age |
| Legacy database migration |
Self-Improvement
Tool | Description |
| Log structured learnings or errors |
| Governance backlog summary |
| Transform learning entries into skill scaffolds |
Architecture
┌─────────────────────────────────────────────────────┐
│ MCP Server (server-full.mjs) │
│ stdio JSON-RPC <--> Claude Code │
└────────┬──────────┬──────────┬──────────┬────────────┘
| | | |
┌────v───┐ ┌────v───┐ ┌───v────┐ ┌──v──────────┐
| Store | |Embedder| |Retriever| | Scopes |
|LanceDB | | Jina | |Hybrid | | Isolation |
└────────┘ └────────┘ └────────┘ └─────────────┘
| | |
┌────v───┐ ┌────v────┐ ┌──v──────────┐
| Smart | | Decay | | Noise |
|Extract | | Engine | | Filter |
| (LLM) | |(Weibull)| |(Prototypes) |
└────────┘ └─────────┘ └─────────────┘
┌─────────────────────────────────────┐
| Claude Code Hooks |
| SessionStart | Stop | PostCompact |
| (auto-recall)|(auto-|(re-inject) |
| |capture) |
└─────────────────────────────────────┘Key Components
Module | Files | Purpose |
Storage |
| LanceDB vector storage with FTS/BM25 indexing |
Embedding |
| Jina/OpenAI-compatible embeddings with task-aware API |
Retrieval |
| Hybrid vector+BM25 with RRF fusion and 6-stage scoring pipeline |
Smart Extraction |
| LLM-powered 6-category memory classification |
Decay |
| Weibull stretched-exponential decay with tier-based lifecycle |
Scopes |
| Multi-scope access control and isolation |
Noise Filter |
| Regex + embedding-based noise rejection |
Reflection |
| Session reflection and knowledge distillation |
Self-Improvement |
| Structured learning/error governance |
Configuration
Environment Variables
Variable | Required | Default | Description |
| Yes | — | Jina AI API key for embeddings |
| No | — | LLM API key for smart extraction |
| No |
| LLM model for extraction |
| No |
| LLM API endpoint |
| No | — | Reranker API key |
| No |
|
|
| No |
| Reranker model name |
| No |
| Reranker API endpoint |
| No |
| LanceDB database path |
| No |
| Default memory scope |
Supported Providers
Embedding:
Provider | Model | Notes |
Jina AI |
| Recommended, task-aware |
OpenAI |
| Widely available |
Ollama |
| Free, local |
Reranking:
Provider | Model | Notes |
Jina AI |
| High quality |
SiliconFlow |
| Free tier available |
Voyage AI |
| Alternative |
LLM (for smart extraction):
Any OpenAI-compatible API — OpenAI, Anthropic, z.ai, MiniMax, Ollama, etc.
Memory Scopes
Scope | Purpose |
| Private to your primary agent |
| Private to a secondary agent |
| Shared across all agents |
| Project-specific context |
How Auto-Capture Works
The Stop hook runs after every Claude response:
Reads
last_assistant_messagefrom hook stdinFilters through
shouldCapture()(length, noise, CJK-aware)Auto-categorizes via
detectCategory()Embeds via Jina API
Stores in LanceDB with scope and metadata
This happens automatically — no manual tool calls needed.
Retrieval Pipeline
Query --> Embed --> Vector Search --+
+--> RRF Fusion --> Rerank --> Recency
Query --> BM25 Full-Text Search ---+ --> Importance --> LengthNorm
--> TimeDecay --> HardMin --> MMR
--> Final ResultsBased On
Built on memory-lancedb-pro by CortexReach — an enhanced LanceDB memory plugin for OpenClaw. All 29 source modules are included and loaded at runtime via jiti.
What this project adds:
Standalone MCP server (no OpenClaw dependency)
Claude Code hooks for true automation
14 MCP tools (vs 9 in original)
Portable to any MCP-compatible AI client
License
Based on memory-lancedb-pro (MIT License, Copyright (c) 2026 win4r).
Available Tools
14 toolsmemory_bulk_deleteB
Bulk delete memories by scope, category, or age.
Inputs: scope, category, olderThanDays, dryRun.
memory_decayA
Run the intelligent forgetting engine — removes low-quality, outdated memories based on Weibull decay model. Call periodically (e.g., once per session) to keep memory clean.
Inputs: dryRun.
memory_extractA
Smart extraction: use LLM to analyze conversation text and automatically extract important memories (preferences, decisions, facts, entities, events, patterns). This is the equivalent of autoCapture — call it at the end of important conversations.
Inputs: text (required), scope.
memory_forgetB
Delete a memory by ID or search query.
Inputs: memoryId, query.
memory_listC
List recent memories, optionally filtered.
Inputs: scope, category, limit.
memory_migrateB
Migrate memories from legacy memory-lancedb format to current format.
Inputs: sourcePath (required).
memory_recallA
Search long-term memories using hybrid retrieval (vector similarity + BM25 full-text + cross-encoder reranking). Returns semantically relevant memories ranked by quality.
Inputs: query (required), limit, scope, category.
memory_reflectB
Run the reflection pipeline — analyze conversation text, extract invariant rules and derived knowledge, store as reflection memories. This is the equivalent of the memory-lancedb-pro reflection system.
Inputs: text (required), scope.
memory_statsB
Memory usage statistics — total count, by scope, by category.
Inputs: no named parameters.
memory_storeA
Save important information to long-term vector memory. Auto-deduplicates and filters noise. Use for decisions, preferences, facts, project context — anything worth remembering across sessions.
Inputs: text (required), scope, category, importance.
memory_updateA
Update an existing memory (text, importance, or category).
Inputs: memoryId (required), text, importance, category.
self_improvement_extract_skillB
Create a new skill scaffold from a learning entry and mark it as promoted.
Inputs: learningId (required), skillName (required), sourceFile.
self_improvement_logA
Log structured learning or error entries into .learnings/ directory for governance and later distillation. Use when: (1) a command/tool fails, (2) user corrects you, (3) you discover a knowledge gap, (4) you find a better approach.
Inputs: type (required), summary (required), details, suggestedAction, +3 more.
self_improvement_reviewA
Summarize governance backlog from .learnings/ files — pending, high-priority, and promoted counts.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool has a clearly distinct purpose: memory operations (store, list, recall, update, forget, etc.) and self-improvement logging are separate concerns. No ambiguity between tools.
All tools follow a consistent snake_case pattern with `memory_` or `self_improvement_` prefix, making predictable verb/noun structure throughout.
14 tools is well-scoped for a memory management server, covering core operations and advanced features like decay and reflection without being excessive.
CRUD operations are fully covered, plus advanced features (decay, reflection, migration, statistics) and self-improvement logging. No obvious gaps for the domain.
Maintenance
Related MCP Connectors
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
Shared work memory for Claude Code, Codex, Cursor and chat, scoped to each repository.
Memory system for AI agents with semantic search. Store and recall memories with ease.
Related MCP Servers
- AlicenseAqualityDmaintenanceA personal memory system that provides AI assistants with long-term memory capabilities through semantic search and vector storage. It enables Claude Code to store, retrieve, and manage personal context and project preferences using flexible LLM backends.8MIT
- AlicenseNot gradedqualityDmaintenanceGives Claude Code long-term memory that persists across sessions via hybrid BM25 and vector semantic search, with multi-project isolation.23 npm8MIT

PseudoLife-MCPofficial
AlicenseAqualityBmaintenanceEnables persistent long-term memory for Claude Code across sessions, with tools for storing, searching, and managing facts, knowledge graphs, and procedural lessons.38408 PyPI7Apache 2.0- AlicenseNot gradedqualityBmaintenanceProvides persistent long-term memory for Claude Code by enabling semantic save, search, and context retrieval across sessions.1MIT