Provides persistent storage of conversation memories using MongoDB database with support for saving, retrieving, adding, and clearing memory records.
Memory MCP
A Model Context Protocol (MCP) server for logging and retrieving memories from LLM conversations.
Features
- Save Memories: Store memories from LLM conversations with timestamps and LLM identification
- Retrieve Memories: Get all stored memories with detailed metadata
- Add Memories: Append new memories without overwriting existing ones
- Clear Memories: Remove all stored memories
- MongoDB Storage: Persistent storage using MongoDB database
Installation
- Install dependencies:
- Build the project:
Configuration
Set the MongoDB connection string via environment variable:
Default: mongodb://localhost:27017
Usage
Available Tools
- save-memories: Save all memories to the database, overwriting existing ones
memories
: Array of memory strings to savellm
: Name of the LLM (e.g., 'chatgpt', 'claude')userId
: Optional user identifier
- get-memories: Retrieve all memories from the database
- No parameters required
- add-memories: Add new memories to the database without overwriting existing ones
memories
: Array of memory strings to addllm
: Name of the LLM (e.g., 'chatgpt', 'claude')userId
: Optional user identifier
- clear-memories: Clear all memories from the database
- No parameters required
Example Usage in LLM
- Save all memories (overwrites existing):
- Retrieve all memories:
- Add new memories (preserves existing):
Database Schema
Memories are stored in MongoDB with the following structure:
Development
To run in development mode:
This server cannot be installed
A Model Context Protocol server that allows saving, retrieving, adding, and clearing memories from LLM conversations with MongoDB persistence.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that provides access to MongoDB databases. This server enables LLMs to inspect collection schemas and execute read-only queries.Last updated -8344254TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.Last updated -1,7831TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.Last updated -1,783MIT License
- -securityAlicense-qualityA Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases, allowing them to query collections, inspect schemas, and manage data seamlessly through natural language.Last updated -1,783MIT License