mcp-local-memory
Enables AI-powered entity extraction, relation extraction, importance scoring, and auto-labeling by integrating with a local Ollama instance running LLMs like Llama 3 for deep understanding of memory content.
Local Memory MCP Server
A local-first MCP server that gives AI agents shared, durable memory through hybrid semantic search, SQLite FTS5, and a knowledge graph—without Docker or a required cloud service.

Why use it?
Shared across agents: one SQLite database can serve Codex, Claude, desktop clients, IDE integrations, and custom MCP clients.
Hybrid recall: when
sqlite-vecis available, localall-MiniLM-L6-v2embeddings and FTS5 keyword evidence are merged. FTS remains available as the explicit fallback.Temporal recall: search natural-language periods such as
last weekorin 2025, or pass an explicit ISOstartDateandendDate.Adaptive ranking: relevance, time-decayed importance, tags, and bounded recent familiarity work together without rewriting importance on every recall.
Auditable lifecycle: memories can be reinforced, marked outdated or incorrect, restored, exported, or forgotten.
Structured context: entities, relations, observations, conversations, tasks, and todos live beside free-form memories.
Local by default: memory data stays in your configured SQLite file. Optional LLM features send input only to the
OLLAMA_URLyou configure.
For every option and tool, see the extended guide.
Related MCP server: Mind Keg MCP
Requirements
Node.js 22 or newer on a supported LTS release.
Python and C++ build tools when
better-sqlite3has no matching prebuild.Windows users can install Desktop development with C++ through Visual Studio Build Tools.
Windows ARM64 semantic search is supported by a bundled, checksum-verified
sqlite-vec v0.1.9 DLL. WSL2 remains a supported alternative.
Quick start
Add the published package to an MCP client:
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@beledarian/mcp-local-memory@2"],
"env": {
"ARCHIVIST_STRATEGY": "nlp"
}
}
}
}The default database is ~/.memory/memory.db. The first semantic recall may
download the local embedding model.
Global installation provides both memory and mcp-local-memory:
npm install -g @beledarian/mcp-local-memory@2
memory --helpFrom source:
git clone https://github.com/Beledarian/mcp-local-memory.git
cd mcp-local-memory
npm install
npm run build
npm startSee the Codex + WSL2 setup when the database or server runs inside Linux.
Essential configuration
Variable | Default | Purpose |
|
| SQLite database location. |
|
|
|
|
| Optional LLM generation endpoint. |
|
| Retrieval relevance versus decayed importance. |
|
| Minimum relevance required before a candidate can be returned. |
|
| Maximum temporary familiarity contribution; |
|
| Recent exposure window. |
|
| Run archivist processing in a worker while retaining durable acknowledgement. |
| unset | Directory containing opt-in JavaScript extensions. |
All scoring, context, archivist, task, and extension variables are documented in the configuration reference.
How recall works
recall supports both topical and temporal questions:
Semantic vector and FTS5 keyword candidates are retrieved independently and merged, so an exact term is not hidden by a semantic result.
Natural-language dates such as
yesterday,last week, andin 2025are recognized in the query. ISOstartDateandendDatefilters are also available.Weak matches are omitted, near-duplicates are collapsed, and outdated or incorrect memories stay hidden unless explicitly requested.
Relevant results are ranked using retrieval evidence, query coverage, tags, time-decayed importance, and a small recent-familiarity signal.
Each returned active memory can record one familiarity exposure per normalized-query hash and UTC day. The contribution is temporary and bounded to
0.03by default; it does not rewrite importance or refresh decay.
reinforce_memory provides the stronger, durable feedback path:
usedorimportantrecord positive evidence.irrelevantlowers importance.incorrectoroutdatedsuppresses the memory without deleting history.restorereturns a suppressed memory to active recall.
The extended scoring guide documents the formula, thresholds, deduplication, privacy limits, decay, and every familiarity control.
Entities, relations, and the graph
Free-form memories and structured knowledge complement each other:
Entities represent people, projects, places, topics, or other named concepts. Each has a type, importance, and appendable observations.
Relations are directional triples such as
Project A --[uses]--> SQLite. Creating a relation also creates any missing endpoint as anUnknownentity.Automatic extraction can identify entities and relations while saving a fact. Use
ARCHIVIST_STRATEGY=nlpfor local extraction,llmfor the configured Ollama endpoint, orpassivefor manual graph maintenance.Graph exploration can return an overview or a centered one- or two-hop neighborhood with entity observations, relations, and related memories.
Graph maintenance supports renaming or deleting entities, removing exact observations, and deleting individual relations. Entity renames update connected relations.
Clustering groups semantically related memories and entities into topic overviews when embeddings are available.
Use recall for ranked free-form retrieval and read_graph when connections
between named concepts matter. They are complementary views of the same local
knowledge base.
MCP surface
Area | Tools and resources |
Memory |
|
Graph |
|
Conversations |
|
Todos |
|
Optional extraction |
|
Resources |
|
See the complete tool reference for arguments and lifecycle behavior.
Upgrading safely
When upgrading from 1.x:
move to Node.js 22;
back up
MEMORY_DB_PATH;expect automatic additive schema migration;
note that
MEMORY_SEMANTIC_WEIGHTnow means relevance versus importance;recall no longer raises importance or refreshes decay;
run importance normalization only if you want to reset historical passive popularity.
The project does not claim crash-proof, zero-loss migration under every interruption scenario, so a verified backup remains the safety boundary.
Older releases passively increased importance and access_count during
recall. Preview normalization before changing anything:
npm run normalize:importance -- --db ~/.memory/memory.dbApplying normalization is optional and requires an explicit, non-existing backup path. See the migration and normalization guide.
Documentation
Development
These commands require a source checkout:
npm install
npm run build
npm testnpm test covers scoring, schema migration, lifecycle and familiarity,
privacy/provenance, MCP contracts, packaging, and native vector or FTS fallback.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA persistent memory server that implements a local knowledge graph using the Kuzu embedded database to store entities, relationships, and observations. It enables AI models to maintain structured long-term context through searchable nodes and comprehensive tag-based organization.Last updated20MIT
- Alicense-qualityCmaintenanceA persistent memory server that stores and retrieves atomic coding insights like architectural decisions and debugging patterns for AI agents. It enables agents to maintain institutional knowledge across sessions using semantic search and local SQLite storage.Last updated3210MIT
- Alicense-qualityCmaintenanceLocal-first semantic memory server with project indexing for AI assistants. It enables AI assistants to store, retrieve, and search memories and project code using embeddings and vector search.Last updated139MIT

Mnemo MCPofficial
Alicense-qualityBmaintenancePersistent AI memory server with hybrid search and embedded sync. Enables AI agents to store, retrieve, and manage information across sessions with temporal knowledge graph support.Last updatedMIT
Related MCP Connectors
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Beledarian/mcp-local-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server