MCP Memory
MCP Memory is a MCP Server that gives MCP Clients (Cursor, Claude, Windsurf and more) the ability to remember information about users (preferences, behaviors) across conversations. It uses vector search technology to find relevant memories based on meaning, not just keywords. It’s built with Cloudflare Workers, D1, Vectorize (RAG), Durable Objects, Workers AI and Agents.
📺 Video

🚀 Try It Out
https://memory.mcpgenerator.com/
🛠️ How to Deploy Your Own MCP Memory
Option 1: One-Click Deploy Your Own MCP Memory to Cloudflare
In Create Vectorize section choose:
- Dimensions: 1024
- Metric: cosine
Click button “Create and Deploy”
In Cloudflare dashboard, go to “Workers & Pages” and click on Visit
Option 2: Use this template
- Click the “Use this template” button at the top of this repository
- Clone your new repository
- Follow the setup instructions below
Option 3: Create with CloudFlare CLI
npm create cloudflare@latest --git https://github.com/puliczek/mcp-memory
🔧 Setup (Only Option 2 & 3)
- Install dependencies:
npm install
- Create a Vectorize index:
npx wrangler vectorize create mcp-memory-vectorize --dimensions 1024 --metric cosine
- Install Wrangler:
npm run dev
- Deploy the worker:
npm run deploy
🧠 How It Works
Storing Memories:
- Your text is processed by Cloudflare Workers AI using the open-source
@cf/baai/bge-m3
model to generate embeddings - The text and its vector embedding are stored in two places:
- Cloudflare Vectorize: Stores the vector embeddings for similarity search
- Cloudflare D1: Stores the original text and metadata for persistence
- A Durable Object (MyMCP) manages the state and ensures consistency
- The Agents framework handles the MCP protocol communication
- Your text is processed by Cloudflare Workers AI using the open-source
Retrieving Memories:
- Your query is converted to a vector using Workers AI with the same
@cf/baai/bge-m3
model - Vectorize performs similarity search to find relevant memories
- Results are ranked by similarity score
- The D1 database provides the original text for matched vectors
- The Durable Object coordinates the retrieval process
- Your query is converted to a vector using Workers AI with the same
This architecture enables:
- Fast vector similarity search through Vectorize
- Persistent storage with D1
- Stateful operations via Durable Objects
- Standardized AI interactions through Workers AI
- Protocol compliance via the Agents framework
The system finds conceptually related information even when the exact words don’t match.
🔒 Security
MCP Memory implements several security measures to protect user data:
- Each user’s memories are stored in isolated namespaces within Vectorize for data separation
- Built-in rate limiting prevents abuse (100 req/min - you can change it in wrangler.jsonc)
- Authentication is based on userId only
- While this is sufficient for basic protection due to rate limiting
- Additional authentication layers (like API keys or OAuth) can be easily added if needed
- All data is stored in Cloudflare’s secure infrastructure
- All communications are secured with industry-standard TLS encryption (automatically provided by Cloudflare’s SSL/TLS certification)
💰 Cost Information - FREE for Most Users
MCP Memory is free to use for normal usage levels:
- Free tier allows 1,000 memories with ~28,000 queries per month
- Uses Cloudflare’s free quota for Workers, Vectorize, Worker AI and D1 database
For more details on Cloudflare pricing, see:
❓ FAQ
Can I use memory.mcpgenerator.com to store my memories?
- Yes, you can use memory.mcpgenerator.com to store and retrieve your memories
- The service is free
- Your memories are securely stored and accessible only to you
- I cannot guarantee that the service will always be available
Can I host it?
- Yes, you can host your own instance of MCP Memory for free on Cloudflare
- You’ll need a Cloudflare account and the following services:
- Workers
- Vectorize
- D1 Database
- Workers AI
Can I run it locally?
- Yes, you can run MCP Memory locally for development
- Use
wrangler dev
to run the worker locally - You’ll need to set up local development credentials for Cloudflare services
- Note that some features like vector search or workers AI requires a connection to Cloudflare’s services
Can I use different hosting?
- No, MCP Memory is specifically designed for Cloudflare’s infrastructure
Why did you build it?
- I wanted an open-source solution
- Control over my own data was important to me
Can I use it for more than one person?
- Yes, MCP Memory can be integrated into your app to serve all your users
- Each user gets their own isolated memory space
Can I use it to store things other than memories?
- Yes, MCP Memory can store any type of text-based information
- Some practical examples:
- Knowledge Base: Store technical documentation, procedures, and troubleshooting guides
- User Behaviors: Track how users interact with features and common usage patterns
- Project Notes: decisions and project updates
- The vector search will help find related items regardless of content type
🤝 Show your support
MCP Memory
Project Details
- moe-Kuroko/mcp-memory
- Last Updated: 4/28/2025
Recomended MCP Servers
A Model Context Protocol (MCP) server that provides tools for Tabnews
A Model Context Protocol (MCP) server that converts various file formats to Markdown using the MarkItDown utility.
mcp server accessing MySQL database
一个强大的MCP(Model Context Protocol)开发框架,一个用于SEE(Standard Extension Environment)对接的模块化工具框架。该框架允许开发者轻松创建和扩展自定义工具,并通过MCP协议与模型交互。
mcp demo, get US weather, deploy to smithery
MCP server that generates mock data.
Fully functional AI Logic Calculator utilizing Prover9/Mace4 via Python based Model Context Protocol (MCP-Server)- tool for Windows Claude...
A Model Context Protocol (MCP) server implementation for Notion integration, providing a standardized interface for interacting with Notion's...
An MCP server that delivers real-time cross-chain bridge rates and optimal transfer routes to onchain AI agents.
A Model Context Protocol (MCP) server that provides Xcode-related tools for integration with AI assistants and other MCP...
An MCP (Model Context Protocol) server that provides tools for interacting with Twitter using the agent-twitter-client library.