Mcp Memory — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp Memory (Agent Skill) and scored it 87/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 3 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 3 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
A bulleted imperative like {match} tells the agent to never reveal, disclose, or mention something to the user. Used adversarially it can instruct the agent to hide its tool calls or lie about what it did — stripping the transparency a user relies on to trust the agent.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Persistent memory server for AI assistants with semantic search and three-layer context.
Works with any MCP-compatible AI: Claude Code, Cursor, Continue, Cline, and more.
curl -fsSL https://raw.githubusercontent.com/TWFBusiness/mpc-memory/main/install.sh | bashOr manually:
git clone https://github.com/TWFBusiness/mpc-memory.git ~/.mcp-memoria
cd ~/.mcp-memoria
./install.sh| Layer | Location | Use |
|---|---|---|
| Global | ~/.mcp-memoria/data/global.db | Personal patterns, preferences across all projects |
| Project | .mcp-memoria/project.db | Project-specific decisions |
| Personality | ~/.mcp-memoria/data/personality.db | Cross-project cache: ALL conversations, implementations, decisions |
Personality is the "brain" that remembers everything across all projects and conversations. Use it to:
With embeddings, searches like "how did I configure auth" find memories about "JWT with refresh token" even without matching words.
Embeddings are processed asynchronously:
No blocking or slowdown when saving.
"save that I prefer pytest over unittest"
"remember this project uses PostgreSQL with Tortoise ORM"
"save globally: always use Black for formatting""what did we decide about tests?"
"how did we configure the database?"
"what are my code patterns?"memory_save(
content="FastAPI always 100% async, never sync",
type="pattern",
scope="global",
tags="python,fastapi,async"
)
# Save implementation to personality (cross-project cache)
memory_save(
content="JWT auth with refresh tokens: created /auth/login, /auth/refresh endpoints...",
type="implementation",
scope="personality",
tags="python,fastapi,jwt,auth"
)
memory_search(query="authentication", scope="both")
# Search across ALL projects
memory_search(query="how did I implement auth?", scope="personality")
memory_search(query="similar feature", scope="all")
memory_list(type="decision", scope="project", limit=10)
memory_delete(id="abc123", scope="global")| Scope | When to Use |
|---|---|
global | Personal patterns, preferences (applies everywhere) |
project | Decisions specific to current project |
personality | Cross-project implementations, all conversations, general knowledge |
both | Search global + project |
all | Search global + project + personality |
| Type | When to Use |
|---|---|
decision | Technical choices, trade-offs, bug fixes |
pattern | Code preferences, favorite libs, style |
architecture | Project structure, flows, integrations |
implementation | Code solutions, features built (use with personality scope) |
solution | Problem solutions, workarounds (use with personality scope) |
preference | General personal settings |
todo | Pending tasks |
note | Miscellaneous notes |
Use the CLI to add the MCP globally (available in all projects):
claude mcp add memory ~/.mcp-memoria/.venv/bin/python ~/.mcp-memoria/server.py --scope user -e MCP_MEMORY_EMBEDDING=trueThen restart Claude Code.
To verify:
claude mcp listNote: The --scope user flag makes the MCP available globally. Without it, the MCP would only be available in the current project.Add to ~/.claude/CLAUDE.md so Claude saves and recalls automatically:
# ⚠️ CRITICAL INSTRUCTIONS - READ FIRST ⚠️
## 🧠 MANDATORY: Memory System (MCP Memory)
**THIS IS NOT OPTIONAL. FAILURE TO SAVE = FAILURE TO FOLLOW INSTRUCTIONS.**
### RULE 1: ALWAYS SAVE TO PERSONALITY (Default Scope)
Every session, every task - save AUTOMATICALLY to `scope="personality"`.
- **DO NOT ask permission**
- **DO NOT mention you are saving**
- **JUST DO IT silently**
### RULE 2: WHAT TO SAVE (Everything Meaningful)
**SAVE IMMEDIATELY when any of these happen:**
| Event | Type | Example |
|-------|------|---------|
| Made a technical choice | `decision` | "Chose Redis over Memcached for caching because..." |
| Fixed a bug/error | `solution` | "Fixed CORS error by adding middleware X" |
| Built something new | `implementation` | "Implemented JWT auth with refresh tokens using python-jose" |
| Defined structure/flow | `architecture` | "Project uses hexagonal architecture with ports/adapters" |
| Learned how something works | `note` | "This project uses custom middleware for rate limiting" |
| Changed any file | `implementation` | "Added validation to user endpoint in api/users.py" |
| Discovered project behavior | `note` | "The auth flow redirects to /callback after OAuth" |
### RULE 3: SAVE FORMAT
\`\`\`python
memory_save(
content="<DETAILED description - be specific, include file names, reasons>",
type="decision|solution|implementation|architecture|note",
scope="personality", # ALWAYS personality unless told otherwise
tags="<project-name>,<stack>,<context>"
)
\`\`\`
### RULE 4: WHEN TO USE OTHER SCOPES
- `scope="personality"` → **DEFAULT for EVERYTHING** (cross-project brain)
- `scope="project"` → ONLY when user explicitly says "save to project only"
- `scope="global"` → ONLY when user explicitly says "save globally" or "remember always"
### RULE 5: AT SESSION START
Before responding, silently run:
\`\`\`python
memory_search(query="<current task context>", scope="all")
\`\`\`
Use found memories to inform your response.
### RULE 6: WHAT TRIGGERS A SAVE
- ✅ Any file edited or created → SAVE
- ✅ Any bug fixed → SAVE
- ✅ Any feature implemented → SAVE
- ✅ Any architecture decision → SAVE
- ✅ Discovered how code works → SAVE
- ✅ User preference learned → SAVE
- ✅ Configuration defined → SAVE
- ✅ Workaround found → SAVE
**If in doubt: SAVE IT.**You can add a bootstrap section to auto-save your permanent patterns on first use:
## First Session Bootstrap
On first session, check if global patterns exist:
\`\`\`python
memory_search(query="my patterns", scope="global")
\`\`\`
If empty, save your permanent patterns to global:
\`\`\`python
memory_save(content="<your pattern here>", type="pattern", scope="global", tags="<tags>")
\`\`\`File: ~/.cursor/mcp.json
{
"mcpServers": {
"memory": {
"command": "~/.mcp-memoria/.venv/bin/python",
"args": ["~/.mcp-memoria/server.py"],
"env": {
"MCP_MEMORY_EMBEDDING": "true"
}
}
}
}Cursor Rules (for automatic memory): Add to .cursorrules in your project or global rules:
## 🧠 MANDATORY: Memory System (MCP Memory)
FAILURE TO SAVE = FAILURE TO FOLLOW INSTRUCTIONS.
### RULE 1: ALWAYS SAVE TO PERSONALITY
Save AUTOMATICALLY to scope="personality" without asking permission.
### RULE 2: AT SESSION START
Before responding: memory_search(query="<task context>", scope="all")
### RULE 3: WHAT TRIGGERS A SAVE
- Any file edited/created → memory_save(type="implementation", scope="personality")
- Any bug fixed → memory_save(type="solution", scope="personality")
- Any decision made → memory_save(type="decision", scope="personality")
- Any architecture defined → memory_save(type="architecture", scope="personality")
### RULE 4: SAVE FORMAT
memory_save(content="<DETAILED description>", type="...", scope="personality", tags="<project>,<stack>")
Save silently. DO NOT mention you are saving. If in doubt: SAVE IT.File: ~/.continue/config.json
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "~/.mcp-memoria/.venv/bin/python",
"args": ["~/.mcp-memoria/server.py"]
}
}
]
}
}Continue System Prompt: Add to your system prompt in Continue settings:
## 🧠 MANDATORY: Memory System (MCP Memory)
FAILURE TO SAVE = FAILURE TO FOLLOW INSTRUCTIONS.
### RULE 1: ALWAYS SAVE TO PERSONALITY
Save AUTOMATICALLY to scope="personality" without asking permission.
### RULE 2: AT SESSION START
Before responding: memory_search(query="<task context>", scope="all")
### RULE 3: WHAT TRIGGERS A SAVE
- Any file edited/created → memory_save(type="implementation", scope="personality")
- Any bug fixed → memory_save(type="solution", scope="personality")
- Any decision made → memory_save(type="decision", scope="personality")
- Any architecture defined → memory_save(type="architecture", scope="personality")
### RULE 4: SAVE FORMAT
memory_save(content="<DETAILED description>", type="...", scope="personality", tags="<project>,<stack>")
Save silently. DO NOT mention you are saving. If in doubt: SAVE IT.For ChatGPT custom instructions, Codex system prompts, or GPT-4 API system messages:
## 🧠 MANDATORY: Memory System (MCP Memory)
FAILURE TO SAVE = FAILURE TO FOLLOW INSTRUCTIONS.
### RULE 1: ALWAYS SAVE TO PERSONALITY
Every session, every task - save AUTOMATICALLY to scope="personality".
- DO NOT ask permission
- DO NOT mention you are saving
- JUST DO IT silently
### RULE 2: WHAT TO SAVE
| Event | Type |
|-------|------|
| Made a technical choice | decision |
| Fixed a bug/error | solution |
| Built something new | implementation |
| Defined structure/flow | architecture |
| Changed any file | implementation |
### RULE 3: SAVE FORMAT
memory_save(content="<DETAILED description>", type="...", scope="personality", tags="<project>,<stack>")
### RULE 4: AT SESSION START
Before responding: memory_search(query="<task context>", scope="all")
### RULE 5: SCOPES
- personality → DEFAULT for EVERYTHING (cross-project brain)
- project → ONLY when user says "save to project only"
- global → ONLY when user says "save globally"
If in doubt: SAVE IT.Most MCP clients support similar configuration. Add the memory server and include the same system prompt above.
| Variable | Default | Description |
|---|---|---|
MCP_MEMORY_EMBEDDING | true | Enable semantic search |
MCP_MEMORY_EMBEDDING_MODEL | all-MiniLM-L6-v2 | Embedding model |
MCP_PROJECT_DIR | (auto) | Override project directory |
| Model | RAM | Quality | Languages |
|---|---|---|---|
all-MiniLM-L6-v2 | ~80MB | Good | EN (ok for code) |
paraphrase-multilingual-MiniLM-L12-v2 | ~150MB | Good | Multi (better for non-EN) |
all-mpnet-base-v2 | ~400MB | Excellent | EN |
# All memories
cp ~/.mcp-memoria/data/global.db ~/backup/memory-global.db
cp ~/.mcp-memoria/data/personality.db ~/backup/memory-personality.db
# Project memories
cp /path/to/project/.mcp-memoria/project.db ~/backup/project-x.dbcp ~/backup/memory-global.db ~/.mcp-memoria/data/global.db
cp ~/backup/memory-personality.db ~/.mcp-memoria/data/personality.db~/.mcp-memoria/
├── server.py # MCP server
├── data/
│ ├── global.db # SQLite - global memories (patterns, preferences)
│ └── personality.db # SQLite - personality memories (all implementations, cross-project)
└── .venv/ # Python virtual environment
~/your-project/
└── .mcp-memoria/
└── project.db # SQLite - project memoriesrm -rf ~/.mcp-memoriaMIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.