Sentinel-Memory MCP
Click on "Install 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., "@Sentinel-Memory MCPsearch memory for authentication issues"
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.
Sentinel-Memory MCP
A lightweight MCP server that records and reuses Prompt Gaps — essential context missing from initial instructions — so your AI assistant learns from every session.
No vector databases. No ML models. Just a plain JSONL file tracked by Git.
How It Works
Every time your AI assistant works on a task, it encounters information that was never in the original instructions but turned out to be critical. Sentinel-Memory captures those gaps and surfaces them automatically at the start of the next related task.
[Before task] search_memory() → past lessons + questions to ask
[After task] log_memory() → what was missing, what to remember
[When full] compact_memory() → group logs by topic for Claude to summarize
compact_memory_delete() → remove originals after principle is savedMemory is stored in .context/memory_log.jsonl inside your project — a plain text file you can read, diff, and commit like any other source file.
Related MCP server: kb
Features
Zero ML dependencies — no embeddings, no model downloads
Git-native storage — plain JSONL, human-readable, fully diffable
Claude judges relevance — returns all records; Claude picks what matters
Topic normalization — similar topics merged during compaction
Atomic writes — temp file + rename, safe against crashes
Cross-platform file locking — directory-based lock, works on Windows and Linux
Sensitive data filtering — API keys and tokens redacted before storage
npx-ready — no installation required once published to npm
Requirements
Node.js 18+
An MCP-compatible client (Cursor, Claude Code, etc.)
Installation
Option A — npx (after npm publish, no installation needed)
Copy .cursor/mcp.json.example to .cursor/mcp.json in your project:
{
"mcpServers": {
"sentinel-memory": {
"command": "npx",
"args": ["-y", "@vncy/sentinel-memory-mcp"]
}
}
}Cursor automatically sets the working directory to the workspace root when launching MCP servers, so no cwd is needed. .context/memory_log.jsonl is created in the project root on first use.
Option B — local build
git clone https://github.com/your-org/dug-sentinel-memory-mcp.git
cd dug-sentinel-memory-mcp
npm install
npm run buildThen reference the built file directly in .cursor/mcp.json:
{
"mcpServers": {
"sentinel-memory": {
"command": "node",
"args": ["/absolute/path/to/dug-sentinel-memory-mcp/dist/server.js"]
}
}
}
.cursor/mcp.jsonis listed in.gitignore. Copy.cursor/mcp.json.exampleand edit locally — no need to commit your personal paths.
Project path per developer
Each developer keeps their own .cursor/mcp.json (git-ignored). Cursor sets the working directory to the workspace root automatically, so every developer gets their own .context/ without any path configuration.
Developer A opens ProjectA → MCP CWD = ProjectA/ → ProjectA/.context/memory_log.jsonl
Developer B opens ProjectB → MCP CWD = ProjectB/ → ProjectB/.context/memory_log.jsonlTools
search_memory(query, topic?)
Call this before starting any task. Returns all past records (filtered by topic if specified). Claude reads the output and selects relevant lessons.
Parameter | Type | Description |
| string | Task description or keywords |
| string (optional) | Exact-match topic filter |
log_memory(topic, missing_context, lesson, ask_next_time?, type?, compact_threshold?)
Call this after completing any task. Records what was missing and what to remember.
Parameter | Type | Description |
| string | Module/feature tag (e.g. |
| string | Info absent from original instructions but critical |
| string | Rule to apply in future tasks |
| string (optional) | Question to ask the user next time |
| string (optional) |
|
| int (optional) | Compaction trigger count (default: 50) |
compact_memory(target_topic?, compact_threshold?)
Call this when record count exceeds the threshold. Returns grouped records for Claude to summarize into principles.
compact_memory_delete(ids)
Call this only after log_memory(type="principle") succeeds. Deletes the original log records by id.
Workflow (.cursorrules)
The .cursorrules file enforces the 3-step loop for every task:
You are the Memory Manager for this project.
All tasks are grounded in .context/memory_log.jsonl.
IMPORTANT: Do NOT write any code or edit any file before completing Step 1.
[Before every task — REQUIRED]
1. Call search_memory with a description of the current task.
2. Read the returned records and identify lessons relevant to this task.
3. If relevant records exist:
- Apply the lessons directly to your approach.
- Ask the user the questions listed in ask_next_time before proceeding.
4. If no relevant records exist:
- Do not guess constraints. Ask the user about key requirements first.
[After every task — REQUIRED]
5. Call log_memory with:
- missing_context ← info absent from the initial instructions but turned out critical
- lesson ← rule to apply in future tasks of this type
- ask_next_time ← question to ask the user before starting similar tasks
[Topic naming rules]
- Use module- or feature-level granularity (language/framework agnostic).
- Good examples : auth, payment, api-gateway, ui-form, db-migration
- Too narrow (forbidden) : login_bug_fix_2026, verify_token_v2
- Too broad (forbidden) : code, backend, fix
- Check existing topics first. Reuse a close match instead of creating a new one.
e.g. if "auth-login" exists, use it instead of creating "authentication"
[Compaction — REQUIRED when record count exceeds 50]
6. Call compact_memory to receive records grouped by topic.
7. Merge similar topics (e.g. "auth", "auth-login" → "auth").
8. Summarize each topic's lessons into one concise sentence.
9. Merge each topic's ask_next_time values; keep under 512 bytes total.
10. Call log_memory(type="principle", ...) to store the summary.
11. After confirming the principle is saved, call compact_memory_delete(ids=[...]) to remove originals.
Skipping any step in this sequence is not allowed.Data format
Records are stored one JSON object per line in .context/memory_log.jsonl.
Log record:
{
"id": "a1b2c3d4e5f6a7b8",
"type": "log",
"topic": "payment",
"missing_context": "VAT rates differ by country — not mentioned in the brief",
"lesson": "Always check the country-specific tax rate file before modifying payment logic",
"ask_next_time": "Which countries does this change apply to?",
"meta": { "created": "2026-02-27T10:30:00.000Z" }
}Principle record (after compaction):
{
"id": "b2c3d4e5f6a7b8c9",
"type": "principle",
"topic": "payment",
"missing_context": "",
"lesson": "Payment module: verify country tax rates, keep refund API separate, PG timeout is 10s",
"ask_next_time": "Which countries apply? Which payment gateway?",
"meta": {
"created": "2026-03-15T09:00:00.000Z",
"compacted_at": "2026-03-15T09:00:00.000Z",
"source_count": 7
}
}Field | Limit | On exceed |
| 64 bytes (UTF-8) | Error |
| 1,024 bytes (UTF-8) | Error |
| 1,024 bytes (UTF-8) | Error |
| 512 bytes (UTF-8) | Error |
File structure
your-project/
├── .cursor/
│ ├── mcp.json ← git-ignored, copy from mcp.json.example
│ └── mcp.json.example ← committed template
└── .context/
└── memory_log.jsonl ← auto-created, commit this file
dug-sentinel-memory-mcp/ ← this repository
├── src/
│ ├── server.ts ← MCP tools (4 tools)
│ ├── store.ts ← JSONL CRUD + file lock + atomic write
│ └── sanitizer.ts ← sensitive data filter
├── dist/ ← compiled output (generated by npm run build)
├── .cursor/
│ └── mcp.json.example ← configuration template
├── docs/
│ ├── Design.md
│ └── Design_KR.md
├── package.json
├── tsconfig.json
├── .cursorrules
└── .gitignoreSecurity notes
missing_contextandlessonfields are scanned for API keys, tokens, and secrets before storage. Detected patterns are replaced with[REDACTED]..context/memory_log.jsonlis plain text. Reviewgit diff .context/before pushing to a shared repository.For sensitive projects, add
.context/to.gitignore.
License
MIT
Available Tools
1 toolcompact_memory_deleteA
[compact_memory 후, principle 저장 성공 확인 후에만 호출] 원본 log 기록을 삭제한다. compact_memory가 반환한 id 목록만 전달하라.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | 삭제할 기록의 id 목록 (compact 호출 시점의 스냅샷 기준) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description notes the destructive action ('삭제한다') and the required precondition, but does not elaborate on irreversibility, error states, or idempotency. Given no annotations, this is adequate but could be richer.
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?
Two sentences, no filler. The condition is front-loaded, and every sentence adds essential information. Extremely efficient.
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 simple delete operation with one parameter and no output schema, the description covers the precondition, input constraints, and action. No gaps remain.
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?
The parameter 'ids' is described in the schema with snapshot reference. The tool description adds the crucial constraint 'only pass ids returned by compact_memory', which goes beyond the schema and clarifies proper usage.
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 verb ('삭제한다') and resource ('원본 log 기록'), and distinguishes its role as a cleanup step after compact_memory. No sibling tools are provided, but the purpose is unambiguous.
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?
Explicitly specifies the prerequisite condition ('compact_memory 후, principle 저장 성공 확인 후에만 호출') and the exact input constraint ('compact_memory가 반환한 id 목록만 전달하라'). This provides strong guidance on when and how to use the tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Only one tool exists, so there is no risk of confusion between tools.
The single tool uses a consistent snake_case naming convention with a verb_noun pattern.
With only one tool, the server is severely under-scoped for its apparent purpose, which involves a multi-step workflow (compact_memory, principle save, then delete).
The server lacks prerequisite tools like compact_memory and principle save, making this tool unusable on its own and the surface severely incomplete.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Persistent memory for AI agents — log and recall conversation context over MCP.
Cloud-hosted MCP server for durable AI memory
Related MCP Servers
- AlicenseAqualityAmaintenanceA local MCP server that gives AI assistants a long-term memory by capturing sessions verbatim and surfacing relevant context automatically.14816MIT
- AlicenseNot gradedqualityCmaintenanceA local MCP server that provides a shared context and learning foundation across multiple AI tools (Claude, Copilot, Codex) for multiple projects, enabling persistent knowledge, decisions, and gap reflection through note storage.MIT
- AlicenseAqualityCmaintenanceA Python MCP server that gives LLMs persistent, searchable access to project context — documentation, architecture decisions, and session notes.5AGPL 3.0
- AlicenseAqualityAmaintenanceLocal MCP server giving AI coding agents (Claude Code, Cursor, VS Code/JetBrains Copilot) a shared, persistent memory of your projects and every bug/issue faced during development. Stateless, plain-file storage (AGENTS.md + issues.jsonl) — no database.16911MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vince-Yi/-vncy-sentinel-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server