PM

puliczek/mcp-memory

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

169 stars 16 forks 质量 44 趋势 0

puliczek/mcp-memory 是从 https://github.com/puliczek/mcp-memory. 导入的 MCP 服务器候选

概览

puliczek/mcp-memory 是从 https://github.com/puliczek/mcp-memory. 导入的 MCP 服务器候选

概述(AI 翻译)

🤝 表达你的支持——如果你喜欢内容,请留言 ⭐️


MCP记忆

MCP Memory 是一个 MCP 服务器,为 MCP 客户端(Cursor、Claude、Windsurf 等) ** 能够记住关于用户的信息(偏好、行为)** 跨对话。它使用矢量搜索技术,基于意义而非仅仅是关键词寻找相关记忆。它由 Cloudflare Workers、D1、Vectorize(RAG)、Durable Objects、Workers AI 和 Agents 构建。

📺 视频

🚀 试试看

https://memory.mcpgenerator.com/

🛠️ 如何部署您自己的MCP内存

选项1:一键部署您自己的MCP内存到Cloudflare

在创建矢量化部分选择:

  • 尺寸: 1024
  • **公制:**余弦

点击按钮 **“创建并部署”

在Cloudflare仪表盘中,进入“员工与页面”,点击访问

选项2:使用这个模板

  1. 点击该仓库顶部的“使用此模板”按钮
  2. 克隆你的新仓库
  3. 按照下面的设置说明操作

选项3:用CloudFlare CLI创建

🔧 设定(仅选项2和3)

  1. 安装依赖:

  2. 创建向量化索引:

  3. 安装Wrangler:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。


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

  1. Click the “Use this template” button at the top of this repository
  2. Clone your new repository
  3. 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)

  1. Install dependencies:
npm install
  1. Create a Vectorize index:
npx wrangler vectorize create mcp-memory-vectorize --dimensions 1024 --metric cosine
  1. Install Wrangler:
npm run dev
  1. Deploy the worker:
npm run deploy

🧠 How It Works

  1. 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
  2. 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

This architecture enables:

  • Fast vector similarity search through Vectorize
在 GitHub 查看完整 README

安装

npx wrangler vectorize create mcp-memory-vectorize --dimensions 1024 --metric cosine
新手?先看 mcpskill.org 教程 →