MCP Memory Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Stores memories as structured markdown files in a hierarchical organization system with support for categorization and relationships between memories.

  • Uses TypeScript for type safety in the implementation of the memory management system.

  • Utilizes Zod for schema validation of memory structures.

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

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

  1. Project-Focused Memory Management
    1. Features
      1. Memory Structure
        1. Usage with Claude Desktop
          1. Project Workflow
            1. Claude Project Instructions
              1. Development
                1. Implementation Details
                  1. License
                    ID: pqd0je4v10