Skip to main content
Glama

🧠 Dont-Forget MCP Server

A Model Context Protocol (MCP) server that provides AI programming agents with persistent memory capabilities, allowing them to remember past mistakes, successful changes, and build contextual knowledge over time.

šŸ“‹ Table of Contents

Related MCP server: code-recall

šŸŽÆ Overview

The Dont-Forget MCP server helps AI agents:

  • Remember Mistakes: Store summaries of errors with correct solutions

  • Track Changes: Maintain history of successful modifications

  • Build Context: Search relevant past experiences before starting new tasks

  • Learn Patterns: Identify recurring issues and solutions across components

Key Features

  • āœ… Persistent Memory: SQLite + Vector database storage

  • āœ… Contextual Search: Vector-based similarity search for relevant history

  • āœ… Web Debug Interface: Browse data and test tools via web UI

  • āœ… Language Agnostic: Works with any programming language

  • āœ… Component Tracking: Track changes by files, classes, functions, etc.

šŸš€ Installation & Setup

Prerequisites

  • Node.js 18.19.0 or higher

  • npm or yarn package manager

Install from source

git clone https://github.com/mgfreshour/dont-forget.git
cd dont-forget
npm install
npm run build

Start server

# Basic MCP server (from project root after build)
node dist/index.js

# Or use the package binary after build
npx dont-forget

# With web debugging interface (localhost only — no auth)
npx dont-forget --debug-server

# Custom configuration
npx dont-forget --debug-server --web-port 3001 --data-dir ./my-data

When the package is published to npm, you can also run npm install -g dont-forget.

Command Line Options

Option

Description

Default

--debug-server

Start web debugging interface

Off

--web-port <port>

Web server port

3001

--data-dir <path>

Database storage directory

./data

šŸ›  Usage & Configuration

MCP Client Integration

Add to your MCP client configuration:

{
  "mcpServers": {
    "dont-forget": {
      "command": "node",
      "args": ["/absolute/path/to/dont-forget/dist/index.js", "--debug-server"]
    }
  }
}

Use the path to your clone (or dont-forget on your PATH if installed globally).

Environment Variables

export DONT_FORGET_DATA_DIR="/path/to/data"  # Override data directory

Copy .env.example to .env if you use a local env file (not required for the server).

Development

npm run build
npm test
npm run test:integration   # optional

Local databases and logs are written under data/ (gitignored). Do not commit that directory.

šŸ“ Agent Rules by Language

JavaScript/TypeScript

Component Definition: A component is any of:

  • File/Module: src/utils/validation.ts, components/Button.jsx

  • Class: UserService, ApiClient, ComponentName

  • Function: validateEmail(), fetchUserData(), useCustomHook()

  • React Component: <UserProfile>, <DataTable>, <LoginForm>

  • npm Package: lodash, react-router, @types/node

Agent Rules:

# Remembering Work and Mistakes (JavaScript/TypeScript)

- A component is defined as a file/module, class, function, React component, or npm package
- Always when you make a mistake use the remember-mistake tool summarizing the mistake, the correct action, and the components (files/classes/functions/packages) involved.
  - Example: "TypeError in user validation" → Components: ["src/utils/validation.ts", "validateEmail()", "UserService"]
- Always when you finish a task provide a summary and detailed description with the remember-change tool. List components and summaries of what changed.
  - Example: "Added user authentication" → Components: ["src/auth/AuthService.ts", "components/LoginForm.tsx", "middleware/auth.js"]
- Before beginning work use get-potential-context tool, passing in the task summary and any relevant components.
  - Example: Task "Fix login bug" → Components: ["AuthService", "LoginForm", "JWT validation"]

Go

Component Definition: A component is any of:

  • Package: main, user, auth, github.com/gin-gonic/gin

  • Module: go.mod module name, github.com/myorg/myproject

  • Struct: User, HTTPClient, DatabaseConnection

  • Interface: UserRepository, Logger, HTTPHandler

  • Function: ValidateInput(), ProcessRequest(), main()

Agent Rules:

# Remembering Work and Mistakes (Go)

- A component is defined as a package, module, struct, interface, or function
- Always when you make a mistake use the remember-mistake tool summarizing the mistake, the correct action, and the components (packages/structs/functions) involved.
  - Example: "Nil pointer dereference in user service" → Components: ["user package", "User struct", "GetUserByID()"]
- Always when you finish a task provide a summary and detailed description with the remember-change tool. List components and summaries of what changed.
  - Example: "Implemented user authentication" → Components: ["auth package", "UserService struct", "ValidateToken()", "main.go"]
- Before beginning work use get-potential-context tool, passing in the task summary and any relevant components.
  - Example: Task "Fix database connection" → Components: ["database package", "Connection struct", "Connect()"]

Rust

Component Definition: A component is any of:

  • Crate: serde, tokio, my_project, binary/library crates

  • Module: mod auth, mod utils, std::collections

  • Struct: User, Config, DatabasePool

  • Trait: Serialize, Display, UserRepository

  • Function: validate_input(), process_request(), main()

  • Macro: println!, vec!, custom derive macros

Agent Rules:

# Remembering Work and Mistakes (Rust)

- A component is defined as a crate, module, struct, trait, function, or macro
- Always when you make a mistake use the remember-mistake tool summarizing the mistake, the correct action, and the components (crates/modules/structs/traits/functions) involved.
  - Example: "Borrow checker error in user validation" → Components: ["validation module", "User struct", "validate_user()", "String ownership"]
- Always when you finish a task provide a summary and detailed description with the remember-change tool. List components and summaries of what changed.
  - Example: "Added async HTTP client" → Components: ["tokio crate", "http module", "Client struct", "async fn fetch_data()"]
- Before beginning work use get-potential-context tool, passing in the task summary and any relevant components.
  - Example: Task "Fix lifetime issues" → Components: ["User struct", "borrow checker", "lifetime annotations"]

C#

Component Definition: A component is any of:

  • Namespace: MyApp.Services, System.Collections.Generic, Microsoft.AspNetCore

  • Class: UserService, ApiController, DatabaseContext

  • Method: ValidateUser(), ProcessRequest(), Main()

  • Interface: IUserRepository, ILogger, IServiceCollection

  • Project/Assembly: MyApp.Web.dll, MyApp.Core, MyApp.Data

  • NuGet Package: Newtonsoft.Json, EntityFramework, AutoMapper

Agent Rules:

# Remembering Work and Mistakes (C#)

- A component is defined as a namespace, class, method, interface, project/assembly, or NuGet package
- Always when you make a mistake use the remember-mistake tool summarizing the mistake, the correct action, and the components (namespaces/classes/methods/packages) involved.
  - Example: "NullReferenceException in user service" → Components: ["MyApp.Services", "UserService class", "GetUserById() method"]
- Always when you finish a task provide a summary and detailed description with the remember-change tool. List components and summaries of what changed.
  - Example: "Implemented dependency injection" → Components: ["MyApp.Web", "Startup class", "ConfigureServices()", "Microsoft.Extensions.DependencyInjection"]
- Before beginning work use get-potential-context tool, passing in the task summary and any relevant components.
  - Example: Task "Fix Entity Framework migration" → Components: ["MyApp.Data", "DatabaseContext", "EntityFramework package"]

šŸ”§ Tool Reference

remember-change

Purpose: Record successful changes and improvements Parameters:

  • summary: One-sentence description of the change

  • detailedDescription: Comprehensive details including rationale and implementation

  • components: Array of affected components (files, classes, functions, etc.)

Example:

{
  "summary": "Added user authentication with JWT tokens",
  "detailedDescription": "Implemented JWT-based authentication system with login/logout endpoints, token validation middleware, and secure password hashing using bcrypt. Added refresh token mechanism for better security.",
  "components": ["src/auth/AuthService.ts", "middleware/auth.js", "routes/auth.js", "bcrypt package", "jsonwebtoken package"]
}

remember-mistake

Purpose: Record mistakes and their solutions for future reference Parameters:

  • summary: Brief description of the mistake/problem

  • correctAction: Detailed explanation of the solution

  • components: Array of components involved in the mistake

Example:

{
  "summary": "Memory leak caused by unclosed database connections",
  "correctAction": "Always call connection.close() in finally blocks or use try-with-resources pattern. Implemented connection pooling to manage connections automatically.",
  "components": ["DatabaseManager class", "getUserData() method", "connection pooling", "try-with-resources"]
}

get-potential-context

Purpose: Search for relevant past experiences before starting work Parameters:

  • taskSummary: Description of the current task

  • componentsOfInterest: Array of components you'll be working with

Example:

{
  "taskSummary": "Fix user registration validation errors",
  "componentsOfInterest": ["UserService", "validation.js", "registration form", "email validation"]
}

change-details

Purpose: Get detailed information about a specific change Parameters:

  • id: Numeric ID of the change record

problem-details

Purpose: Get detailed information about a specific problem/mistake Parameters:

  • id: Numeric ID of the problem record

get-component-history

Purpose: Get full history (changes and problems) for a specific component Parameters:

  • componentName: Name of the component to search for

🌐 Web Debug Interface

Access the debugging interface at http://localhost:3001 when running with --debug-server.

Features

Database Browser:

  • View all changes with timestamps and components

  • Browse problems/mistakes with solutions

  • Component usage statistics and history

  • Detailed modal views for each record

Tool Executor:

  • Interactive forms for all tools

  • Real-time JSON result display

  • Form validation and error handling

  • Quick testing without MCP client

Interaction Logs (Coming Soon):

  • Tool execution history

  • Performance metrics

  • Search query logs

Screenshots

🧠 Dont-Forget Debug Interface
ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│ Database Browser | Tool Executor | Logs │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ Changes | Problems | Components          │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│ ID | Summary              | Components   │
│ 1  | Added authentication | AuthService  │
│ 2  | Fixed validation bug | UserService  │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

šŸ’” Best Practices

Component Naming

āœ… Good Examples:

  • src/services/UserService.ts (specific file path)

  • validateEmail() function (specific function with context)

  • User class in models/User.js (class with file context)

  • react-router package (specific package name)

āŒ Avoid:

  • file (too vague)

  • function (not specific)

  • the validation code (unclear)

Change Descriptions

āœ… Good Summary: "Added rate limiting to API endpoints"

āœ… Good Detailed Description:

Implemented rate limiting middleware using express-rate-limit package. 
Applied 100 requests per 15-minute window for general endpoints and 
5 requests per 15-minute window for auth endpoints. Added Redis store 
for distributed rate limiting across multiple server instances.

āœ… Good Components:

["middleware/rateLimiter.js", "express-rate-limit package", 
 "routes/api.js", "routes/auth.js", "Redis configuration"]

Mistake Documentation

āœ… Good Mistake Summary: "Race condition in user session cleanup"

āœ… Good Correct Action:

The cleanup function was accessing shared session data without proper 
locking, causing data corruption. Fixed by implementing mutex locks 
around session access and using atomic operations for session updates. 
Also added proper error handling for concurrent access scenarios.

Context Searching

Before starting work, always search for context:

{
  "taskSummary": "Implement user profile editing",
  "componentsOfInterest": ["UserService", "profile components", "validation", "API endpoints"]
}

This helps you:

  • Avoid repeating past mistakes

  • Learn from previous similar implementations

  • Understand component relationships

  • Apply proven patterns

šŸ“š API Reference

REST Endpoints (Debug Server)

Method

Endpoint

Description

GET

/health

Server health check

GET

/api/changes

List all changes

GET

/api/problems

List all problems

GET

/api/components

List all components

GET

/api/changes/:id

Get change details

GET

/api/problems/:id

Get problem details

GET

/api/components/:name/history

Get component history

POST

/api/tools/remember-change

Execute remember-change tool

POST

/api/tools/remember-mistake

Execute remember-mistake tool

POST

/api/tools/get-potential-context

Execute context search

POST

/api/search

Search for relevant context

Database Schema

Changes Table:

  • id: Primary key

  • summary: Brief description

  • detailed_description: Full implementation details

  • timestamp: Creation time

  • components: Related components (via junction table)

Problems Table:

  • id: Primary key

  • summary: Brief problem description

  • correct_action: Solution details

  • timestamp: Creation time

  • components: Related components (via junction table)

Components Table:

  • id: Primary key

  • name: Component identifier

  • Relationships to changes and problems

šŸ¤ Contributing

See CONTRIBUTING.md.

šŸ“„ License

MIT

šŸ†˜ Support

  • Issues: GitHub Issues

  • Documentation: This README

  • Debug interface: Use --debug-server on localhost for interactive debugging


Happy coding with persistent memory! 🧠✨

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.
      3 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Gives AI coding agents persistent memory by storing observations, decisions, and learnings in a local SQLite database with vector search, full-text search, and a rules engine.
      4
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Persistent memory for AI coding agents, storing learned architecture decisions, patterns, and bug fixes in a local SQLite database with full-text search, enabling agents to recall information across sessions.
      6
      291 npm
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI coding agents to retrieve relevant execution context before a task, compare candidate paths, log outcomes, and search past experiences stored locally in SQLite. It lets agents reuse what worked on similar tasks and get live alerts when a run stagnates or repeats failures.
      14
      211 PyPI
      4
      MIT