MCP Local Memory Service is a high-performance Model Context Protocol (MCP) server that provides long-term, high-signal memory for AI Agents (such as Claude Desktop, Cursor, or Windsurf).
Built with a Local-First philosophy, this service stores architectural decisions, code patterns, and critical facts locally on your machine using SQLite and AI-powered Semantic Search.
- 🧠 Semantic Search (V2): Find memories based on meaning, not just keywords, using the
all-MiniLM-L6-v2model locally with hybrid TF-IDF + vector ranking. - 🔄 Tech-Stack Affinity: Share knowledge across repositories intelligently based on technology tags.
- 🛡️ Anti-Hallucination Guard: Strict similarity thresholds and decision conflict detection.
- 🧩 Knowledge Graph: Structured entities, relations, and observations with auto-extraction via offline NLP.
- 🕰️ Time Tunnel: Query memories with natural language dates ("yesterday", "last week").
- 📉 Soul Maintenance: Biological-style memory decay with tag immunization — automatically archives obsolete memories.
- 🤖 Agentic Tools: Agent-context recall, structured decision logging, session summarization.
- 📊 Glassy Dashboard: Visualize memories, tasks, handoffs, knowledge graph, and interaction logs through a modern Svelte 5 interface.
- 🔍 Codebase Index: Index and query source code structure — search for functions, classes, interfaces, types, and enums across your projects. Uses tree-sitter WASM for fast parsing with incremental updates.
- 🧭 Codebase Search & Trace: Search indexed symbols with ranked results (
search_symbols), inspect file-level declarations (get_file_symbols), explore architecture overviews (get_architecture), and trace symbol definitions across your codebase (trace_symbol).
Compatible with Beledarian/mcp-local-memory clients: remember_fact, remember_facts, recall, forget are built-in aliases.
Add this service to your AI Agent (Claude Desktop, Cursor, Windsurf, etc.) using one of the methods below.
💡 Recommendation: If your MCP runs frequently (agents, CI, automation), avoid
npxand use a global or local install instead. It reduces unnecessary NPM downloads and speeds up Agent startup.
Best for first-time users or quick testing. This uses npx to run the server without any permanent setup.
"local-memory": {
"command": "npx",
"args": ["-y", "@vheins/local-memory-mcp"],
"type": "stdio"
}- Uses
npx: Automatically handles the execution. - Tradeoff: May re-download the package in some environments and is not optimal for frequent execution.
This method ensures the fastest startup times and maximum reliability for daily use.
-
Install globally:
npm install -g @vheins/local-memory-mcp
-
Add to your configuration:
"local-memory": { "command": "local-memory-mcp", "type": "stdio" }
- Faster startup: No network checks required on every start.
- No repeated downloads: Saves bandwidth and avoids NPM registry dependency.
- Better for automation: More stable for heavy-duty Agent workflows.
- npx usage: When you use
npx, it often performs a network request to check for the latest version or re-downloads the package if it's not in the cache. Since MCP clients start and stop tools frequently, this can lead to hundreds of unnecessary downloads. - Installed binary: By installing the package, you keep a permanent copy on your disk. The Agent reuses this local version instantly, providing a much smoother experience.
Visualize and manage your Agent's memory through a modern web interface.
| Dashboard Overview | Memories Management |
|---|---|
![]() |
![]() |
| Task Tracking | Available Tools & Reference |
|---|---|
![]() |
![]() |
local-memory-mcp dashboardIf not installed globally, use: npx @vheins/local-memory-mcp dashboard
The dashboard UI is built with Svelte 5 + Vite. Source files live in src/dashboard/ui/.
# Start the API server (port 3456)
npm run dashboard
# In a separate terminal, start the Svelte dev server (port 5173)
npm run dashboard:dev
# → Open http://localhost:5173 (proxies /api to :3456)
# Build Svelte UI for production (output → dist/dashboard/public/)
npm run dashboard:build
# Full production build (Svelte + TypeScript)
npm run buildThe server serves the compiled Svelte build from
dist/dashboard/public/in production.
The dashboard can auto-start when you open a project in VS Code, Cursor, Windsurf, Zed, or JetBrains IDEs.
- Getting Started & Setup — Installation & client configuration
- Tool Reference & Usage Guide — Complete tool docs with examples and workflows
- Troubleshooting Guide — Fix common issues
- Features & How It Works — Semantic search, anti-hallucination, memory decay
- Hybrid Search Logic — How search scoring works
- Dashboard Guide — Web UI for memory & task management
- Codebase Index — Feature Overview — Index, search, and trace source code symbols
- Codebase Index — API Reference — Complete MCP tool documentation for all 6 Codebase Index tools
- MCP Protocol Reference — Technical protocol details
- Claude Code Integration — Setup for Claude Code CLI
- Codex (OpenAI) Integration — Setup for Codex CLI
- Kiro Integration — Setup for Kiro IDE
- Auto-Start Dashboard in IDEs — tasks.json for VS Code, Cursor, Windsurf, Zed, JetBrains
🇮🇩 Indonesian version available:
README.id.md& docs indocs/id/
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.
MIT © Muhammad Rheza Alfin



