Labsco
JamesANZ logo

memory-mcp

β˜… 18

from JamesANZ

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

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

🧠 Memory MCP Server

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.

Trust Score

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

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

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
  • Context Retrieval – Bring back relevant past conversations
  • Research Projects – Organize and tag research conversations

Technical Details

Built with: Node.js, TypeScript, MCP SDK, MongoDB
Dependencies: @modelcontextprotocol/sdk, mongodb, zod
Platforms: macOS, Windows, Linux

Storage: MongoDB (default: mongodb://localhost:27017)

Contributing

⭐ If this project helps you, please star it on GitHub! ⭐

Contributions welcome! Please open an issue or submit a pull request.

License

ISC

Support

If you find this project useful, consider supporting it:

⚑ Lightning Network

lnbc1pjhhsqepp5mjgwnvg0z53shm22hfe9us289lnaqkwv8rn2s0rtekg5vvj56xnqdqqcqzzsxqyz5vqsp5gu6vh9hyp94c7t3tkpqrp2r059t4vrw7ps78a4n0a2u52678c7yq9qyyssq7zcferywka50wcy75skjfrdrk930cuyx24rg55cwfuzxs49rc9c53mpz6zug5y2544pt8y9jflnq0ltlha26ed846jh0y7n4gm8jd3qqaautqa

β‚Ώ Bitcoin: bc1ptzvr93pn959xq4et6sqzpfnkk2args22ewv5u2th4ps7hshfaqrshe0xtp

Ξ Ethereum/EVM: 0x42ea529282DDE0AA87B42d9E83316eb23FE62c3f