N3MemoryCore MCP — Lite (Ephemeral)
This MCP server provides a short-lived (7-day TTL) hybrid memory store for saving, searching, recalling, repairing, listing, and deleting conversation memories.
Search memory: hybrid vector + BM25 search with optional
since/until/session_idfilters and weak-match fallback.Save memory: store content with optional
session_id,turn_id,agent_name, andimportance; rejects exact duplicates and chunks long content for verbatim recall.List memories: list stored memories newest first.
Recall thread: retrieve entries around a search hit using its
turn_id.Delete memory: delete one memory by ID, cascading parent documents to child chunks.
Delete memories by session: bulk-delete all memories for a
session_id; irreversible.Repair memory: recreate the RediSearch index and add missing vectors (up to 200 per call).
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., "@N3MemoryCore MCP — Lite (Ephemeral) search memory for recent discussions on authentication"
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.
N3MemoryCore MCP Lite (n3mcmcp-lite) v2.1.0
Give Claude Code a working memory that clears itself after 7 days — and the same memory in the Claude desktop app.
In Claude Code, hooks save every message and reply and bring the related ones back on every turn; no tool call is needed. The Claude desktop app and other MCP applications reach the same memory through MCP. Everything is kept in a Redis Stack that you run, and every entry is deleted 7 days after it was saved.
Start Redis Stack
docker run -d --name redis-stack -p 127.0.0.1:6379:6379 redis/redis-stack-server:latestMake a folder: in File Explorer, create one empty folder (for example
C:\Users\<you>\n3mcmcp-lite)Put the specification
N3MemoryCore_MCP_Spec_EN.mdin that folder, and nothing elseOpen Claude Code in that folder: in the Claude desktop app, open the Code tab, start a new session with + New, choose Local, then Open folder… and pick the folder (in a terminal, change to that folder and run
claude)Ask: "Please implement n3mcmcp-lite according to the specification
N3MemoryCore_MCP_Spec_EN.md."When it is done, restart Claude Code (closing the window may not be enough: quit Claude from its icon under the "^" at the right end of the taskbar, or sign out of Windows once)
After the restart, open the same session and send "I restarted". Claude Code checks that memory works and tells you what to do next.
Memory works from the next session. The steps are in Quickstart. To install with pip or the plugin instead (bonus), and for the Claude desktop app, see Method B: Install the package (bonus).
⚠️ Disclaimer
No support, no claims: This project is provided as-is with no support. Questions, bug reports, and feature requests are not guaranteed a response. Use entirely at your own discretion.
Use at your own risk: This system runs on AI-generated code. The author is not responsible for any data changes or issues caused by its use.
Backup first: Always back up your current environment before running this on important projects.
Upgrading from v1.12.2? What changes for existing users is in
CHANGELOG.md(version 2.0.0).
A NeuralNexusNote™ product — free Lite build: ephemeral hybrid (vector + BM25) memory backed by Redis Stack, with a 7-day TTL per entry.
Where to go
You are… | Read |
new here | |
coming from v1.x |
|
choosing between the two free builds | |
asking where your data is | |
changing settings | |
stuck |
What is this?
n3memorycore-mcp-lite gives Claude short-lived memory across
conversations. It stores text in a Redis Stack that you run, with a BM25
full-text index and a 768-dimension vector index
(intfloat/multilingual-e5-base),
and returns hybrid-ranked results. Every entry is deleted by Redis 7 days
after it was saved.
From v2.0.0, MCP-Lite is "N3MC-Free + MCP, with Redis as the database": the search and save rules of Lite v1.12.2, plus the hooks, the resident server and the CLI of N3MC Free, plus a thin MCP entry for applications without hooks. Free and Lite keep separate search and save rules. See MODIFICATIONS.md.
Claude Code ──hooks / CLI (HTTP)─────────────────────────┐
├─▶ resident server (127.0.0.1:18524, model loaded once) ─▶ Redis Stack
Claude desktop app ─(MCP, stdio)─▶ n3mc-workingmemory ───┘
(thin client, no model)Application | Connects through | Registered by |
Claude Code | the hooks ( | hooks: |
Claude desktop app and other applications without hooks | MCP only (the thin client | you, in the application's configuration file |
Claude Code can use the hooks, MCP, or both. The hooks save every message and reply; with MCP the model saves through the tools, as in v1.12.2.
Both paths reach the same resident server and the same Redis: what is said in Claude Code is found from the desktop app, and what the desktop app saves is found in Claude Code.
Related MCP server: light-agent-memory-mcp-server
Lite or Free? Which one to use
There are two free N3MemoryCore builds. If you only use Claude Code and want memory that stays, N3MC Free is easier: it needs no Docker.
N3MC MCP Lite (this repository) | ||
Works with | Claude Code (hooks), and the Claude desktop app or other MCP applications (MCP) | Claude Code only |
What gets saved | Claude Code: every message and reply, automatically (hooks). Other applications: what the AI decides to save ( | Every message, automatically (hooks) |
How long it is kept | 7 days, then deleted automatically | Until you delete it |
What you need | Python 3.10+ and Docker (Redis Stack) | Python 3.10+ |
Setup | Start Redis Stack, install the plugin (or |
|
Good for | Short-lived working memory; one memory shared by Claude Code and the desktop app | Long-term memory for Claude Code |
🚀 Quickstart
There are two ways to set it up. Method A, generating the code from the specification, is the primary one; Method B, installing the package, is a bonus. Both start with Step 1, starting Redis Stack.
Step 1 — Start Redis Stack
# First time only (creates the container):
docker run -d --name redis-stack -p 127.0.0.1:6379:6379 redis/redis-stack-server:latest
# Every subsequent session (container already exists):
docker start redis-stackRe-running the docker run command after the container exists fails with
Conflict. The container name "/redis-stack" is already in use. Use
docker start redis-stack from the second session onward.
Method A: Generate from the spec (primary, recommended)
The N3MC series is specification first: the specification is written so that an AI can generate the implementation from it. To do that:
Start Redis Stack (Step 1 above).
Make a folder: in File Explorer, create one empty folder (for example
C:\Users\<you>\n3mcmcp-lite). The code is generated in this folder and stays in use after setup; do not delete or move it later.Put the specification in it: copy the downloaded specification
N3MemoryCore_MCP_Spec_EN.mdinto that folder (put nothing else in it).Open Claude Code in that folder: in the Claude desktop app, open the Code tab at the top of the sidebar and start a new session with + New. In the row under the prompt box, choose Local as the environment, then click the folder control beside it, choose Open folder… and pick the folder from step 2. (In a terminal, change to that folder and run
claude.)Ask: in the prompt box, send "Please implement n3mcmcp-lite according to the specification
N3MemoryCore_MCP_Spec_EN.md."
The AI first checks the folder, Python and Redis, then generates the package,
runs pip install -e ., registers the hooks (n3mc-lite --init) and the MCP
entry (claude mcp add) in Claude Code, writes
the MCP entry into the
Claude desktop app's configuration file if the app is installed (after a
backup, replacing only that entry), and checks that everything starts. The
desktop app reads the entry after it is quit completely and started again.
The folder stays in use afterwards: deleting or moving it stops the memory.
The four-phase workflow is in Appendix B of the specification.
Then restart Claude Code, as in Step 4 — Restart.
Method B: Install the package (bonus)
Step 2 — Claude Code (MCP or hooks)
(a) Plugin marketplace — MCP, as in v1.12.2 (no config file to edit). Requires
uv on PATH. Run inside Claude Code:
/plugin marketplace add NeuralNexusNote/n3mcmcp-lite
/plugin install n3mc-workingmemory@neuralnexusnoteThe plugin registers the MCP server n3mc-workingmemory in Claude Code,
as in v1.12.2. It runs through uvx --from n3memorycore-mcp-lite==2.1.0 …
(the version is pinned to the package version). A SessionStart hook
pre-approves the memory tools.
(b) pip — hooks.
pip install n3memorycore-mcp-lite
n3mc-lite --initn3mc-lite --init registers the two hooks in ~/.claude/settings.json with
the absolute paths of n3mc-lite-hook / n3mc-lite-stop-hook, keeps every
other entry (including other N3MC products' hooks), backs the file up before
writing, and adds the permission rules for the CLI. It never removes an MCP
registration.
(a) and (b) can be used together: the MCP tools and the hooks reach the same memory, and the model then does not save on every turn.
Step 3 — Claude desktop app (optional)
With Method A, setup has already written this entry; skip this step.
Open the config file from the app (Settings → Developer → Edit Config; the
usual place on Windows is %APPDATA%\Claude\claude_desktop_config.json, and
the Microsoft Store version of the app may keep it in another folder). Add
the entry under mcpServers, keep the entries already there, save, and
quit the app completely and start it again. To quit completely, right-click the Claude icon under the "^" at the right end of the taskbar and quit; if unsure, sign out of Windows once.
pip installation:
{
"mcpServers": {
"n3mc-workingmemory": {
"command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\n3mc-workingmemory.exe",
"args": [],
"env": {
"N3MC_AGENT_NAME": "claude-desktop"
}
}
}
}Plugin users (no pip installation):
{
"mcpServers": {
"n3mc-workingmemory": {
"command": "uvx",
"args": ["--from", "n3memorycore-mcp-lite==2.1.0", "n3mc-workingmemory"],
"env": {
"N3MC_AGENT_NAME": "claude-desktop"
}
}
}
}command: the absolute path ofn3mc-workingmemoryfrom the same scripts folder the hooks use (Windows:where n3mc-workingmemory; Linux:which n3mc-workingmemory). The app does not use thePATHof your terminal. The hooks and the MCP entry must run the same code (see Limits).env.N3MC_AGENT_NAME: the name stored asagent_namewhen the model does not pass one. Use one name per application.When the hooks use another data folder (
N3MC_DATA_DIR), add the sameN3MC_DATA_DIRtoenv.N3MC_SESSION_IDmay be added to pin the defaultsession_idof this application.Other MCP clients on Windows or Linux are registered the same way (command, args, env).
Step 4 — Restart
Restart Claude Code (and the desktop app). Closing the window is not always enough: the app can keep running in the background. On Windows, open the "^" at the right end of the taskbar (near the clock); if a Claude icon is there, right-click it and quit. If unsure, sign out of Windows once and sign in again (Start menu → your account icon at the bottom left → Sign out), or restart the PC. Memory starts with the next session. On the first start the resident server downloads and loads the embedding model, about 1.1 GB (later starts use the cache). The hooks do not wait for it: until the model is ready, the memory search uses keywords only and says so in a notice, and messages are saved without vectors, which are added later automatically. The MCP tools and the CLI wait up to 20 seconds for the model.
⚠️ Prerequisites
Item | Requirement |
Python | 3.10 or higher |
Client | Claude Code (hooks), and/or the Claude desktop app or another MCP client (MCP) |
Redis Stack | Running on |
pip packages (installed automatically) |
|
| Only for the plugin and the |
OS | Windows 11 or Linux. macOS is not a target |
Why no persistence flags on the docker line: this build is deliberately volatile. The resident server turns Redis persistence off itself (
CONFIG SET appendonly noandCONFIG SET save "") when it connects, so a manual re-enable is reverted on the next Lite run. The--save ""argument is not put on thedocker runline because its empty string breaks in Windows PowerShell and cmd.exe quoting.Use a dedicated Redis. The server changes these settings only when the Redis holds nothing but N3MC keys. If it finds other data, it leaves the persistence settings alone and shows a
shared_redisnotice. N3MC Lite also needs Redis Stack (RediSearch); with plain Redis every tool answers with a hint to start Redis Stack.
Without Redis, the hooks do not fail: they keep the text in audit.log
only and show a notice telling you to start Redis Stack. Nothing is queued
for resending.
Features
💾 Your own Redis — Your memories are kept in the Redis you run (on your PC by default), not in any cloud service. Only the memories recalled for a turn are sent to the AI service, as part of the conversation (details).
⚡ Automatic in Claude Code — The hooks save every non-empty message and reply and search with every message, whatever the model decides. No tool call is needed.
🔗 One memory for Claude Code and the desktop app — Both reach the same resident server and the same Redis.
🔍 Semantic search — Finds relevant past conversations even when the exact words differ.
🌐 Multilingual out of the box — CPU-only, no LLM/GPU required. NFKC fold (
アルファ↔アルファ,123↔123, ligatures), bigram coverage for Japanese / Chinese / Korean / Thai / Lao / Myanmar / Khmer, diacritic cross-match for Latin scripts (café↔cafe).🛡️ Encoding safety — UTF-8 reconfigure of stdin/stdout/stderr on Windows (cp932 → UTF-8), lone-surrogate sanitization on every input.
🔄 Context across sessions — Working memory that lasts 7 days (auto-expires via Redis TTL).
🧠 Model loaded once — One resident server loads the embedding model for the hooks, the CLI and every MCP client.
🏢 One person, one memory — Memories are not shared between people: each
config.jsonhas its ownowner_id, and search shows only that owner's records. Use one Redis per installation.🧹 Ephemerality is a design feature — 7-day auto-expiry means failed attempts and abandoned designs don't bleed into the next task.
💰 Reduces token waste — Memory search uses local embeddings (
intfloat/multilingual-e5-base) and costs zero Claude tokens.
How It Works
Claude Code (hooks)
User's message
│
▼ UserPromptSubmit hook
├─ 1. append the raw input to audit.log
├─ 2. add missing vectors (repair, one batch)
├─ 3. save Claude's previous reply from the transcript, if the Stop hook missed it
├─ 4. search with the message → "# Recalled Memory Context" into Claude's context
└─ 5. save the message as a [user] record
│
▼
Claude responds
│
▼ Stop hook
├─ 1. append the raw input to audit.log
├─ 2. save the reply as a [claude] record
└─ 3. housekeeping: keep .claude/rules/n3mc-lite-behavior.md up to date, rotate audit.logThe search runs before the message is saved, so a message never finds
itself. The hooks always exit 0: when the server or Redis is down, the text
is safe in audit.log and a notice tells you what to do. Claude Code gets its
guidance from the rules file .claude/rules/n3mc-lite-behavior.md, which the
Stop hook writes into the project folder (a file you edited by hand is not
replaced). Input that Claude Code itself injects (task notifications, agent
messages, system reminders) is neither saved nor searched.
Claude desktop app and other MCP applications
The thin MCP entry answers initialize with behavioral instructions
(search at the start of each turn, save after each meaningful exchange) and
forwards every tool call to the resident server. In these applications,
saving is up to the model — see
On compliance.
Three scenes
Monday — In Claude Code you decide to use PostgreSQL for the website, and say why. The hooks save the exchange.
Tuesday — In a new session you ask which database you chose. Monday's decision arrives in Claude's context together with your question.
Eight days later — Monday's records are gone: every entry is deleted 7 days after it was saved. That is the design. For memory that stays, use N3MC Free or a Pro build.
What Claude receives
This is the block the UserPromptSubmit hook added for the Tuesday question. It was captured from a real run of the hooks (a temporary data folder and a throwaway Redis Stack container; the second session was started in a different folder from the first).
# Recalled Memory Context
Source: N3MC Lite (7-day working memory)
Search query: Which database did we decide to use for the website, and why?
_If several versions of the same content appear, the one with the newest `saved` time is the current one._
### [01a2020d-c67a-7373-93aa-39a0db176d4f] turn=8f3d1d47-3d9d-4b02-a9ae-a3236124c27b score=0.199 saved=2026-11-22 15:59 (UTC+0900)
[user] Let's use PostgreSQL for the website's database. Several people will edit at the same time, and SQLite locks the whole file on every write.
#### Possibly related (weak matches — may be unrelated)
### [01a2020d-e3a3-7a63-a2f9-1a273e8847f0] turn=8f3d1d47-3d9d-4b02-a9ae-a3236124c27b score=0.409 saved=2026-11-22 15:59 (UTC+0900)
[claude] Agreed, PostgreSQL it is. The reason, for the record: several editors at the same time, and SQLite allows one writer at a time. Next step: write the schema for the articles table.Each hit starts with ### [<id>] and shows its turn=, score= and saved= time. Hits under Possibly related did not pass the relevance floors.
Relationship with Claude's built-in auto-memory
Claude Code has a built-in auto-memory system
(~/.claude/projects/.../memory/). N3MemoryCore complements it rather
than competing with it.
Claude auto-memory | N3MemoryCore RAG | |
Strengths | Reliable, loads every session, great for fixed facts | Conversation context, detailed history |
Weaknesses | Cannot capture conversation flow or context | Depends on search quality; not guaranteed to surface |
Best for | User profile, folder paths, stable settings | Conversation threads, past decisions, reasoning |
Fixed information needed every session (folder paths, user preferences) → auto-memory
Conversation context and history (discussion threads, past decisions) → N3MemoryCore (7-day window)
Your Memory Stays on Machines You Control
N3MC Lite keeps your memories in the Redis Stack you run: by default the one on your own PC, or a Redis server you choose.
Your Redis, not an N3MC cloud — Memories are stored in the Redis set by
redis_url(defaultredis://localhost:6379/0; theN3MC_REDIS_URLenvironment variable takes precedence). There is no N3MC account and no N3MC cloud service. Each entry expires 7 days after it was saved (ttl_seconds).The resident server listens on your PC only — It listens on
127.0.0.1:18524(bind_host,server_port). It has no authentication, so keepbind_hostat127.0.0.1: any other value exposes the memory to the network (the server prints a warning). Requests whoseHostheader is not127.0.0.1/localhostare refused. The MCP entry talks to your application over stdio and opens no port. The CLI and the hooks never go through a proxy.What is on disk — Besides Redis, the data folder holds
config.json, and since v2.0.0audit.log: the raw text of every hook call — every prompt and reply in full, including code blocks and pasted text — with no TTL (rotated at 50 MB, at most about 100 MB). Treat it as private data. It is the last-resort copy for a message that could not reach Redis; nothing reads it back into the memory. See Data location.Embeddings are made on your PC — The embedding model runs locally on the CPU, and the search runs inside your Redis. Searching calls no external API.
No telemetry — N3MC sends no usage data anywhere. The code is open, so you can check this yourself.
You can see and remove your memories —
n3mc-lite --list/list_memoriesshow the newest entries;--delete/delete_memoryand--delete-session/delete_memories_by_sessionremove them from Redis. The raw text of every hook call also stays inaudit.login the data folder (no TTL, rotated at 50 MB): delete that file yourself to remove it.
What does go over the network:
Installing —
pipanduvxdownload the package and its dependencies from PyPI; the Claude Code marketplace path fetches the plugin from theNeuralNexusNote/n3mcmcp-liteGitHub repository.The Redis Stack image — The first
docker rundownloadsredis/redis-stack-serverfrom Docker Hub.The embedding model download — On the first start,
intfloat/multilingual-e5-base(about 1.1 GB) is downloaded from Hugging Face.A Redis on another machine — If you point
redis_url/N3MC_REDIS_URLat another machine, every memory you save and every search goes over the network to that machine.What the AI reads — The
# Recalled Memory Contextblock and the results ofsearch_memorybecome part of the conversation, so they are sent, together with your message, to the AI service behind your application (Anthropic, for Claude). N3MC does not upload your Redis contents anywhere.
Use cases — when working memory is the right tool
The 7-day TTL and volatile Redis storage are design features, not limitations. They make Lite the right fit for:
Agentic code-generation loops — failed attempts and abandoned designs don't bleed into the next task.
Experimental / throwaway prototyping — leave it alone and memory evaporates in 7 days, no pruning needed.
Project-scoped working memory — pin a
session_idper task / project to keep contexts separated.Switching between Claude Code and the desktop app during one piece of work.
If you need long-term, persistent memory, working memory is not the right layer: use the Pro build (persistent storage) or keep an external copy. Lite forbids any "persistence hack" (RDB snapshots, AOF, external dumps) to get around the TTL.
Tools and CLI commands
The seven tools (MCP) and the CLI commands (Claude Code) call the same
handlers in the resident server and give the same text. The CLI prints it
without the auto-save reminder, because in Claude Code the hooks save;
--search prints the same block as the hook, with the
# Recalled Memory Context heading.
Tool (MCP) | CLI ( | Purpose |
|
| Hybrid (vector + BM25) search, ranked & time-decayed, |
|
| Save an entry (7-day TTL, exact duplicates rejected) |
|
| Most-recent entries, newest first |
|
| The entries around a hit's |
|
| Remove one entry (cascades to chunks if the id is a parent document) |
|
| Bulk-delete every memory tied to a |
|
| Re-create the index if missing and add missing vectors (up to 200 per call) |
In Claude Code,
--search,--buffer,--list,--recall-thread,--repairand--stopare pre-approved (permissions.allow), in thepython -m n3mc_mcp.cliandn3mc-liteforms (pip) or theuvx --from n3memorycore-mcp-lite==2.1.0 n3mc-liteform (plugin).--deleteand--delete-sessionare never pre-approved: they are irreversible, so Claude Code asks you each time.A manual
--searchis not limited in size; the hook's block and the MCPsearch_memoryresult are kept withincontext_max_chars.
ID hierarchy
N3MemoryCore identifies the origin and context of every record with
five ID fields. Most users only ever touch session_id (and rarely
agent_name); the rest are filled in automatically.
ID | Stored in | Generated | Granularity | Purpose |
| Redis hash | Per record (UUIDv7, time-ordered) | One record | Unique identifier for each memory — used for |
|
| First startup (UUIDv4) | Owner / installation | Identifies whose data this is. Validated on every |
|
| First startup (UUIDv4) | Agent / install | Stored on every row, but does not feed Lite's |
| Redis hash | Per task / project / conversation (string) | Task / project / conversation | Drives the |
| Redis hash | Per save (free-form string) | Agent display label | Hook records: always |
Hook records also carry a turn_id that ties a message to its reply; pass
it to --recall-thread / recall_thread to read the conversation around a
hit.
Practical guidance:
Pin
session_idwhen you work on a named project through MCP: pass the same string (e.g."proj-alpha") tosave_memoryandsearch_memory, or setN3MC_SESSION_ID.You should not pass
owner_idunless you need to prove ownership.Use one Redis per installation. If several PCs or people point at the same Redis, or
config.jsonis re-created with a newowner_idwhile old records remain: a body one owner saved is rejected asduplicatefor the other until it expires (7 days), and one owner's records can fill the search candidates so the other's are not found. Give each installation its own Redis.
Data location
Memories live in Redis and expire automatically. The data folder is
~/.n3mc-workingmemory/ (Windows: %USERPROFILE%\.n3mc-workingmemory\);
override it with the N3MC_DATA_DIR environment variable (absolute path).
File | What it is |
| Configuration (up to v1.12.2 the only file) |
| (v2.0.0) JSONL record of every hook call, written before anything else: raw prompts and replies, with no TTL. Rotated at 50 MB, so at most about 100 MB is kept |
| (v2.0.0) PID file of the resident server (exists only while it runs) |
| (v2.0.0) stderr of the resident server (truncated when over 1 MB at a start) |
| (v2.0.0) marker of a failed server start (5-minute back-off) |
| (v2.0.0) notices that need your action, shown once a day |
| (v2.0.0) the |
Since v1.10.0 the folder is in the home directory instead of the platform
app-data directory: the Microsoft Store build of the Claude desktop app
redirects %LOCALAPPDATA% for the processes it starts, which gave one PC
two configs and two owner_ids. On first start the old config is copied
over once (the old file is left in place).
Not designed to be backed up: entries vanish on a 7-day rolling window.
config.json (the owner_id / local_id) is the only file that matters
for identity.
Coexistence with other N3MC products
Lite can be installed on the same PC as N3MC-Free, N3MC-Pro and the MCP Pro
/ PostgreSQL / Ollama editions. Nothing is shared: Lite has its own data
folder (~/.n3mc-workingmemory), its own database (Redis), its own server
port (18524), its own hook commands (n3mc-lite-hook,
n3mc-lite-stop-hook), its own CLI (n3mc-lite) and its own rules file
(.claude/rules/n3mc-lite-behavior.md).
n3mc-lite --initkeeps the other products' hooks and reports them.When two products' hooks are installed, Claude gets one
# Recalled Memory Contextblock from each, each from its own memory.When another N3MC server holds Lite's port, Lite never uses or stops it: it saves without vectors, does not search, and shows a
port_conflictnotice asking you to give Lite its ownserver_port.When a persistent N3MC memory is connected over MCP in the same application —
n3mc-pro(N3MC MCP Pro),n3mc-pg(its PostgreSQL edition) orn3mc-longtermmemory(the earlier MCP Pro) — the MCP instructions treat Lite as the working memory.
Limits
7 days. Every entry is deleted 7 days after it was saved. A search does not extend it.
audit.logis the exception: it has no TTL.In applications without hooks, saving is up to the model (see below). Full conversations are kept only in Claude Code.
The resident server must be able to run. When it cannot start, searches answer with an error or a placeholder, and saves go into Redis without a vector (found by keywords at once, vector added later by repair).
One installation for all clients. The hooks, the CLI and the MCP entry must run the same version; otherwise each replaces the other's server on every call. Register the desktop app with the same scripts folder the hooks use, or with the same pinned
uvxform.Plugin and pip together: they work together when both run the same version (the plugin pins it). A version generated from the specification runs other code, so its setup stops while the plugin is enabled.
Why N3MemoryCore? (vs. built-in memory)
Aspect | Built-in memory | N3MemoryCore (Lite) |
Data ownership | Vendor-hosted | Your own Redis Stack on your machine |
Saving in Claude Code | Up to the model | Every message and reply, by hooks |
Client surface | The vendor's product only | Claude Code (hooks) and any MCP client |
Verbatim recall | Opaque (may be summarized) | Parent-document contract — the full text returned as saved (code blocks as |
Search internals | Black box | Hybrid BM25 + e5 vectors + CJK bigram + time decay + lightweight reranker, all parameters visible and tunable |
Inspect / control | UI only | List, recall, delete and bulk-delete by |
Persistence | Tied to the vendor's service | Redis with a 7-day TTL — short-lived by design, but you own the container |
If you only need "the AI remembers something across sessions" inside one vendor's product, the built-in memory is simpler.
On compliance — MCP can persuade, not force
This section applies to applications without hooks (the Claude desktop app and other MCP clients). In Claude Code the hooks save every message and reply and search with every message, whatever the model decides.
An MCP server cannot make the LLM call its tools. The protocol gives it
three persuasion levers: tool descriptions in tools/list, the
instructions field sent at session start, and the text of tool responses.
Lite uses all three: every tool response ends with a short reminder. Even
so, whether the LLM follows through is non-deterministic: it depends on
the model, on how the client builds its prompt (some clients summarize or
drop instructions), and on competing instructions. Most turns save
correctly; short answers and fact corrections are sometimes skipped.
When a save must happen:
Ask explicitly — write "save this to N3MemoryCore" in your prompt. LLMs almost always honour explicit requests.
Use Claude Code — its hooks save every exchange.
Call the Anthropic Messages API from your own application — drive
tool_useyourself so thatsave_memoryruns every turn. You then have to write that application.
Details
Settings (config.json), how search results are ranked, multilingual handling, encoding safety, and how to develop and extend Lite are described in the specification N3MemoryCore_MCP_Spec_EN.md. For the changes in each version, see CHANGELOG.md.
Uninstall
Ask the AI "Please remove N3MC Lite" so that the hook entries are removed too, or do it yourself:
Plugin users:
/plugin uninstall n3mc-workingmemory@neuralnexusnote. pip users: remove the two entries of~/.claude/settings.jsonwhose command runsn3mc-lite-hook/n3mc-lite-stop-hook.Stop the resident server:
n3mc-lite --stop-server(or end the process whose command line containsn3mc_mcp.cliand--run-server).pip uninstall n3memorycore-mcp-literemoves the package.docker rm -f redis-stackstops and deletes the Redis container and erases all stored memories.Delete
~/.n3mc-workingmemory/(orN3MC_DATA_DIR) to removeconfig.json,audit.logand the other files.Remove the
n3mc-workingmemoryentry from the Claude desktop app's config file.
.claude/rules/n3mc-lite-behavior.md in your project folders can be deleted
by hand.
Troubleshooting
Windows: pip install --upgrade fails with WinError 32 (file in use)
Symptom:
ERROR: Could not install packages due to an OSError: [WinError 32]
The process cannot access the file because it is being used by another process:
'...\Scripts\n3mc-workingmemory.exe' -> '...\Scripts\n3mc-workingmemory.exe.deleteme'Cause: a running process holds a file of the package open — for example
the Claude desktop app running n3mc-workingmemory.exe.
Fix: fully quit the Claude desktop app and Claude Code (closing the window
is not enough on Windows; end the processes in Task Manager or sign out
once), stop the resident server (n3mc-lite --stop-server), then run
pip install --upgrade again.
~3memorycore-mcp-lite warnings during pip install
If you see lines like:
WARNING: Ignoring invalid distribution ~3memorycore-mcp-litethat is pip flagging a previous install that was interrupted mid-write
(typically by the file-lock issue above). The leftover directory is
named with a leading ~ and is harmless but noisy. Delete it manually:
# Windows
rmdir /s "%LOCALAPPDATA%\Programs\Python\Python312\Lib\site-packages\~3memorycore_mcp_lite-<version>.dist-info"(Adjust the path to match your Python installation.)
The # Recalled Memory Context block says the search is unavailable
The block always shows the state of the memory. the memory server is still starting appears while the resident server starts and does not answer yet —
send the next message a little later. While the first start downloads the
embedding model, the server already answers: the search uses keywords only
and a notice says the model is still loading; the vectors are added later
automatically. Other reasons name the cause (see <server.log path>,
another N3MC server on the port, Redis unreachable). A > ⚠️ N3MC notice:
line tells you what to do, for example docker start redis-stack.
License
Apache License 2.0 — see LICENSE. Portions are derived from N3MC-Free (Apache License 2.0, same author) — see NOTICE and MODIFICATIONS.md.
MCP Registry: mcp-name: io.github.NeuralNexusNote/n3mc-workingmemory
Available Tools
7 toolsdelete_memories_by_sessionA
Delete every memory (singles, parent docs, child chunks, sha guards) whose session_id matches. Scoped to the configured owner. Use this to wrap up a finished project or reset a polluted session before TTL expiry. IRREVERSIBLE — confirm session_id with the user first.
Inputs: session_id (required).
delete_memoryA
Delete a memory by ID (only memories of the configured owner). If the ID is a parent document (doc:), cascades to all child chunks.
Inputs: id (required).
list_memoriesA
List stored memories newest first. Parent documents shown with [doc×N] tag.
Inputs: limit.
recall_threadA
§4.3.1 — Retrieve the memories sharing a turn_id plus N entries before and after in chronological order. Use this when a search_memory hit lacks enough context: pass the hit's turn_id here to surface the surrounding conversation thread. Only entries of the session of that turn are returned. Returns {status:'not_found'} if turn_id is unknown, and {status:'ambiguous', session_ids} if the turn_id is in several sessions: call again with one of them as session_id.
Inputs: turn_id (required), after, before, session_id.
repair_memoryA
Re-ensure the RediSearch index (idempotent) and add missing vectors (up to 200 per call) to entries saved while the embedding model was unavailable. Returns {status, message, reembedded, remaining}.
Inputs: no named parameters.
save_memoryA
Save a memory entry (Lite: 7-day TTL). Rejects exact duplicates only; an updated fact or a re-made document is saved as a new entry (search_memory lists the newest version first). Long content (>chunk_threshold chars) is chunked with a parent-document for verbatim recall.
Inputs: content (required), turn_id, owner_id, agent_name, +2 more.
search_memoryA
Hybrid (vector + BM25) search over stored memories. Call this at the start of every user turn. Each hit shows its saved= time; when several versions of the same content appear, the newest is listed first and is the current one. When fewer than min_results (default 3) rows pass the relevance floors, the closest dropped rows are added under 'Possibly related (weak matches — may be unrelated)': they are often unrelated — use one only when it is actually relevant to the question; if it is not, ignore it and do not mention it. NOTE: Lite memories expire 7d after they were saved.
Inputs: query (required), limit, since, until, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a distinct verb+target: save/search/list/recall for reading and writing, delete and repair for maintenance. The only confusable pairs are delete_memory vs delete_memories_by_session and list_memories vs search_memory, but their descriptions clearly separate scope (single ID vs session) and retrieval mode (enumeration vs hybrid search).
All seven tools follow a uniform snake_case verb_noun pattern (save_memory, search_memory, list_memories, recall_thread, repair_memory, delete_memory, delete_memories_by_session). The only stylistic variation is the descriptive '_by_session' suffix, which is still consistent with the convention.
Seven tools is well-scoped for an ephemeral memory store: two write paths, three read paths, two delete paths plus a maintenance tool. No filler tools and no obvious duplication that would need pruning.
Coverage spans create (save_memory), read (list/search/recall_thread), delete (single and by session), and index maintenance (repair_memory); updates are intentionally modeled as new saves. The main gap is a direct get_memory-by-ID retrieval, forcing agents to go through search or list when they already hold an ID.
Maintenance
Related MCP Connectors
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Cross-tool persistent memory and context for AI assistants over MCP.
A personal memory you control, shared across Claude, ChatGPT, Cursor and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to retrieve and manage code context with hybrid search, project memory, and observability via MCP tools.30MIT
- AlicenseAqualityDmaintenanceProvides persistent, searchable memory for AI agents across any MCP-compatible client, storing project context, user preferences, and session learnings locally in SQLite with tools to save, retrieve, search, and manage them.12MIT
- AlicenseAqualityBmaintenanceMCP-native persistent memory layer for AI agents across Claude Code, Cursor, VS Code, and OpenClaw. Powered by hybrid vector search, BM25, and cross-encoder reranking with a published 73.1% LoCoMo benchmark accuracy.41Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides persistent memory for AI coding agents, enabling them to save, search (hybrid vector/BM25/concept graph), list sessions, and forget memories via MCP tools.11 npmApache 2.0