Context Mem MCP server
io.github.JubaKitiashvili/context-mem·v3.2.1·19 starsPersistent memory for AI agents — 98%+ retrieval recall, 99% token savings, 44 tools
19 stars179 downloads/wk
Reviews
Write oneNobody has reviewed Context Mem yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Context Mem tools (44, 3 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
add_relationshipAdd a relationship between two entities in the knowledge graph. Creates entities if they do not exist.
agent_broadcastBroadcast a message to all active agents via the event system.
agent_registerRegister the current session as a named agent for multi-agent coordination.
agent_statusList all active agents with their tasks and claimed files.
askAsk a natural language question about the project. Searches knowledge, observations, events, and graph entities.
browseBrowse observations by topic, person, or time dimension.
budget_configureConfigure budget settings (session limit, overflow strategy).
budget_statusGet current budget usage and status for the session.
claim_filesClaim files for the current agent. Returns conflicts if already claimed by another agent.
configurewrite actionUpdate a mutable configuration key at runtime.
emit_eventEmit a context event with priority and metadata.
entity_detectExtract entities (technologies, people, files, components) from text content.
executewrite actionExecute code in JavaScript, TypeScript, Python, Shell, Ruby, Go, Rust, PHP, Perl, R, or Elixir.
explain_decisionReconstruct the evidence chain behind a code change or decision. Returns the trail of events that led to a decision.
find_tunnelsFind topics that appear in 2+ projects (cross-project knowledge bridges).
generate_storyGenerate a human-readable narrative from session data. Formats: pr (pull request), standup, adr (architecture decision record), onboarding.
getRetrieve a single observation by its ID.
global_searchSearch the global cross-project knowledge store.
graph_neighborsFind all entities connected to a given entity. Faster than graph_query for simple lookups.
graph_queryQuery the knowledge graph. Find entities and their relationships.
handoff_sessionGenerate session handoff — saves state and returns continuation prompt for a new session. Use when context is running low or before ending a session.
import_conversationsImport external conversation exports (Claude, ChatGPT, Slack, plaintext) into context memory.
index_contentIndex content into the content store with code-aware chunking for later search.
list_peopleList all detected person entities with relationship counts.
list_topicsList all detected topics with observation counts.
merge_suggestionsView pending merge suggestions for duplicate global knowledge entries.
observeStore a new observation (content snippet) into context memory with automatic summarization.
predict_lossPredict which memory entries are at highest risk of being forgotten or archived. Users can pin important entries to protect them.
promote_knowledgePromote a project knowledge entry to the global cross-project knowledge store. Privacy engine sanitizes content before storing.
query_eventsQuery context events with optional filters.
recallVerbatim memory retrieval with importance filtering and rich attribution. Returns original content, not summaries.
resolve_contradictionResolve a contradiction between knowledge entries by merging, superseding, or keeping both.
restore_sessionRestore a previous session snapshot by session ID.
save_knowledgeSave a knowledge entry with automatic contradiction detection. When contradictions are found, the save is blocked — resubmit with force: true to save anyway.
searchSearch stored observations using BM25 + trigram fusion.
search_contentSearch the content store for indexed content chunks.
search_knowledgeSearch the knowledge base using 3-layer search (FTS5 → trigram → scan). Optionally include global cross-project knowledge. By default only returns currently-valid facts (valid_to IS NULL).
statsGet token economy statistics for the current session.
summarizeSummarize a piece of content using the matching summarizer plugin without storing it.
temporal_queryQuery knowledge that was valid at a specific point in time. Returns facts that were active at the given timestamp.
time_travelView or compare the project state at any point in time. Shows observations, knowledge, and events as of a target date.
timelineRetrieve observations in reverse-chronological order with optional filters.
update_profilewrite actionUpdate the project quick profile — a 3-5 line summary shown at every session start. Auto-generates from knowledge if no content provided.
wake_upGenerate a scored session primer with 4-layer context: project profile, critical knowledge, recent decisions, and top entities.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan247 source files scanned13/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 161 days ago8/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Findings (1)
- highShell command built from a string (injection risk)
exec.shell-concathooks/session-start-hook.js: …date-check.js'); const updateResult = execSync(`node "${updateScript}" 2>/dev/null`, { timeo…
How Context Mem compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 63/100
- higher than 18% of 48,255 servers
- Tools
- 44
- the typical server has 7
- Tools that change things
- 7%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 19
- more than 91% of 28,688 servers
- Downloads a week
- 179
- more than 73% of 12,191 servers with a package
What its tools let an agent do: 36 read · 4 create · 3 change · 1 run or deploy
Install Context Mem in Claude Code, Cursor or VS Code
Runs npx -y context-mem on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add context-mem -- npx -y context-mem
What the publisher says
From the Context Mem repository's README, as published. We do not edit it. Read it on GitHub
<!-- Banner placeholder: dual-pillar visual — memory wiki page + compression savings chart -->
Context Mem
Memory + context infrastructure for AI agents. Remembers everything. Compresses everything. Fully local.
-gold)
The Problem
Two problems with today's AI tooling that no one has solved together in a single package.
Your AI forgets. Every new session starts from zero. The architecture decisions you settled on last Thursday, the bug you spent four hours tracing to a misconfigured environment variable, the preferences you stated three times — none of it carries forward. You spend the first ten minutes of every session re-explaining context that already existed. Multiply this by every developer on your team, every project, every day.
Your context explodes. Long coding sessions blow past the context window. A typical session with 50 tool outputs accumulates 365 KB of raw text — stack traces, test output, file reads, shell commands. Every token costs money or slows the model. Naive truncation drops the exact evidence the model needs. Keeping everything makes responses slower and inference cost climb fast.
These two problems compound each other. The solution to forgetting (keep everything) is the opposite of the solution to context explosion (discard everything). The result is a false tradeoff most tools force on you: either your AI forgets everything, or your costs balloon. context-mem solves both simultaneously by building an indexed, compressed, retrievable memory store rather than dumping raw history into the context window.
The Solution — one tool, two pillars
Pillar 1: Memory (LLM Wiki)
Every tool call is automatically ingested, summarized, and written into a navigable markdown vault — a living wiki your AI maintains about your project. Entities get their own pages with backlinks. Topics get synthesis pages. Sessions become browseable source documents. Decisions accumulate into a reconstructible trail.
The vault lives at .context-mem/vault/ and syncs continuously from the underlying SQLite store. Read it in Obsidian, grep it from the terminal, or query it through 45+ MCP tools using hybrid BM25 + vector + optional LLM judge search. The raw SQLite store is the authoritative record; the markdown vault is the derived, human-readable layer.
This is a reference implementation of Andrej Karpathy's LLM Wiki pattern — three layers (raw sources / wiki / schema), with automatic ingest from tool calls that no other system provides.
Pillar 2: Compression (14 summarizers)
Every observation passes through a content-aware summarizer before storage. A stack trace is not treated the same way as a JSON config file. Shell output from a build is compressed differently from TypeScript compiler errors. The system applies the right compression for the content type.
The result: a full coding session with 50 tool outputs goes from 365 KB to 3.2 KB — 99.1% token savings, verified. Compression is adaptive: recent high-importance observations stay verbatim; older low-importance ones compress progressively. Pinned entries never compress regardless of age.
One Command
npm i context-mem && npx context-mem initinit auto-detects your editor and writes the right config files:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Context Mem: common questions
- Is Context Mem MCP server safe?
- With care: it is graded C, so read the findings first (63/100). Read the Context Mem safety report
- How do I install Context Mem?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Context Mem need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Context Mem maintained?
- The last commit was 199 days ago (2026-04-19). The latest release is v3.2.1.
- What can I use instead of Context Mem?
- Servers from other publishers that do the same job: Codebase Memory MCP server, Honcho MCP server and State Memory MCP server.
- How does Context Mem compare with other MCP servers?
- safety score 63/100 (higher than 18% of 48,255 servers); tools 44 (the typical server has 7); tools that change things 7% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Context Mem
Same job from other publishers: the closest match first, then the best rated.
- Codebase MemoryCodebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.not reviewedWidely usedC
- HonchoMemory that reasons: continual learning for stateful agents. Better context, fewer tokens.not reviewedEstablishedA
State Memory MCPPersistent workflow graph server tracking tasks, decisions, spatial entities, and blockers.not reviewedEstablishedA
KnowlPersistent memory for AI agents, for code, research and everyday life. Stale facts retire.not reviewedEstablishedA