Memory MCP

memory-mcp is an MCP server that provides persistent memory management and context window caching for large language model conversations. It connects AI assistants directly to a MongoDB database to record, retrieve, and organize facts or conversational history across separate sessions. Designed for developers and AI practitioners using environments like Cursor and Claude Desktop, the server helps maintain continuous user context without exceeding window limits. It enables agents to execute operations such as saving memory entries, retrieving stored items, archiving extended message threads with custom tags, and calculating relevance scores based on keyword overlap. In addition, the server includes tools to generate and query summaries of past exchanges, allowing LLMs to condense previous interactions and recall pertinent background details on demand. By offloading conversational state to MongoDB, memory-mcp prevents loss of critical context during iterative coding, research, or complex multi-turn sessions across multiple models.

Category: AI Memory & Context

Tags: context, memory, persistence, recall

Visit Memory MCP

How to install and configure Memory MCP

  1. Ensure Node.js 18+ and a running MongoDB instance are installed. 2. Install the package globally with npm install -g @jamesanz/memory-mcp or clone the repository using git clone https://github.com/JamesANZ/memory-mcp.git followed by npm install and npm run build. 3. Configure your MongoDB connection string by exporting MONGODB_URI (defaults to mongodb://localhost:27017). 4. For Claude Desktop, edit your configuration file (claude_desktop_config.json) and add the server configuration under mcpServers with the command set to node, args pointing to /absolute/path/to/memory-mcp/build/index.js, and env containing MONGODB_URI. 5. For Cursor, install via the provided deep link or manual NPX configuration pointing to @jamesanz/memory-mcp. 6. Restart your MCP client to initialize the server.

What you can do with Memory MCP

  • Preserving user preferences, project tech stacks, and environment details across multiple Claude Desktop or Cursor sessions. * Archiving long conversation segments to MongoDB when context window capacity reaches high utilization thresholds. * Retrieving tagged historical context and scoring relevance to answer technical queries based on past discussions. * Generating conversation summaries to condense extensive multi-turn interactions without losing key decision points. * Managing shared conversational memories across different language models working on the same software codebase.

Key facts

  • https://github.com/JamesANZ/memory-mcp
  • AI Memory & Context
  • context, memory, persistence, recall

Part of MCP Servers

Related MCP servers

  • MCP Memory Dashboard — MCP Memory Dashboard is an MCP server desktop interface that connects to the MCP Memory Service to provide visual semantic…
  • MCP Kanban Memory — MCP Kanban Memory is an MCP server that provides a kanban-based task management and state retention system for AI-driven workflows.…
  • MCP Memory Keeper — MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Knowledge Base — MCP Knowledge Base is an MCP server that processes local documents and answers queries based on their contents through similarity…
  • MCP Memory Toolkit — MCP Memory Toolkit is an MCP server that provides persistent memory capabilities for Claude and other compatible assistants using ChromaDB.…
  • MCP Memory Server — MCP Memory Server is an MCP server that integrates Claude Desktop with Azure Cosmos DB and OpenAI embeddings to provide…

How do I install memory-mcp?

You can install memory-mcp globally using npm with the command npm install -g @jamesanz/memory-mcp, or by cloning the repository and running npm install and npm run build. It can also be integrated into Cursor using the one-click install link or added manually to your Claude Desktop configuration file with a running MongoDB instance.

What database does memory-mcp require?

memory-mcp requires a MongoDB instance for persistent storage. By default, it connects to mongodb://localhost:27017, but you can specify a custom connection string by setting the MONGODB_URI environment variable before launching the server or within your MCP client configuration.

What can memory-mcp do?

The server provides tools to save, retrieve, append, and clear user memories. It also features context window caching capabilities, including archiving conversation messages with tags, retrieving context based on relevance scores, generating conversation summaries, and searching past context by tags.

Which MCP clients work with memory-mcp?

memory-mcp is compatible with MCP-compliant environments such as Cursor and Claude Desktop on macOS, Windows, and Linux. Any MCP client supporting standard input/output transport and custom environment variables can run this server.

What license does memory-mcp use?

According to the project documentation, memory-mcp is open-source software released under the ISC license.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories