memory
A simple MCP server that stores and retrieves memories from multiple LLMs.
claude mcp add --transport stdio jamesanz-memory-mcp node build/index.js \ --env MONGODB_URI="mongodb://localhost:27017"
How to use
Memory MCP provides persistent memory storage and context window caching for AI conversations. It stores memories in MongoDB, allows tagging and relevance scoring, and offers tools to save, retrieve, archive, and search memories and conversation context. You can interact with the server using the provided MCP tools such as save-memories, get-memories, add-memories, clear-memories, archive-context, retrieve-context, score-relevance, create-summary, get-conversation-summaries, and search-context-by-tags. This makes it easy to persist important details across sessions and quickly rehydrate relevant context for ongoing chats or coding sessions in environments like Cursor or Claude Desktop.
How to install
Prerequisites:
- Node.js 18+ (with npm)
- MongoDB running and accessible (default URI mongodb://localhost:27017)
-
Clone the repository and install dependencies git clone https://github.com/JamesANZ/memory-mcp.git cd memory-mcp npm install
-
Build the project npm run build
-
Set the MongoDB connection string (example) export MONGODB_URI="mongodb://localhost:27017"
-
Run the server npm start
Optional (Cursor integration):
- Use the one-click Cursor install link or configure via the Claude/Desktop config as shown in the README.
Additional notes
Environment and configuration tips:
- Ensure MongoDB is running and accessible at the URI you provide in MONGODB_URI.
- The memory-mcp server uses MongoDB for storage; check permissions and network access for your MongoDB instance.
- In Claude Desktop, you can add memory-mcp with command node and the absolute path to the built index.js, including the MONGODB_URI in env.
- If you deploy outside of local development, update the MONGODB_URI and consider additional security measures (authentication, TLS).
- The server exposes a set of tools for memory lifecycle management and context caching; refer to the usage examples in the README to structure your requests.
Related MCP Servers
mcp
Official PostHog MCP Server 🦔
furi
CLI & API for MCP management
medical
An MCP server that provides comprehensive medical information by querying multiple authoritative medical APIs including FDA, WHO, PubMed, Google Scholar, and RxNorm
prediction-market
A simple MCP server that grabs prediction market data from polymarket, PredictIt, & Kalshi.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
CodeRAG
Advanced graph-based code analysis for AI-assisted software development