Back to Catalog

memory-mcp

JamesANZ/memory-mcp
🔗 Latest commit:512542d
🕒 Updated:Aug 4, 2025, 10:21 AM
TypeScript
AI Tools

A simple MCP server that stores and retrieves memories from multiple LLMs

MCP Trust Score
Based on our comprehensive evaluation criteria
🤖 Evaluated by gemini-2.5-flashFix
Trust Score48/100
GitHub Metrics
Repository statistics and activity
⭐ GitHub Stars:0
👥 Contributors:1
📋 Total Issues:0
📦 Has Releases:No
🔧 Has CI/CD Pipeline:No
MCP Protocol Support
Implemented MCP protocol features
🤖 Evaluated by gemini-2.5-flashFix
Tools:
Prompts:
Resources:
Sampling:
Roots:
Logging:
STDIO Transport:
HTTP Transport:
OAuth2 Auth:
Dependencies
3 dependencies
Libraries and frameworks used by this MCP server
🤖 Evaluated by gemini-2.5-flashFix
Configuration
Configuration example extracted from README.md for Claude Desktop and other clients.
🤖 Evaluated by gemini-2.5-flashFix
{
  "mcpServers": {
    "memory-mcp": {
      "command": "node",
      "args": [
        "build/index.js"
      ],
      "env": {
        "MONGODB_URI": "mongodb://localhost:27017"
      }
    }
  }
}
Add Quality Badge
Show your MCP trust score in your README
Trust Score Badge
[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/JamesANZ/memory-mcp)](https://archestra.ai/mcp-catalog/jamesanz__memory-mcp)
README.md

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

  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

Set the MongoDB connection string via environment variable:

export MONGODB_URI="mongodb://localhost:27017"

Default: mongodb://localhost:27017

Usage

Available Tools

  1. save-memories: Save all memories to the database, overwriting existing ones

    • memories: Array of memory strings to save
    • llm: Name of the LLM (e.g., 'chatgpt', 'claude')
    • userId: Optional user identifier
  2. get-memories: Retrieve all memories from the database

    • No parameters required
  3. add-memories: Add new memories to the database without overwriting existing ones

    • memories: Array of memory strings to add
    • llm: Name of the LLM (e.g., 'chatgpt', 'claude')
    • userId: Optional user identifier
  4. clear-memories: Clear all memories from the database

    • No parameters required

Example Usage in LLM

  1. Save all memories (overwrites existing):

    User: "Save all my memories from this conversation to the MCP server"
    LLM: [Uses save-memories tool with current conversation memories]
    
  2. Retrieve all memories:

    User: "Get all my memories from the MCP server"
    LLM: [Uses get-memories tool to retrieve stored memories]
    
  3. Add new memories (preserves existing):

    User: "Add these new memories to my existing ones"
    LLM: [Uses add-memories tool to append new memories]
    

Database Schema

Memories are stored in MongoDB with the following structure:

{
  _id: ObjectId,
  memories: string[],        // Array of memory strings
  timestamp: Date,          // When memories were saved
  llm: string,             // LLM identifier (e.g., 'chatgpt', 'claude')
  userId?: string          // Optional user identifier
}

Development

To run in development mode:

npm run build
node build/index.js
memory-mcp MCP Server | Documentation & Integration | Archestra