BAS-More

Total Recall

Community BAS-More
Updated

๐Ÿง  Portable MCP server giving AI agents persistent, verified, cross-session memory โ€” 26 tools, 24 layers, SQLite + Supabase

Total Recall

Portable AI memory โ€” persistent, verified, universal. MCP server + REST API + Chrome Extension. Works everywhere AI does.

Quick Start โ€ข Platform Matrix โ€ข Architecture โ€ข 26 Tools โ€ข Full Manual โ€ข API Reference

The Problem

AI agents are stateless. Every session starts from zero. Mid-conversation context decays. Knowledge doesn't travel between sessions, machines, or agents โ€” and on platforms like claude.ai or ChatGPT, you can't even connect an MCP server.

Total Recall fixes this permanently, on every platform.

What It Solves

Problem Solution
Agent forgets everything between sessions Permanent knowledge base across 12 categories
Agent forgets mid-conversation Checksummed session state verified every turn
Agent repeats past mistakes Corrections loaded first + failure pattern matching
Agent claims things without proof Verification engine (files, git, claims)
Knowledge conflicts go unnoticed Contradiction detection on every write
Context window overflows Smart budget manager drops low-relevance entries
Tasks span multiple sessions Multi-session task tracking with timelines
Claude.ai and ChatGPT have no MCP support Chrome Extension bridges via REST API

Connection Matrix

Platform Connection Method Auto-Inject Auto-Capture
Claude Desktop MCP (stdio) Via tools Via tools
Claude Code MCP (stdio) Via tools Via tools
Cursor MCP (stdio) Via tools Via tools
VS Code + Continue MCP (stdio) Via tools Via tools
claude.ai Chrome Extension + REST API Yes Yes
ChatGPT Chrome Extension + REST API Yes Yes
Gemini Chrome Extension + REST API Yes Yes
Perplexity Chrome Extension + REST API Yes Yes
Microsoft Copilot Chrome Extension + REST API Yes Yes
Poe Chrome Extension + REST API Yes Yes
Mistral AI Chrome Extension + REST API Yes Yes
Google AI Studio Chrome Extension + REST API Yes Yes
Any HTTP client REST API directly Manual Manual

Quick Start

For MCP Clients (Claude Desktop, Cursor, etc.)

# 1. Clone and install
git clone https://github.com/BAS-More/Total-Recall.git
cd Total-Recall
npm install

# 2. Run setup wizard
node bin/total-recall.js init

# 3. Restart your MCP client
# Total Recall is now active.

For claude.ai / ChatGPT / Gemini (Chrome Extension)

# 1. Install and set up (same as above)
npm install
node bin/total-recall.js init

# 2. Start the REST API server
npm run api
# Running on http://127.0.0.1:3777

# 3. Install the Chrome extension
# Open chrome://extensions โ†’ Enable Developer Mode โ†’ Load Unpacked โ†’ select extension/

# 4. Visit claude.ai or chatgpt.com
# The extension connects automatically โ€” look for the green dot

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        CONNECTION LAYER                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  MCP Clients         โ”‚  Browser Extension   โ”‚  HTTP Clients         โ”‚
โ”‚  Claude Desktop      โ”‚  claude.ai           โ”‚  curl, scripts,       โ”‚
โ”‚  Claude Code         โ”‚  ChatGPT             โ”‚  ChatGPT Actions,     โ”‚
โ”‚  Cursor, VS Code     โ”‚  Gemini, Perplexity  โ”‚  mobile apps          โ”‚
โ”‚  Any MCP client      โ”‚  Copilot, Poe, +more โ”‚                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚ stdio (MCP)          โ”‚ HTTP :3777            โ”‚ HTTP :3777
           โ–ผ                      โ–ผ                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Total Recall        โ”‚ โ”‚         Total Recall REST API            โ”‚
โ”‚  MCP Server          โ”‚ โ”‚         (src/api.js)                     โ”‚
โ”‚  26 tools            โ”‚ โ”‚  /health  /session/*  /remember          โ”‚
โ”‚  (src/index.js)      โ”‚ โ”‚  /recall  /context    /batch-remember    โ”‚
โ”‚                      โ”‚ โ”‚  /stats   /recall/:id                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                                 โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                             โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    TOTAL RECALL CORE                                โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                     โ”‚
โ”‚  Knowledge Engine          Intelligence Layer                       โ”‚
โ”‚  โ”œโ”€โ”€ 12 categories         โ”œโ”€โ”€ Relevance scoring (6 factors)       โ”‚
โ”‚  โ”œโ”€โ”€ Contradiction detect  โ”œโ”€โ”€ Trigger-based recall                 โ”‚
โ”‚  โ”œโ”€โ”€ Confidence + TTL      โ”œโ”€โ”€ NL query routing                    โ”‚
โ”‚  โ””โ”€โ”€ Version history       โ””โ”€โ”€ Context budget management           โ”‚
โ”‚                                                                     โ”‚
โ”‚  Session System            Prevention & Verification                โ”‚
โ”‚  โ”œโ”€โ”€ State files           โ”œโ”€โ”€ Correction engine (highest priority) โ”‚
โ”‚  โ”œโ”€โ”€ SHA-256 checksums     โ”œโ”€โ”€ Failure pattern matching             โ”‚
โ”‚  โ”œโ”€โ”€ Quality scoring       โ”œโ”€โ”€ File + git + claim verification      โ”‚
โ”‚  โ””โ”€โ”€ Audit trail           โ””โ”€โ”€ Intent decomposition                 โ”‚
โ”‚                                                                     โ”‚
โ”‚  Scale & Resilience                                                  โ”‚
โ”‚  โ”œโ”€โ”€ Multi-session tasks   โ”œโ”€โ”€ Delegation packages                  โ”‚
โ”‚  โ”œโ”€โ”€ Dependency graph      โ”œโ”€โ”€ Predictive pre-loading               โ”‚
โ”‚  โ”œโ”€โ”€ Sync queue            โ””โ”€โ”€ Auto-pruning                        โ”‚
โ”‚  โ””โ”€โ”€ Cross-agent support                                            โ”‚
โ”‚                                                                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  SQLite (WAL mode) โ€” 11 tables, 17 indexes โ€” better-sqlite3        โ”‚
โ”‚                                                                     โ”‚
โ”‚  Optional: Supabase cloud sync (Phase 5)                           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Installation

Prerequisites

  • Node.js 20+ (node --version)
  • npm (comes with Node.js)
  • Git (for verification features)
  • Any Chromium browser (for extension: Chrome, Edge, Brave, Arc, Vivaldi)

Install

git clone https://github.com/BAS-More/Total-Recall.git
cd Total-Recall
npm install
node bin/total-recall.js init

The init wizard creates your machine ID, initializes the database, and offers to patch your Claude Desktop config automatically.

Connect to Claude Desktop

Windows: %APPDATA%\Claude\claude_desktop_config.jsonmacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "total-recall": {
      "command": "node",
      "args": ["C:\\path\\to\\Total-Recall\\src\\index.js"]
    }
  }
}

Restart Claude Desktop. Ask it to call health_check to verify.

Connect to Claude Code

# Add to ~/.claude/.mcp.json (global, all projects)
{
  "mcpServers": {
    "total-recall": {
      "command": "node",
      "args": ["/path/to/Total-Recall/src/index.js"]
    }
  }
}

Or add .mcp.json to a specific project directory.

Start the REST API

npm run api
# Total Recall API running on http://127.0.0.1:3777

The API runs on localhost only. It accepts connections from the Chrome extension and local tools.

Install the Chrome Extension

  1. Open chrome://extensions (or edge://extensions)
  2. Enable Developer mode (top-right toggle)
  3. Click Load unpacked
  4. Select the extension/ directory from this repository
  5. Visit any supported AI chat platform โ€” the extension connects automatically

Tools

26 Tools Across 9 Categories

Session Management
Tool Purpose
session_start Begin conversation, load corrections + rules
session_state_read Refresh mid-conversation memory
session_state_write Save files, decisions, errors, facts
session_close End session with quality score
Knowledge Operations
Tool Purpose
remember Store facts, decisions, errors, patterns
recall Natural language search with confidence
recall_by_id Get specific entry by UUID
recall_by_category Load all entries in a category
forget Archive outdated knowledge
Corrections
Tool Purpose
correct Record user correction (permanent, highest priority)
Verification
Tool Purpose
verify_file Check file exists + has content + git-tracked
verify_push Compare local HEAD vs remote HEAD
verify_claim Verify claim against stored decisions
Context & Intelligence
Tool Purpose
load_context Smart load with relevance scoring + budget
get_budget Check token budget allocation
Tasks & Delegation
Tool Purpose
task_create Create multi-session task
task_update Update status, blockers, deliverables
task_list Filter tasks by project/status
delegate Create context package for agent handoff
Dependencies & System
Tool Purpose
add_dependency Track component relationships
query_dependencies Change impact analysis
remove_dependency Remove relationship
health_check Full system status
export_knowledge Export to JSON for backup
doctor Diagnostics and repair
sync Cloud sync (Supabase)

Knowledge Categories

Total Recall organizes knowledge into 12 categories, each with specific behavior:

Category Loaded Prunable Purpose
correction Always Never Past mistakes โ€” highest priority
rule Always Never Permanent behavioral rules
decision By relevance After 90 days Locked decisions with rationale
error By relevance After 90 days Failures with root cause + fix
fact By relevance After 90 days Verified truths about systems
learning By relevance After 90 days Lessons and best practices
pattern By trigger After 90 days How things work in codebases
preference By trigger After 90 days User working style preferences
risk By relevance After 14 days closed Active project risks
history On demand After 90 days Historical events and context
task Active auto-loaded After 30 days done Multi-session task tracking
relationship By relevance After 90 days Component dependencies

How Agents Use It

Session Start
    โ”‚
    โ”œโ”€โ–บ session_start("claude-desktop")
    โ”‚     Returns: session_id, corrections (always loaded), rules, active tasks
    โ”‚
    โ–ผ
Every Turn
    โ”‚
    โ”œโ”€โ–บ session_state_read(session_id)    โ€” refresh memory of this conversation
    โ”‚
    โ”œโ”€โ–บ [Do work: write code, answer questions, make decisions]
    โ”‚
    โ”œโ”€โ–บ session_state_write(session_id, {
    โ”‚     files_created, decisions_made, errors_encountered, key_facts
    โ”‚   })
    โ”‚
    โ”œโ”€โ–บ remember("decision", "Use Railway for hosting", {
    โ”‚     tags: ["hosting"], triggers: ["deploy"]
    โ”‚   })
    โ”‚
    โ–ผ
Session End
    โ”‚
    โ”œโ”€โ–บ session_close(session_id, "Built auth with 15 tests")
    โ”‚     Returns: quality_score (0-100), grade (A-F)
    โ”‚
    โ–ผ
Next Session (hours, days, weeks later)
    โ”‚
    โ”œโ”€โ–บ session_start() โ†’ corrections + rules loaded automatically
    โ”œโ”€โ–บ recall("What did we decide about hosting?")
    โ”‚     Returns: "Use Railway" (confidence: 95%, category: decision)
    โ””โ”€โ–บ All context preserved. Zero loss.

How the Chrome Extension Works

User types message on claude.ai
    โ”‚
    โ”œโ”€โ–บ Extension intercepts (before send)
    โ”œโ”€โ–บ Calls POST /context with the message
    โ”œโ”€โ–บ REST API searches knowledge base, ranks by relevance
    โ”œโ”€โ–บ Extension prepends <total-recall-context> block to message
    โ”œโ”€โ–บ Message sent to Claude with full memory context
    โ”‚
AI responds
    โ”‚
    โ”œโ”€โ–บ Extension observes the response
    โ”œโ”€โ–บ Extracts decisions, errors, rules via pattern matching
    โ””โ”€โ–บ Calls POST /batch-remember to store them automatically

Configuration

Config File Location

Platform Path
Windows %APPDATA%\total-recall\config.json
macOS ~/.config/total-recall/config.json
Linux ~/.config/total-recall/config.json

Key Settings

{
  "machine_id": "auto-generated-uuid",
  "machine_name": "My Machine",
  "context_budget": {
    "total_tokens": 200000,
    "conversation_pct": 40,
    "knowledge_pct": 30,
    "tool_results_pct": 20,
    "system_pct": 10
  },
  "supabase": {
    "enabled": false,
    "url": "https://YOUR_PROJECT.supabase.co",
    "anon_key": "eyJ..."
  },
  "pruning": {
    "archive_after_days": 90,
    "never_archive": ["correction", "rule"]
  }
}

Config Discovery (5 levels)

  1. CLI flag: --config /path/to/config.json
  2. .total-recall.json in current working directory
  3. .total-recall.json walking up to filesystem root
  4. User config: ~/.config/total-recall/config.json
  5. Built-in defaults (works with no config file)

CLI Commands

node bin/total-recall.js init      # First-time setup wizard
node bin/total-recall.js doctor    # Health check
node bin/total-recall.js export    # Export knowledge to JSON
node bin/total-recall.js version   # Show version
node bin/total-recall.js help      # All commands

Database

11 tables in SQLite with WAL mode for concurrent access:

Table Purpose
knowledge Core memory store (12 categories, 20+ columns)
knowledge_history Version snapshots for rollback
sessions Session lifecycle + quality scoring
audit_log Immutable audit trail of every write
tasks Multi-session task tracking
dependencies Component relationship graph
failure_patterns Extracted error patterns for prevention
workflow_transitions Predictive pre-loading data
sync_log Cloud sync queue (Supabase)
machines Machine identity registry
config Runtime configuration

Development

npm test           # Run all 204 tests
npm start          # Start MCP server (stdio)
npm run api        # Start REST API server (port 3777)
node bin/total-recall.js doctor  # Health check

Tech Stack

  • Runtime: Node.js 20+ (ESM modules)
  • Database: better-sqlite3 (WAL mode, synchronous)
  • MCP Protocol: @modelcontextprotocol/sdk (stdio transport)
  • REST API: Express 5 + cors + express-rate-limit
  • Validation: Zod schemas on all tool inputs
  • Testing: node:test (204 tests, 62 suites)

Project Stats

Source:  34 files, ~4,600 LOC
Tests:   14 files, ~2,200 LOC
Tables:  11 with 17 indexes
Tools:   26 (22 functional, 4 stubs)
Layers:  24 across 7 phases

Troubleshooting

Claude Desktop doesn't show Total Recall tools
  1. Check claude_desktop_config.json has the correct absolute path to src/index.js
  2. Use absolute paths โ€” relative paths won't work
  3. Restart Claude Desktop completely (quit from system tray, not just close)
  4. Run node bin/total-recall.js doctor to verify database health
Chrome extension shows grey dot (offline)

The REST API is not running. Start it:

npm run api

The dot turns green when connected.

"Cannot find module" error
cd /path/to/Total-Recall
npm install
Database locked errors

Total Recall uses WAL mode with auto-retry (3 attempts, exponential backoff). If persistent:

  1. Check no other process has the database open
  2. Run node bin/total-recall.js doctor
  3. Restart the MCP server
How to reset everything
# Windows
del "%APPDATA%\total-recall\data.db"
rmdir /s "%APPDATA%\total-recall\sessions"
node bin/total-recall.js init

# macOS/Linux
rm ~/.config/total-recall/data.db
rm -rf ~/.config/total-recall/sessions
node bin/total-recall.js init

Documentation

Document Description
User Manual Complete guide โ€” installation, tools, config, troubleshooting
Agent Guide Instructions for AI agents using Total Recall
API Reference Full REST API documentation with curl examples
Activation Guide One-page quick-start for all platforms

License

MIT License. Created by Avi Bendetsky / BAS & More.

Install once. Remember everything. Forever. Get Started โ€ข Read the Manual โ€ข Report Issues

MCP Server ยท Populars

MCP Server ยท New