analyze_file
Returns forensic history, hidden dependencies, and risk assessment. USE THIS before modifying files.
Ask git history why a piece of code exists before you change it, and leave a lesson behind so the next session does not have to work it out again.
LABSCO SUMMARY
Every codebase has a layer of HACK, WARNING and TODO comments left by people who knew something the code does not say. Treating those as a retrievable memory store, rather than as decoration a linter ignores, gets value out of work that has already been done — no adoption cost, no discipline required from the team. The rest of the surface is a familiar shape done thoughtfully: history search for intent, context before a write, lessons after one. Note that ask_history's own description tells you it needs short specific keywords, which is an admission that the search is keyword matching and not semantic — worth knowing before an agent asks it a sentence-shaped question and reads the empty result as an absence of history.
A code-memory server in two halves: forensics over the repository's own history, and a store of lessons an agent writes for its successors. Six tools covering file analysis, history search, context retrieval, lesson capture, comment extraction and search.
Nothing to supply for the local path. Some behaviour changes when a cloud backend is configured, which extract_memories notes in its own description.
One command — npm install -g @byronwade/memoria
USE CASES
Search history for the intent behind the code, and read the file's forensic history, dependencies and risk assessment first.
Extract the IMPORTANT, WARNING, HACK and TODO comments as searchable memory, then query them when a related file comes up.
Save the decision or the dead end you just found, so the next agent starts from it instead of rediscovering it.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
analyze_fileReturns forensic history, hidden dependencies, and risk assessment. USE THIS before modifying files.
ask_historySearch git history for WHY code was written. IMPORTANT: Use SHORT, SPECIFIC KEYWORDS (e.g., 'serialization', 'race condition', 'timeout'). Do NOT use full sentences or long descriptions - they will return 0 results. Use when asking 'why does this exist?' or before removing code.
extract_memoriesExtract memories from code comments (IMPORTANT, WARNING, HACK, TODO, etc.). When cloud is configured, automatically saves high-confidence (>=70%) memories. Use to find and capture implicit knowledge in code.
get_contextGet relevant memories and context before modifying a file. Returns memories, code graph relationships, and recent high-risk commits. Auto-saves critical discoveries when cloud is configured.
save_lessonSave a lesson, context, or decision for future AI sessions. Use this when you discover important context that should be remembered.
search_memoriesSearch extracted memories using BM25 keyword matching. FREE feature. Find relevant context from code comments using natural language queries.
BEFORE YOU INSTALL
6 tools when we connected. Only analyze_file and ask_history are documented; extract_memories, get_context, save_lesson and search_memories are available but undocumented.
CONTEXT COST
Rated by the size of the 6 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npm install -g @byronwade/memoria{
"mcpServers": {
"memoria": {
"command": "npx",
"args": [
"-y",
"@byronwade/memoria"
]
}
}
}{
"servers": {
"memoria": {
"command": "npx",
"args": [
"-y",
"@byronwade/memoria"
]
}
}
}claude mcp add memoria -- npx -y @byronwade/memoria{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@byronwade/memoria"
]
}
}
]
}
}