Memory MCP Server

Integrations

  • Supports installation on macOS systems, with specific configuration paths for Claude for Desktop integration.

内存 MCP 服务器

模型上下文协议 (MCP) 服务器提供用于存储、检索和管理保存到本地文件的记忆的工具。

特征

  • 使用可选标签存储文本记忆
  • 通过文本或标签搜索记忆
  • 检索所有存储的记忆
  • 删除特定记忆
  • 查看标签使用情况统计信息
  • 持久存储在本地 JSON 文件中

安装

来自源

  1. 克隆此存储库
  2. 安装依赖项:
    npm install
  3. 构建服务器:
    npm run build

用法

运行服务器

使用以下命令运行服务器:

npm start -- [storage-path]

其中storage-path是您想要存储记忆文件的目录(默认为当前目录)。

使用 Claude for Desktop 进行设置

要将此服务器与 Claude for Desktop 一起使用:

  1. 打开您的 Claude for Desktop 配置文件:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. 添加服务器配置:
{ "mcpServers": { "memory": { "command": "node", "args": [ "/path/to/mcp-memory-server/build/index.js", "/path/to/storage/directory" ] } } }
  1. 重启 Claude 桌面版。您可能需要强制退出所有正在运行的 Claude 进程,以使更改生效。

可用工具

该服务器公开以下工具:

store-memory

存储新的记忆。

参数:

  • content (字符串,必需):要存储的文本内容
  • tags (字符串数组,可选):用于对内存进行分类的标签

search-memories

尋找記憶。

参数:

  • searchTerm (字符串,可选):要在内存内容中搜索的文本
  • tag (字符串,可选):通过此标签过滤记忆

get-all-memories

检索所有存储的记忆。

参数:无

delete-memory

根据 ID 删除记忆。

参数:

  • id (字符串,必需):要删除的内存的 ID

get-tags-summary

获取所有已用标签的摘要。

参数:无

Claude 中的示例用法

以下是一些与 Claude 一起使用的示例查询:

  • “存储此信息:项目截止日期为2025年3月15日。标签:工作,截止日期”
  • “我有哪些与工作相关的记忆?”
  • “让我看看我所有的记忆”
  • “删除ID为abc123的内存”
  • “我的记忆里用过哪些标签?”

文件结构

服务器将记忆存储在指定存储目录中名为memories.json的文件中。

执照

麻省理工学院

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

模型上下文协议服务器使 Claude 能够在本地 JSON 文件中持久存储、搜索和管理带有标签的文本记忆。

  1. Features
    1. Installation
      1. From Source
    2. Usage
      1. Running the Server
      2. Setting up with Claude for Desktop
      3. Available Tools
    3. Example Usage in Claude
      1. File Structure
        1. License
          ID: snc2blz8el