Skip to main content
The Remember Plugin provides encrypted session memory for FrontMCP servers, enabling AI agents to remember context across conversations.

Why Use Remember?

Session Memory

Store user preferences, conversation context, and state across tool invocations

Encrypted Storage

AES-256-GCM encryption protects sensitive data at rest

Multiple Backends

Redis, Vercel KV, or in-memory storage for different deployment needs

Scoped Storage

Organize data by session, user, tool, or global scope
For tool approval workflows (Claude Code-style permissions), see the Approval Plugin.

Installation

How It Works

1

Context Extension

The plugin adds this.remember to all execution contexts (ToolContext, AgentContext, etc.)
2

Scoped Storage

Data is organized by scope (session, user, tool, global) with automatic key prefixing
3

Encryption

Values are encrypted before storage using keys derived from session/user identifiers
4

TTL Management

Entries expire automatically based on configured TTL or scope lifetime
All stored values are encrypted by default using AES-256-GCM. Keys are derived using HKDF-SHA256 from session and user identifiers.

Quick Start

Basic Setup

Using Memory in Tools

The plugin extends all execution contexts with this.remember:

Memory Scopes

Memory is organized into four scopes with different visibility and lifetime:

Using Scopes


Data Structure

Entry Format

Each stored value is wrapped in an entry with metadata:

Branded Payloads

Use brands to categorize stored data semantically:
Brands enable filtering and batch operations by category:

Storage Options

In-Memory (Default)

Best for: Single-instance deployments, development, non-persistent data
Memory storage resets when the process restarts. Not shared across instances.
Best for: Multi-instance deployments, persistent memory, production

Vercel KV

Best for: Vercel deployments, serverless environments

Global Store

Use the store configuration from @FrontMcp decorator:

Encryption

All stored values are encrypted by default using AES-256-GCM.

How Keys Are Derived

  1. A master secret is derived from REMEMBER_SECRET environment variable (or auto-generated and persisted)
  2. Per-entry keys are derived using HKDF-SHA256 with session/user context as salt
  3. Each entry gets a unique key based on its scope and identity

Secret Persistence

In development, the plugin automatically generates and persists an encryption secret to .frontmcp/remember-secret.json:
This enables consistent encryption across process restarts during development without manual configuration.
In production, set the REMEMBER_SECRET environment variable instead:
File-based persistence is disabled in production by default for security.

Configuration


API Reference

RememberAccessor Methods

Promise<void>
Store a value with optional scope, TTL, and metadata
Promise<T | undefined>
Retrieve a value with optional default
Promise<RememberEntry<T> | undefined>
Retrieve the full entry including metadata, timestamps, and brand
Promise<boolean>
Update an existing value while preserving metadata. Returns false if key doesn’t exist.
Promise<boolean>
Check if a key exists
Promise<void>
Delete a key
Promise<string[]>
List keys with optional pattern matching

LLM-Accessible Tools

Enable built-in tools that let the LLM manage memory directly:
This exposes tools like memory_remember_this, memory_recall, memory_forget, and memory_list_memories.

Best Practices

  • Session: Temporary data, current conversation context
  • User: Preferences, settings that should persist
  • Tool: Tool-specific cache to avoid scope pollution
  • Global: Only for true application-wide settings
Don’t store sensitive data forever:
Redis provides:
  • Persistence across restarts
  • Sharing across multiple server instances
  • Better memory management with eviction policies
In development, the secret is auto-generated and stored in .frontmcp/remember-secret.json. Add this file to .gitignore.

Complete Example


Source Code

View the remember plugin source code

Approval Plugin

For tool authorization workflows

Plugin Guide

Learn more about FrontMCP plugins

Cache Plugin

For tool response caching