Skip to main content
Glama

Claude Memory MCP Server

by WhenMoon-afk

Claude 内存 MCP 服务器

MCP(模型上下文协议)服务器实现,为大型语言模型提供持久内存功能,专门设计用于与 Claude 桌面应用程序集成。

许可证:MIT

概述

该项目基于对该领域现有方法的全面研究,实现了最佳记忆技术。它为 Claude 提供了一种标准化方法,使其能够在对话和会话中保持持久记忆。

特征

  • 分层内存架构:短期、长期和存档内存层
  • 多种记忆类型:支持对话、知识、实体和反思
  • 语义搜索:根据语义相似性检索记忆
  • 自动内存管理:无需明确命令的智能内存捕获
  • 记忆巩固:自动将短期记忆巩固为长期记忆
  • 记忆管理:基于重要性的记忆保留和遗忘
  • Claude 集成:可与 Claude 桌面应用程序集成
  • MCP 协议支持:兼容模型上下文协议
  • Docker 支持:使用 Docker 容器轻松部署

快速入门

选项 1:使用 Docker(推荐)

# Clone the repository git clone https://github.com/WhenMoon-afk/claude-memory-mcp.git cd claude-memory-mcp # Start with Docker Compose docker-compose up -d

配置 Claude Desktop 以使用容器化的 MCP 服务器(有关详细信息,请参阅Docker 使用指南)。

选项 2:标准安装

  1. 先决条件
    • Python 3.8-3.12
    • pip 包管理器
  2. 安装
    # Clone the repository git clone https://github.com/WhenMoon-afk/claude-memory-mcp.git cd claude-memory-mcp # Install dependencies pip install -r requirements.txt # Run setup script chmod +x setup.sh ./setup.sh
  3. Claude 桌面集成将以下内容添加到您的 Claude 配置文件中:
    { "mcpServers": { "memory": { "command": "python", "args": ["-m", "memory_mcp"], "env": { "MEMORY_FILE_PATH": "/path/to/your/memory.json" } } } }

与克劳德一起运用记忆

记忆 MCP 服务器使 Claude 能够记住对话中的信息,而无需明确的命令。

  1. 自动记忆:克劳德将自动:
    • 记住您分享的重要细节
    • 存储用户偏好和事实
    • 在需要时回忆相关信息
  2. 记忆回忆:要了解克劳德记得什么,只需询问:
    • “你还记得我什么吗?”
    • “你对我的喜好了解多少?”
  3. 系统提示:为了优化内存使用,请将其添加到您的 Claude 系统提示中:
    This Claude instance has been enhanced with persistent memory capabilities. Claude will automatically remember important details about you across conversations and recall them when relevant, without needing explicit commands.

有关详细的使用说明和示例,请参阅用户指南

文档

示例

examples目录包含演示如何与 Memory MCP 服务器交互的脚本:

  • store_memory_example.py :存储记忆的示例
  • retrieve_memory_example.py :检索记忆的示例

故障排除

如果您遇到问题:

  1. 查看兼容性指南了解依赖项要求
  2. 确保你的 Python 版本是 3.8-3.12
  3. 对于 NumPy 问题,请使用: pip install "numpy>=1.20.0,<2.0.0"
  4. 尝试使用 Docker 简化部署

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

为 Claude 提供持久内存功能的 MCP 服务器,提供具有语义搜索、内存整合和与 Claude 桌面应用程序集成的分层内存架构。

  1. 概述
    1. 特征
      1. 快速入门
        1. 选项 1:使用 Docker(推荐)
        2. 选项 2:标准安装
      2. 与克劳德一起运用记忆
        1. 文档
          1. 示例
            1. 故障排除
              1. 贡献
                1. 执照

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Python-based server that implements the Model Context Protocol to interface with Claude Desktop as an MCP client, supporting interaction through efficient memory management.
                    Last updated -
                    1
                    Python
                    MIT License
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A custom Memory MCP Server that acts as a cache for Infrastructure-as-Code information, allowing users to store, summarize, and manage notes with a custom URI scheme and simple resource handling.
                    Last updated -
                    23
                    1
                    Python
                    MIT License
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A high-performance MCP server utilizing libSQL for persistent memory and vector search capabilities, enabling efficient entity management and semantic knowledge storage.
                    Last updated -
                    6
                    85
                    56
                    TypeScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    An MCP server that allows Claude and other LLMs to manage persistent memories across conversations through text file storage, enabling commands to add, search, delete and list memory entries.
                    Last updated -
                    2
                    TypeScript

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/WhenMoon-afk/claude-memory-mcp'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server