Skip to main content
Glama

MCP Memory Server

by ebailey78

MCP内存服务器

Claude Desktop 的模型上下文协议 (MCP) 服务器可在聊天会话中提供结构化内存管理,专为基于项目的工作而设计。

以项目为中心的内存管理

此 MCP 服务器专为帮助 Claude 与 Claude Desktop 配合使用时维护项目目录中的上下文和知识而设计。它允许 Claude 执行以下操作:

  • 在项目目录中创建内存存储
  • 保存对话中发现的重要信息
  • 在未来的会话中检索相关记忆
  • 随着时间的推移,建立有关您的项目的全面知识库

这种方法非常适合长期项目,因为在这些项目中,维护会话之间的上下文至关重要,例如软件开发、研究、写作或与 Claude 的任何合作工作。

特征

  • 将记忆存储为结构化 Markdown 文件
  • 使用 Lunr.js 索引内存以实现高效检索
  • 标记和分类记忆
  • 在记忆之间建立关系
  • 按内容、标签或类型搜索记忆
  • 在指定目录中构建内存存储

内存结构

记忆以分层结构存储在您的项目中:

/your-project-directory /memory # Memory store created by Claude /entities/ # Information about specific entities (people, projects, etc.) /concepts/ # Abstract concepts or knowledge /sessions/ # Session-specific memories /index.json # Lunr.js search index /metadata.json # Overall memory metadata /README.md # Auto-generated documentation

此结构可使所有与项目相关的记忆在您的项目目录中保持有序且可访问。

与 Claude Desktop 一起使用

将其添加到您的 claude_desktop_config.json 中:

{ "mcpServers": { "memory": { "command": "node", "args": ["path/to/mcp-memory/dist/index.js"] } } }

您还可以使用环境变量设置自定义内存目录:

{ "mcpServers": { "memory": { "command": "node", "args": ["path/to/mcp-memory/dist/index.js"], "env": { "MEMORY_DIR": "/path/to/custom/memory/directory" } } } }

项目工作流程

  1. 设置:使用 Claude 启动新项目时,让它在项目目录中创建一个内存存储
  2. 正在进行的工作:当您与 Claude 合作时,它会将重要信息保存到内存存储中
  3. 连续性:在未来的会议中,克劳德可以检索相关记忆来保持背景
  4. 知识构建:随着时间的推移,Claude 会构建关于您项目的全面知识库

这种工作流程确保 Claude 保持特定于每个项目的背景和知识,从而使其成为更有效的长期合作者。

克劳德项目说明

此代码库包含一个instructions_template.md文件,该文件提供了 Claude 项目指令的综合模板。您可以根据具体项目自定义此模板,以帮助 Claude 有效地使用记忆系统。

该模板包括:

  • 内存系统设置说明
  • 记忆检索过程
  • 内存创建指南
  • 记忆组织系统
  • 记忆维护程序
  • 对话工作流程
  • 最佳实践

发展

# Install dependencies npm install # Build the project npm run build # Start the server npm start # Development mode (watch for changes) npm run dev

实现细节

该服务器使用以下方式构建:

  • 官方模型上下文协议 (MCP) SDK
  • TypeScript 类型安全
  • Lunr.js 用于内存索引和搜索
  • Zod 用于模式验证

执照

麻省理工学院

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

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

Claude Desktop 的模型上下文协议服务器,可在聊天会话中提供结构化内存管理,允许 Claude 维护上下文并在项目目录中构建知识库。

  1. 以项目为中心的内存管理
    1. 特征
      1. 内存结构
        1. 与 Claude Desktop 一起使用
          1. 项目工作流程
            1. 克劳德项目说明
              1. 发展
                1. 实现细节
                  1. 执照

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol server that enables Claude Desktop users to interact directly with PostHog, allowing them to view projects and create annotations through natural language commands.
                      Last updated -
                      2
                      10
                      Python
                      MIT License
                      • Apple
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A collection of Model Context Protocol servers that enable Claude Desktop to provide development assistance capabilities with filesystem, Git, shell command, and web search functionality without incurring API usage costs.
                      Last updated -
                      2
                      19
                      TypeScript
                      MIT License
                      • Apple
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A Model Context Protocol server that enables AI assistants like Claude to interact with Zulip workspaces, supporting capabilities such as posting messages, listing channels, sending direct messages, and accessing conversation history.
                      Last updated -
                      JavaScript
                      Apache 2.0
                    • A
                      security
                      A
                      license
                      A
                      quality
                      A Model Context Protocol server that allows Claude Desktop to manage and execute tasks in a queue-based system, supporting planning, execution, and completion phases.
                      Last updated -
                      10
                      1,397
                      5
                      TypeScript
                      MIT License
                      • Apple

                    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/ebailey78/mcp-memory'

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