内存 MCP 服务器
模型上下文协议 (MCP) 服务器提供用于存储、检索和管理保存到本地文件的记忆的工具。
特征
使用可选标签存储文本记忆
通过文本或标签搜索记忆
检索所有存储的记忆
删除特定记忆
查看标签使用情况统计信息
持久存储在本地 JSON 文件中
安装
来自源
克隆此存储库
安装依赖项:
npm install构建服务器:
npm run build
用法
运行服务器
使用以下命令运行服务器:
其中storage-path
是您想要存储记忆文件的目录(默认为当前目录)。
使用 Claude for Desktop 进行设置
要将此服务器与 Claude for Desktop 一起使用:
打开您的 Claude for Desktop 配置文件:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%\Claude\claude_desktop_config.json
添加服务器配置:
重启 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
的文件中。
执照
麻省理工学院
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
模型上下文协议服务器使 Claude 能够在本地 JSON 文件中持久存储、搜索和管理带有标签的文本记忆。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server for Claude Desktop that provides structured memory management across chat sessions, allowing Claude to maintain context and build a knowledge base within project directories.Last updated -3
- AsecurityAlicenseAqualityA Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots.Last updated -315,70416MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables Claude to perform advanced web research with intelligent search queuing, enhanced content extraction, and deep research capabilities.Last updated -391MIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that provides Claude with access to search, retrieve, and analyze notes from the Bear App through natural language queries.Last updated -73