
一个简单的MCP服务器,用于存储和检索多个LLM的内存。
概览
通过智能上下文归档保存、检索和管理记忆。MongoDB支持的存储。 一台MCP(模型上下文协议)服务器,为Cursor和Claude Desktop等AI编程环境提供内存管理和上下文窗口缓存。 - 💾 – MongoDB支持的会话存档 - 🧠 – 智能归档和对话上下文检索 - 🏷️ – 按标签组织和查找记忆 - 📊 – 自动评分归档内容相关性 - ⚡ – 光标一键安装或简单手动设置 准备好为您的AI工作流程添加内存了吗?
概述(AI 翻译)
用于大型语言模型对话的持久内存和上下文窗口缓存。 通过智能上下文归档保存、检索和管理内存。MongoDB支持的存储。
一台MCP(模型上下文协议)服务器,为Cursor和Claude Desktop等AI编程环境提供内存管理和上下文窗口缓存。
为什么要用内存MCP?
- 💾 持久存储——MongoDB支持的内存,能够在会话中存活下来
- 🧠 上下文缓存 – 智能归档和对话上下文检索
- 🏷️ 基于标签的搜索——通过标签组织和查找记忆
- 📊 相关性评分 – 自动对归档内容进行相关性评分
- ⚡ 简单设置 – 一键安装或简单手动设置
快速启动
准备好为你的AI工作流程添加内存了吗?几秒钟内安装:
安装在光标中(推荐):
🔗 在光标中安装
或者手动安装:
特色
基础记忆工具
save-memories– 将内存保存到数据库(覆盖现有记忆)get-memories– 检索所有存储的记忆add-memories– 添加新记忆而不覆盖clear-memories– 删除所有存储的记忆
上下文窗口缓存
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Memory MCP Server (Embedded GraphRAG + Vector Memory)
Persistent knowledge graph memory and context window caching for LLM conversations. Built on an embedded KuzuDB Cypher graph database with local HuggingFace vector embeddings (
Xenova/all-MiniLM-L6-v2) — zero external database setup required.
An MCP (Model Context Protocol) server that provides hybrid semantic vector + multi-hop Cypher graph memory retrieval and context window caching for AI coding environments like Cursor and Claude Desktop.
Why Use Memory MCP?
- Embedded Knowledge Graph (KuzuDB) – Stores entities, observations, and typed relationships in a local, in-process Cypher graph database (
~/.memory-mcp/graph_db) with zero external setup. - Hybrid Vector + Graph Retrieval – Uses local 384-d embeddings (
Xenova/all-MiniLM-L6-v2) and Kuzuarray_cosine_similarityto find entry nodes, then traverses 1–3 relationship hops via Cypher so the LLM only receives compact, high-signal facts. - Context Window Caching – Intelligent archiving, semantic relevance scoring, and graph-linked summaries (
Summarizes/Mentionsedges). - Zero-Config Install – No MongoDB or Neo4j server required.
Quick Start
Install in Cursor (Recommended):
Or install manually:
npm install -g @jamesanz/memory-mcp
# Or from source:
git clone https://github.com/JamesANZ/memory-mcp.git
cd memory-mcp && npm install && npm run build
Features
Knowledge Graph & Hybrid Retrieval Tools
store-graph-memory– Upsert structured entities (name,entityType,observations[]) and directedrelations(from,to,relationType) with automatic 384-d embeddings.query-memory– Hybrid semantic vector + multi-hop Cypher traversal query that returns only the relevant connected subgraph and memory chunks.remove-graph-entities– Remove outdated entities or specific relationships so contradictory facts do not linger.
Basic Memory Tools
save-memories– Save memories to the graph database (overwrites existing)get-memories– Retrieve all stored memory logsadd-memories– Append new memories and auto-extract entity mentionsclear-memories– Remove all stored memories and graph entities
Context Window Caching
archive-context– Archive conversation context with tags and vector embeddingsretrieve-context– Retrieve relevant archived contextscore-relevance– Score archived content relevance using vector cosine similaritycreate-summary– Create summaries of archived content linked viaSummarizesedges
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"memory-mcp": {
"command": "node",
"args": ["/absolute/path/to/memory-mcp/build/index.js"]
}
}
}