> **Persistent memory and context window caching for LLM conversations.** Save, retrieve, and manage memories with intelligent context archiving. MongoDB-backed storage. An MCP (Model Context Protocol) server that provides memory management and context window caching for AI coding environments like Cursor and Claude Desktop. Why Use Memory MCP? - 💾 **Persistent Storage** – MongoDB-backed memory that survives sessions - 🧠 **Context Caching** – Intelligent archiving and retrieval of conversation context - 🏷️ **Tag-based Search** – Organize and find memories by tags - 📊 **Relevance Scoring** – Automatically score archived content relevance - ⚡ **Easy Setup** – One-click install in Cursor or simple manual setup Quick Start Ready to add memory to your AI workflow? Install in seconds: **Install in Cursor (Recommended):** 🔗 Install in Cursor **Or install manually:** Features Basic Memory Tools - **save-memories** – Save memories to database (overwrites existing) - **get-memories** – Retrieve all stored memories - **add-memories** – Append new memories without overwriting - **clear-memories** – Remove all stored memories Context Window Caching - **archive-context** – Archive conversation context with tags - **retrieve-context** – Retrieve relevant archived context - **score-relevance** – Score archived content relevance - **create-summary** – Create summaries of archived content - **get-conversation-summaries** – Get all summaries for a conversation - **search-context-by-tags** – Search archived content by tags Installation Cursor (One-Click) Click the install link above or use: Manual Installation **Requirements:** Node.js 18+, npm, MongoDB Claude Desktop Add to claude_desktop_config.json: **macOS**: ~/Library/Application Support/Claude/claude_desktop_config.json **Windows**: %APPDATA%\Claude\claude_desktop_config.json Restart Claude Desktop after configuration. Configuration Set the MongoDB connection string: Default: mongodb://localhost:27017 Usage Examples Save Memories Store memories from a conversation: Retrieve Memories Get all stored memories: Archive Context Archive conversation context when it gets too long: Retrieve Relevant Context Get archived content relevant to current conversation: Context Window Caching The system automatically: - **Archives content** when context usage reaches 80% - **Retrieves relevant content** when usage drops below 30% - **Scores relevance** using keyword overlap - **Creates summaries** to condense long conversations Use Cases - **Long Conversations** – Manage context windows for extended sessions - **Memory Persistence** – Save important information across sessions