MemCore is a local, file-based shared long-term memory system for AI coding assistants. It stores facts worth keeping long-term—decisions, corrections, "already tried and failed" conclusions, user preferences, and so on—in a single SQLite database that multiple AI tools on the same machine can read and write together. The project emphasizes no daemon, no cloud service, and no telemetry, with the database file under the user's own control.
Purpose and positioning MemCore solves the problem of AI coding assistants "losing memory" when the context window is exhausted, the terminal is closed, or the next day begins, as well as the problem of different AI tools not knowing what the others have learned. It does not store full conversation transcripts or logs, only a small number of curated facts worth keeping long-term. It is officially positioned as a "search layer" that can be used alongside a plain-file knowledge base (such as a Markdown repository): files serve as the source of truth, and MemCore serves as a fast index across all scopes.
Main capabilities
- A single local SQLite database using FTS5 full-text search, supporting natural-language search.
- Access via MCP, CLI, a JSONL bridge, or raw SQLite; the MCP server requires the official MCP Python SDK 2 (pip install "mcp>=2,<3"), while the CLI and bridge require no additional dependencies.
- Entries are organized by scope (a project or topic, with global meaning global facts) and name (a short kebab-case identifier); the same scope + name is automatically upserted.
- Types are user, feedback, project, and reference, validated on write.
- Each write records the actor and time, and overwrites retain the old version; when nothing is found, an empty array is returned rather than a fabricated answer.
- Supports safe writes: read updated_at before updating and pass it back as expected_updated_at; the write is rejected on conflict.
- Supports per-connection access configuration (such as read-only, scope locking); identity is fixed at server startup via --actor, --origin, and --session-ref.
- Optional semantic search: after installing requirements-semantic.txt, run embed-backfill to add sqlite-vec and fastembed (ONNX, no PyTorch needed); the default model paraphrase-multilingual-mpnet-base-v2 (about 1 GB, downloaded once), can be overridden with MEMCORE_EMBED_MODEL, and disabled with MEMCORE_SEMANTIC=0.
- The MCP server supports background embedding: pending entries are embedded within seconds after being written, and when multiple servers share a database, leases ensure only one loads the model; the worker thread starts 90 seconds after the server starts. Related settings include MEMCORE_AUTO_EMBED, MEMCORE_AUTO_EMBED_DELAY, and MEMCORE_AUTO_EMBED_INTERVAL.
- Idle model unloading: the model is released after 10 minutes without searches or embeddings and reloaded on next use; measured on Windows, private memory is about 1.9 GB with the model loaded and about 0.55 GB after unloading. MEMCORE_EMBED_IDLE adjusts the delay (default 600 seconds; 0 means keep it loaded).
- The database is located at ~/MemCore/memcore.db by default and can be overridden with MEMCORE_DB_PATH; memcore.db is ignored by git.
- Markdown import helper scripts import_md.py and import_claude_md.py are provided; they can batch-import Markdown memory files and CLAUDE.md configurations, mask common secret patterns, skip credentials_* files, and can be run repeatedly.
Usage As a human user, you can use the CLI directly; all commands output JSON to stdout; search returns full entries, highlighted snippets, and relevance rankings, while recent and list return lighter header structures, and no results return []. As an AI assistant, you can configure MemCore as a local MCP server and connect it in hosts such as Claude Code according to their respective configuration formats; most CLIs read the MCP configuration only at startup, so a restart is required after changes. You can also use line-by-line JSON request/response bridging via scripts/memcore_bridge.py for local orchestrators. Raw SQLite access is recommended only for manual maintenance and recovery, because it bypasses validation and memory_events.
Updates and Versions MemCore is a git checkout rather thana software package, and updates are done the same way as obtaining it; the database is unaffected, and if a version changes the schema, the next command migrates it in place (forward-only, idempotent, preserving existing entries). python scripts/memcore.py version shows the current version offline; check-updates requests the latest release tag from GitHub, which is the only command that makes a network call, must be triggered manually, and sends only an unauthenticated GET.
Use Cases Suitable for sharing programming memory across sessions, projects, and multiple AI coding tools; suitable for development workflows that need to preserve design decisions, corrections, failed attempts, and user preferences; suitable for use with Markdown knowledge bases, IPCRA/PARA classification, schema files, append-only logs, and periodic consistency checks. It is officially stated to work with Claude Code, Codex CLI, Kimi Code, OpenCode, AgentRoom, or any tool that supports MCP or can run scripts.
Limitations MemCore does not automatically capture anything; there are no background hooks or daemons monitoring sessions, and writing depends on the AI actively doing it. It does not judge whether stored facts are still correct or up to date; that is the writer's responsibility; assistants may still misread retrieved results. It returns only the text that was written along with its scope, date, and edit history, and will not give speculative answers to unrecorded questions. Semantic search is an optional feature that requires installing additional dependencies and downloading a model; reloading the model may take 15 to 30 seconds on a mechanical hard drive.