LatentContext MCP Server
LatentContext is a local stdio MCP server that gives an assistant persistent session memory, whole-project code intelligence, and stateful plan-driven code review.
Session memory — start a fresh, isolated session (
session_start), store detailed notes/facts/preferences/events/summaries (memory_store), retrieve relevant context within a token budget (memory_retrieve), compress working/session/epoch memory (memory_compress), deprecate/correct/delete memories (memory_forget), and inspect storage stats and the active session ID (memory_status).Code intelligence —
code_exploreaccepts symbol names,Owner.member, file paths, or plain questions and returns line-numbered source, call paths, references/callees, and impact, backed by a tree-sitter index of 19 languages kept fresh by file watchers.Stateful code review —
review_start,review_chunk,review_status, andreview_endrun plan-driven reviews with selectable lenses, syntax and security checks, debug-leftover detection, patch hints, caller impact, and verdicts/step tracking that survive restarts.Memory resources and prompts —
memory://core,memory://session/current,memory://graph/schema,memory://stats, plusextract_facts,compress_session, andconsolidate_epochprompt templates.Deployment — runs in-process over stdio with no database server, API keys, native build, or per-call child processes; state lives in
.latentcontext/(orLATENTCONTEXT_DATA_DIR) and works with Claude Code/Desktop, Cursor, VS Code, Windsurf, Codex CLI, and Gemini CLI.Schema caveat — the schema supplied here exposes only the six memory tools;
code_exploreand the fourreview_*tools documented in the README are not present in it.
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., "@LatentContext MCP Serverstore a note that I decided to use React for the frontend"
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.
LatentContext
Session memory, a knowledge graph, a live code index, and stateful code review for any MCP host.
Quick start · Code intelligence · Code review · Memory · Host setup · Configuration · Development
LatentContext is a local Model Context Protocol server. It gives an assistant three things it normally lacks:
A memory that survives the context window: notes, session summaries, a knowledge graph, and optional local embeddings in SQLite.
A map of your code: a tree-sitter index of every symbol, call, and reference in the project, kept fresh by file watchers and answered in one tool call.
A review ledger: plan-driven code review with syntax and security checks, caller impact, verdicts, and step tracking.
Everything runs in-process over stdio. No database server, no native build step, no API keys, and no child processes per tool call.
New in 3.0: LatentContext now covers memory, code intelligence, and code review in one server. code_explore indexes 19 languages with tree-sitter. Four review_* tools run plan-driven reviews with syntax and security checks. Project state in .latentcontext/ keeps itself out of git. See the changelog.
Tools at a glance
Area | Tool | What it does |
🧭 Code | Finds symbols by name, file, or question. Returns their source, call paths, references, and impact. | |
🔍 Review | Registers plan steps and picks a review lens. | |
Checks a changed chunk and returns a verdict, merged findings, patch hints, and caller context. | ||
Lists live reviews, or shows one review's steps and open findings. | ||
Deletes a review and its history. | ||
🧠 Memory | Starts a fresh session and archives the previous one. | |
Records a note, decision, fact, or event. | ||
Returns relevant context within a token budget. | ||
Compresses working memory or summaries. | ||
Deprecates, corrects, or deletes a memory. | ||
Reports storage and session statistics. |
Related MCP server: DataDam Personal Data MCP Server
Highlights
🧭 One-call code exploration |
|
⚡ Built for speed | Parsing and scanning run on a worker-thread pool. Results live in in-memory indexes. A compact v8 snapshot makes restarts near-instant. |
🔄 Always current | Native recursive watchers on Windows and macOS, per-directory watchers on Linux. Only changed files are re-parsed. |
🪟 Quiet on Windows | Tool calls spawn no processes, so no console windows flash. Worker threads do all the heavy work. |
🌍 19 languages | TypeScript, TSX, JavaScript, Python, Rust, Go, Java, C#, C, C++, Ruby, PHP, Kotlin, Scala, Lua, Zig, Elixir, Bash, PowerShell. |
🔍 Stateful code review | Plan steps, review lenses, syntax and security checks in 19 languages, caller impact, verdicts, and patch hints that persist across restarts. |
🧠 Session memory | Tiered working memory, compression, a knowledge graph, and semantic retrieval within a token budget. |
🔌 Works everywhere | Portable JSON Schema, tool annotations, output schemas, and server instructions for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex CLI, Gemini CLI, and more. |
Quick start
npx -y latentcontext-mcp@latestMost hosts take the same block:
{
"mcpServers": {
"latentcontext": {
"command": "npx",
"args": ["-y", "latentcontext-mcp@latest"]
}
}
}For faster starts, install globally withnpm install -g latentcontext-mcp and use "command": "latentcontext-mcp".
Restart the host after you change its configuration. Requires Node.js 20 or later.
Code intelligence
code_explore
Ask in whatever form is natural. The tool finds the right symbols and returns their verbatim source with line numbers, so the model can edit from it directly.
code_explore { "query": "how does createServer register tools" }
code_explore { "query": "UserService.load handleRequest" }
code_explore { "query": "src/server.ts" }Argument | Default | Purpose |
| required | Symbol names, |
| client roots | Absolute project directory, to explore a project other than the current one. |
|
| Maximum files whose source is included. |
|
| Upper bound on response size. |
A real response for "referencesTo resolveRef" on this repository, trimmed for length:
27 files, 495 symbols indexed.
## src/code-explore.ts
function resolveRef L91-105 · function referencesTo L107-113
91 export function resolveRef(ref: CodeRef): CodeSymbol[] {
92 const defs = ref.file.index.defsByName.get(ref.name);
93 if (!defs) return [];
94 if (defs.size === 1) return [...defs];
⋮
107 function referencesTo(symbol: CodeSymbol): CodeRef[] {
108 const refs = symbol.file.index.refsByName.get(symbol.name);
109 if (!refs) return [];
110 const result: CodeRef[] = [];
111 for (const ref of refs) if (ref.from !== symbol && resolveRef(ref).includes(symbol)) result.push(ref);
112 return result.sort((a, b) => Number(b.kind === "call") - Number(a.kind === "call"));
113 }
## Call paths
referencesTo → resolveRef
## References and calls
resolveRef ← referencesTo src/code-explore.ts:111, callees src/code-explore.ts:120
resolveRef → directoryOf src/code-explore.ts:87
referencesTo ← impactOf src/code-explore.ts:212, explore src/code-explore.ts:376
## Impact
6 symbols in 2 files reach resolveRef within 3 hops.Performance
Measured on Windows 10 with Node.js 24:
Workload | Files | Symbols | Cold index | Restart from cache | Warm query |
Rust + TypeScript app | 715 | 23,341 | 1.3 s | 0.4 s | 9–92 ms |
Folder of 40+ projects | 8,080 | 136,807 | 4.9 s | — | 92 ms |
An edit is visible on the next call, typically within a few milliseconds.
How it works
flowchart LR
A[Project files] -->|scan + .gitignore| B(Worker pool)
B -->|tree-sitter WASM| C[Symbols + references]
C --> D[(In-memory indexes)]
D -->|v8 snapshot| E[(Cache on disk)]
F[File watchers] -->|dirty paths| D
G[code_explore] --> D
D --> H[Ranked source + call graph]Scan. A worker walks the project, honours nested
.gitignorefiles, and skips dependency and build caches such asnode_modules,.venv, and.next.Parse. Changed files are parsed in parallel by up to eight worker threads. Each language has its own query for definitions, calls, inheritance, imports, and type references.
Index. Symbols land in hash maps keyed by exact name, by sub-word (
loadUserProfile→load,user,profile), and by reference name. Updates are incremental per file.Rank. Queries are scored by exact and owner-qualified name hits, case-folded matches, IDF-weighted sub-words, prefixes, and file paths.
Connect. The top matches are linked by a bounded breadth-first search over the call graph. Intermediate functions on a path are pulled into the result.
Render. Source is read fresh from disk, merged into line ranges, and trimmed to the token budget. Large classes are shown as an outline of their members.
Freshness
Platform | Watcher | On change |
Windows, macOS | One native recursive watcher | Re-parse only the touched files |
Linux | One watcher per indexed directory | Re-parse only the touched files |
Any, if watching fails | None | Fast full rescan in a worker before each query |
A .gitignore edit or a large burst of changes, such as a branch switch, triggers one rescan. The index persists to <data dir>/code-index/ and is reused on the next start.
Supported languages
Language | Extensions |
TypeScript / TSX |
|
JavaScript |
|
Python |
|
Rust |
|
Go |
|
Java |
|
C# |
|
C / C++ |
|
Ruby |
|
PHP |
|
Kotlin |
|
Scala |
|
Lua |
|
Zig |
|
Elixir |
|
Bash |
|
PowerShell |
|
Choosing the project
The project to index is picked in this order:
The
rootargument of the call.LATENTCONTEXT_CODE_ROOT(several paths may be joined with the platform path delimiter).The roots the MCP client reports.
The server's working directory, if it looks like a project (
.git,package.json,Cargo.toml,go.mod,pyproject.toml, and similar).
The home directory and drive roots are never indexed.
Code review
Four tools run a stateful review against a plan. The model does the judging; the server adds deterministic checks, caller impact from the code index, a verdict, and a ledger that survives restarts.
Tool | Use | Annotations |
| Register plan steps and pick a review lens. Returns the review ID and the lens text. | |
| Submit a changed chunk for one step, with your own findings. Returns the verdict, merged findings, patch hints, and caller context. | |
| List live reviews, or show one review's steps, last verdicts, and open findings. | read-only |
| Delete a review and its chunk history. | destructive, idempotent |
review_start { "steps": ["Harden path handling", "Remove shell calls"], "profile": "cybersec-auditor-general-v2.0" }
review_chunk { "review_id": "…", "step": 2, "file": "src/run.ts", "code": "…", "findings": [{ "severity": "high", "category": "logic", "message": "Exit code is ignored.", "line": 4 }] }What review_chunk adds on top of your findings:
Syntax: tree-sitter parse errors and missing tokens for all 19 indexed languages.
Security: language-aware rules for
eval, shell execution, unsafe deserialization, raw HTML sinks, disabled TLS checks, SQL built by interpolation, unbounded C buffer writes, hardcoded secrets, private keys, and AWS keys.Debug leftovers:
debugger,pdb.set_trace(),breakpoint(), anddbg!.Patch hints: exact search and replace pairs, only where a drop-in fix exists (for example
yaml.load(→yaml.safe_load(, or a hardcoded JS secret →process.env.NAME).Context: for each symbol the chunk defines (or the
symbolyou name), its references, first callers, and impact from the code index.
Any critical or high finding makes the verdict NEEDS_WORK and keeps the step IN_PROGRESS; otherwise the step is VALIDATED. A review is COMPLETED when every step is validated. Finding lines are relative to the chunk; context lines are relative to the file. Reviews expire 7 days after their last update.
Review lenses
A lens is a Markdown prompt that sets what the review looks for. Four ship with the package: universal-auditor-general-v3 (the default), cybersec-auditor-general-v2.0, performance-reliability-auditor-v2.0, and design-audit-director-v2.0. The profile argument is an enum of the available lenses, so hosts show them without an extra tool. Set LATENTCONTEXT_REVIEW_PROFILES to a directory of *.md files to use your own; the file name is the ID and the first # heading is the title.
Memory
Tool | Use | Annotations |
| Start a session; any active session is archived first. | |
| Record a note, decision, fact, or event for the active session. | |
| Retrieve relevant session context within a token budget. | read-only |
| Compress working memory or summaries (lossy). | destructive |
| Deprecate, correct, or remove a memory. | destructive, idempotent |
| Report current storage and session statistics. | read-only |
Stored notes need at least 10 words; 25 or more are recommended. Working memory is isolated by session ID, and it is archived when a session changes or the server shuts down.
session_start, memory_store, memory_retrieve, memory_status, code_explore, review_start, review_chunk, and review_status return structuredContent that matches a published outputSchema.
URI | Content |
| Persistent Tier 3 core memories. |
| Working memory for the active session. |
| Entity types and relation predicates (JSON). |
| Storage statistics (JSON). |
extract_facts, compress_session, and consolidate_epoch are prompt templates. They turn text into fact triples, summarize working memory, and merge session summaries.
Host setup
claude mcp add latentcontext --scope user -- npx -y latentcontext-mcp@latestUse --scope project to share the configuration through .mcp.json.
Add the mcpServers block from Quick start to claude_desktop_config.json (Settings → Developer → Edit Config).
Add the mcpServers block to .cursor/mcp.json in the project, or to ~/.cursor/mcp.json for all projects.
Create .vscode/mcp.json:
{
"servers": {
"latentcontext": {
"type": "stdio",
"command": "npx",
"args": ["-y", "latentcontext-mcp@latest"]
}
}
}Add the mcpServers block to ~/.codeium/windsurf/mcp_config.json.
Add to ~/.codex/config.toml:
[mcp_servers.latentcontext]
command = "npx"
args = ["-y", "latentcontext-mcp@latest"]Add the mcpServers block to ~/.gemini/settings.json, or to .gemini/settings.json in the project.
Configuration
Environment variables
Variable | Effect |
| Project directory (or directories) for |
| Set to |
| Directory of |
| Directory for |
| Path to a |
| Set to |
| Windows only. Set to |
Storage
Runtime state is project-local by default:
<launched-project>/.latentcontext/
├── .gitignore # "*" so the folder never reaches git
├── memory.db
├── server.log
└── code-index/<launched-project> is the working directory of the server process. The folder ignores itself, so no repository needs a .gitignore entry for it. To share memory across projects, set LATENTCONTEXT_DATA_DIR:
{
"mcpServers": {
"latentcontext": {
"command": "latentcontext-mcp",
"env": { "LATENTCONTEXT_DATA_DIR": "C:/shared/latentcontext" }
}
}
}Point LATENTCONTEXT_CONFIG at a JSON file:
{
"storage": { "dataDir": "./shared-state", "sqliteFile": "memory.db" },
"embedding": { "provider": "local" }
}A relative storage.dataDir resolves against the configuration file. The server also reads latentcontext.config.json from the default data directory or beside the installed package. A latentcontext.config.json in the launched project is ignored unless LATENTCONTEXT_ALLOW_PROJECT_CONFIG=1 is set. Use "provider": "none" to disable embeddings.
Logging
Diagnostics go to server.log in the data directory. After the MCP handshake, records at info and above are also sent as notifications/message with logger latentcontext. Clients can change the threshold with logging/setLevel. Stdout carries only protocol frames, and nothing is written to stderr.
Development
git clone https://github.com/Master0fFate/LatentContext-MCP.git
cd LatentContext-MCP
npm install
npm run buildScript | Purpose |
| Compile TypeScript and prepare the executable. |
| Run the TypeScript source directly. |
| Type-check sources, tests, and benchmarks. |
| Run the full suite over real stdio. |
| Pack, install, and exercise the packaged server. |
|
|
| Audit production dependencies. |
| Benchmark memory retrieval. |
To run a local build from a host, point it at the entry point:
{
"mcpServers": {
"latentcontext": {
"command": "node",
"args": ["/absolute/path/to/LatentContext-MCP/dist/index.js"]
}
}
}CI runs on Linux, macOS, and Windows with Node.js 20, 22, and 24.
Ifnpm install fails while onnxruntime-node downloads optional CUDA binaries (Linux x64 only), set ONNXRUNTIME_NODE_INSTALL_CUDA=skip. The server does not use them.
Grammars for TypeScript, TSX, JavaScript, Python, Rust, Go, Java, C#, C++, Ruby, PHP, Bash, and PowerShell come from @vscode/tree-sitter-wasm. The C, Kotlin, Scala, Lua, Zig, and Elixir grammars in grammars/ are the prebuilt WebAssembly files published with tree-sitter-c 0.24.1, @tree-sitter-grammars/tree-sitter-kotlin 1.1.0, tree-sitter-scala 0.24.0, @tree-sitter-grammars/tree-sitter-lua 0.4.1, @tree-sitter-grammars/tree-sitter-zig 1.1.2, and tree-sitter-elixir 0.3.5.
License
Available Tools
6 toolsmemory_compressA
Compress memory at a given scope to reduce token usage and consolidate information.
WHEN TO USE:
'working': When working memory is getting large during a long conversation. Compresses current session buffer into a summary.
'session': When there are many session summaries. Merges multiple session-level summaries into fewer entries.
'epoch': After many sessions have accumulated. Promotes session summaries into high-level long-term knowledge. Requires at least 10 session summaries.
EFFECTS:
All compression is lossy — details are condensed but key information is preserved.
Compressed data is re-embedded for semantic search.
Original entries are removed after compression.
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | Compression scope: 'working' (current session), 'session' (merge sessions), 'epoch' (long-term consolidation). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully shoulders the transparency burden. It explicitly states that compression is lossy, original entries are removed, and data is re-embedded. This disclosure is comprehensive for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (WHEN TO USE, EFFECTS). Every sentence adds value, and there is no redundancy. It is appropriately sized for a single-parameter tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one param, no output schema), the description is complete. It covers purpose, usage conditions, and behavioral effects without any gaps. An agent can confidently select and invoke this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only one parameter exists with 100% schema coverage. The description adds significant meaning beyond the schema by explaining each scope's effect and the requirement for epoch. This enriches the agent's understanding of how to select the appropriate scope.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: compressing memory to reduce token usage and consolidate information. It identifies the specific resource ('memory') and action ('compress'), and distinguishes it from siblings like memory_forget or memory_retrieve.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance for when to use each scope (working, session, epoch), including a prerequisite for epoch (at least 10 session summaries). While it doesn't explicitly state when not to use the tool, the sibling context and clear scope usage cover most decision-making needs.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_forgetA
Mark a memory as outdated, incorrect, or to be deleted.
WHEN TO USE:
When the user corrects previously stored information.
When stored facts become outdated (e.g., user changed jobs, moved cities).
When duplicate or incorrect memories need cleanup.
ACTIONS:
'deprecate': Lowers confidence score so the memory is deprioritized but not removed. Use when unsure.
'correct': Replaces the memory content with new, correct information. Requires the 'correction' parameter.
'delete': Permanently removes the memory. Use for clearly wrong or duplicate entries.
You need the memory_id which is returned when you store a memory, or visible in memory_status output.
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes | ID of the memory to modify (UUID format, returned by memory_store). | |
| action | Yes | Action to take: 'deprecate' (lower priority), 'correct' (replace content), 'delete' (remove permanently). | |
| correction | No | New content to replace the memory with. Required when action is 'correct'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description fully explains behavioral traits: effects of each action (deprecate, correct, delete), prerequisites (memory_id), and conditional parameter requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized with sections, bullet points, and clear headings. Every sentence is informative and concise, no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a modification tool with 3 parameters, conditional logic, and no output schema, the description is comprehensive. It could mention return values or effects on other operations, but current level is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. The description adds value by explaining the action enum meanings and clarifying the conditional requirement for 'correction' parameter when action='correct'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Mark a memory as outdated, incorrect, or to be deleted.' It distinguishes from siblings (memory_store, memory_retrieve) by focusing on modification/removal.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit 'WHEN TO USE' bullets covering common scenarios. Lacks explicit when NOT to use, but the context is clear. Siblings are listed externally.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_retrieveA
Retrieve memories stored in the CURRENT session. Returns only data from this conversation — no cross-session contamination.
MANDATORY — ALWAYS call this immediately after session_start. Also call before ANY task that could benefit from context stored earlier in this conversation.
WHEN TO USE:
IMMEDIATELY after session_start — to check if there is any context from earlier in this session.
When you need to recall what was discussed/decided/stored earlier in THIS conversation.
Before starting a new task step — retrieve context about what was done so far.
HOW TO USE THE RESULTS:
READ every section of the returned context carefully.
APPLY the information to your current task — this is why it was stored.
If you see stored decisions or notes, BUILD ON THEM.
Do NOT ignore retrieved context — it was stored specifically to help you.
SESSION ISOLATION:
Each session starts with ZERO entries — completely fresh.
Only returns data stored via memory_store during THIS session.
No data from past sessions, global knowledge graph, or vector store is included.
SECTIONS IN OUTPUT:
[Current Session]: What has been stored so far in this conversation.
[Current Session Notes]: Compressed notes from this session (if working memory was compressed).
TIP: Use a higher token_budget (5000-8000) for comprehensive context. Use lower (1000-2000) for focused lookups.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | What to search for. Be descriptive — include project names, tech stack, topic areas. Example: 'user website fate.rf.gd design preferences audio visualizer' rather than just 'website'. | |
| token_budget | No | Max tokens to return. Default 3000. Use 5000-8000 for broad conversation-start context. Use 1000-2000 for focused lookups. | |
| filters | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description fully discloses session isolation, cross-session contamination absence, and output sections. No contradictory statements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with headings, front-loaded core purpose. Some repetition of session isolation, but overall efficient for the amount of guidance provided.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With nested objects and no output schema, the description adequately covers what to expect (sections), usage scenarios, and tips. Could be more precise on return format, but sufficient for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Adds usage tips for token_budget (e.g., 5000-8000 for broad context) and explains the query parameter with examples. Schema already covers 67% of parameters, so description adds meaningful but not essential extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves memories from the current session, with emphasis on session isolation. This distinguishes it from siblings like memory_compress, memory_forget, etc., which are for different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit when to use: immediately after session_start and before tasks that benefit from context. Lacks explicit when-not-to-use or direct alternatives, but the context is clear and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_statusA
Get storage statistics for all memory subsystems.
WHEN TO USE:
When debugging memory-related issues.
When the user asks "what do you remember?" or "how much is stored?".
To check if session_start was called (shows current session ID).
To monitor token budgets and plan compression.
SHOWS: Tier counts, token estimates, knowledge graph size, vector store count, and current session ID.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description fully carries the burden. It discloses output contents (tier counts, token estimates, etc.) and indicates it can show session status. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise first sentence, followed by well-organized WHEN TO USE and SHOWS bullet lists. Every sentence serves a purpose; no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Completely adequate for a zero-parameter tool: describes purpose, usage guidance, and output. No gaps given the simplicity and no output schema needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0 parameters with 100% coverage, so description adds value by explaining what the tool returns (SHOWS list). Baseline for 0 params is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb and resource: 'Get storage statistics for all memory subsystems.' The SHOWS list specifies output, distinguishing it from sibling tools like memory_compress or memory_retrieve which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit WHEN TO USE bullet list covering debugging, user queries, session check, and budget monitoring. Does not explicitly state when not to use, but the context is clear and sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_storeA
Store information in long-term memory. Call this PROACTIVELY whenever you learn something new — do NOT wait to be asked.
CRITICAL — CONTENT QUALITY RULES: Your memory entries MUST be DETAILED, SELF-CONTAINED paragraphs that a future AI can read and FULLY understand WITHOUT needing to re-derive anything. Each entry should be 3-5 sentences minimum. Include WHO, WHAT, WHY, HOW, and WHERE relevant.
BAD (useless — too short, forces re-thinking): "Fixed audio issue" "User likes dark mode" "Website uses Vanta.js"
GOOD (detailed — saves tokens by preventing re-derivation): "Fixed a CORS audio playback issue on the user's website fate.rf.gd. The problem was that the audio element was trying to load files from a different origin. Solution: added crossorigin='anonymous' attribute to the element and configured the server to send Access-Control-Allow-Origin headers. The audio visualizer now works correctly with the Vanta.js background." "User strongly prefers dark mode designs with deep blue (#0a0e27) and purple (#6c63ff) accent colors. They want glassmorphism effects, smooth animations, and premium-feeling interfaces. They dislike plain/basic designs and have explicitly requested 'wow factor' aesthetics in multiple conversations." "The user's personal website at fate.rf.gd uses a multi-section single-page layout with: Vanta.js globe wireframe background animation, a music player with bass-reactive glow visualizer, glassmorphic card components, Google Fonts (Inter/Outfit), and is hosted on InfinityFree. The tech stack is vanilla HTML/CSS/JS with no framework."
REMEMBER: A memory that takes 20 tokens to store but saves a future LLM from spending 500 tokens re-analyzing is EXTREMELY valuable. Write entries as if briefing a colleague who has never seen this project before.
WHEN TO USE:
After the user tells you their name, preferences, project details, or any personal information.
After completing a task — store WHAT was done, WHY, HOW it was solved, and the OUTCOME.
When you discover important facts about the user's codebase, tech stack, architecture, or workflow.
When you make design decisions — store the decision AND the reasoning.
Whenever information might be useful in future conversations.
MEMORY TYPES (choose carefully):
'core': CRITICAL permanent facts (user identity, key project info, important preferences). Never evicted. Use sparingly — only for the 5-10 most important things.
'fact': Concrete knowledge with entities. Include full context, not just the fact. Automatically indexed in the knowledge graph.
'preference': User likes/dislikes/habits. Describe the preference with specifics (colors, styles, patterns), not just the category.
'event': What just happened in this session. Describe the task, approach, solution, and result in detail.
'summary': Compressed notes about a session or topic. Should be a dense briefing paragraph, not bullet points.
ENTITIES: Always provide relevant entity names in the 'entities' array for 'fact' type. The first entity is treated as the subject. Example: entities: ["User", "dark mode"] for "User prefers dark mode".
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | DETAILED, self-contained paragraph (3-5+ sentences). Must include full context so a future AI can understand without re-deriving. Include specifics: names, paths, colors, versions, decisions, reasoning. NEVER write single sentences — that defeats the purpose of memory. | |
| memory_type | Yes | Category: 'core' for critical permanent info, 'fact' for knowledge, 'preference' for user likes/dislikes, 'event' for what just happened, 'summary' for compressed notes. | |
| confidence | No | Confidence 0.0-1.0. Lower confidence = evicted first. Default 1.0. Use lower values for uncertain or temporary information. | |
| entities | No | Key entities this memory relates to. REQUIRED for 'fact' type — first entity is the subject. Example: ['User', 'JavaScript'] for 'User knows JavaScript'. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries full burden. It thoroughly explains behavior: proactive storing, content quality mandates, memory types with eviction rules, confidence levels, and entity indexing. This provides complete transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is long but well-structured with clear sections (CRITICAL RULES, WHEN TO USE, MEMORY TYPES). It front-loads the core purpose. Some verbosity from examples is justified for clarity, but could be slightly more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters, 2 required, no output schema, the description is exceptionally complete. It covers content quality, memory types, entities, confidence, and usage contexts. An AI agent has all necessary information to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. The description adds significant value beyond schema: good/bad examples for content, detailed explanations of each memory_type, and entity requirements. It enhances understanding without contradicting schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool stores information in long-term memory and provides a specific verb and resource. It distinguishes itself from siblings like memory_retrieve by emphasizing proactive use and content quality rules.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes extensive when-to-use guidance (e.g., after learning user info, completing tasks, discovering facts) and content quality rules. However, it lacks explicit when-not-to-use or direct comparisons to sibling tools, though the proactive call to action is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
session_startA
Start a new memory session. Call this ONCE at the very beginning of each new conversation.
MANDATORY WORKFLOW — follow these steps IN ORDER every single time:
Call session_start (this tool) FIRST.
IMMEDIATELY after, call memory_retrieve to check for any context from this session.
Throughout the conversation, call memory_store to save DETAILED notes about everything important.
SESSION ISOLATION:
Each session starts with ZERO entries — completely fresh memory.
No data from past sessions, knowledge graph, or vector store leaks in.
Only data stored via memory_store during THIS session will be retrievable.
Session IDs are timestamp-prefixed UUIDs for guaranteed uniqueness.
WHAT IT DOES:
Creates a completely fresh, empty memory for the new conversation.
Returns the new session ID.
WARNING: Always call this first to ensure session isolation.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description comprehensively covers behavior: creates fresh empty session, ensures no data leakage, returns new session ID, and guarantees isolation. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with sections and steps, but somewhat verbose. Every part adds value, though could be slightly more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, description adequately explains what is returned (session ID with timestamp-prefixed UUID). It integrates with sibling tools and covers all necessary context for initialization.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters, but description adds meaning beyond schema by explaining the session concept and its role. According to guidelines, baseline is 4 for zero params, and this is appropriately descriptive.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Start a new memory session' with a specific verb and resource. It distinguishes from sibling tools by emphasizing this is the initialization step for a new conversation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit workflow instructions: call first, then memory_retrieve, then memory_store. It also emphasizes one-time usage per conversation and warns against alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.1.1- First observed
memory_compress - First observed
memory_forget - First observed
memory_retrieve - First observed
memory_status - First observed
memory_store - First observed
session_start
TDQS
Scored across 6 tools
Each tool targets a distinct operation: compress, forget, retrieve, status, store, and session start. There is no overlap in purpose, and agents can easily distinguish when to use each.
Five of six tools follow the 'memory_verb' pattern (memory_compress, memory_forget, etc.), but 'session_start' breaks the pattern. This is a minor inconsistency, but the naming is otherwise predictable and readable.
Six tools is well-scoped for a memory management server. Each tool serves a clear, essential function without redundancy, covering storage, retrieval, compression, forgetting, status, and session lifecycle.
Core CRUD-like operations are covered (store, retrieve, forget, compress), along with status and session management. A minor gap is the lack of a cross-session search tool, but this aligns with the design principle of session isolation.
Maintenance
Related MCP Connectors
- memoryOAuthcom.leapmemory
Long-term memory for AI assistants. Isolated per-user storage, recall across conversations.
AI memory layer — one shared, persistent memory across every AI tool you connect.
Personal wiki and memory layer for AI assistants. Persistent, structured memory across sessions.
Shared project memory that keeps teammates and AI agents aligned across sessions.
Related MCP Servers
- FlicenseBqualityBmaintenanceProvides structured external memory for AI assistants, enabling persistent context, branch notes, tacit knowledge, and checklists to overcome AI memory loss and context confusion.384-
- AlicenseNot gradedqualityDmaintenanceA persistent memory layer for AI tools that decouples personal data from AI's unstable memory, enabling you to mention information once and have it remembered forever across all conversations.3MIT
- FlicenseNot gradedqualityCmaintenanceProvides session persistence, crash recovery, decision tracking, and context compression for AI assistants, enabling seamless multi-session continuity.-
- AlicenseNot gradedqualityFmaintenanceEnables persistent, portable memory for AI agents across sessions, devices, and providers with token-efficient 5-level lazy loading and automatic session capture.5 npmMIT