mem0 MCP 服务器
用于 mem0 的模型上下文协议 (MCP) 服务器的 TypeScript 实现,通过 Mem0 集成提供内存流功能。
特征
使用 Mem0 集成创建内存流
将内容附加到内存流
使用 Mem0 的语义搜索来搜索记忆
从内存流读取
基于资源的内存流访问
删除内存流
先决条件
Node.js 和 npm 已安装
Mem0 API 密钥(从mem0.ai获取)
安装
配置
将您的 Mem0 API 密钥设置为环境变量:
建筑
运行服务器
测试
运行测试客户端来验证服务器功能:
API
工具
create-memory-stream
参数:
name
:字符串initialContent
:字符串(可选)userId
:字符串(可选)- Mem0 用户 IDagentId
:字符串(可选)- Mem0 代理 ID
返回:流 ID 和元数据
append-to-stream
参数:
streamId
:字符串content
:字符串role
:“用户”|“助理”(可选)
返回:成功确认
search-memories
参数:
query
:字符串userId
:字符串agentId
:字符串(可选)threshold
:数字(可选)
返回:来自 Mem0 的搜索结果
read-stream
参数:
streamId
:字符串startIndex
:数字(可选)endIndex
:数字(可选)
返回:流内容
delete-stream
参数:
streamId
:字符串
返回:删除确认
资源
memory://{streamId}
- 直接访问内存流内容memory://
- 列出所有内存流
发展
该服务器使用 MCP TypeScript SDK 实现,并与 Mem0 集成,用于持久内存存储和语义搜索。扩展实现方式如下:
添加更多 Mem0 功能(例如,内存标记、元数据)
实施适当的错误处理
添加身份验证和授权
添加额外的内存操作
执照
麻省理工学院
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器的 TypeScript 实现,可通过 Mem0 集成实现内存流的创建、管理和语义搜索。
Related MCP Servers
- AsecurityFlicenseAqualityA TypeScript-based template for developing Model Context Protocol servers with features like dependency injection and service-based architecture, facilitating the creation and integration of custom data processing tools.Last updated -124
- -securityFlicense-qualityA TypeScript framework for building Model Context Protocol (MCP) servers with automatic discovery and loading of tools, resources, and prompts.Last updated -0
- -securityFlicense-qualityA starter template for creating Model Context Protocol servers using TypeScript, providing basic setup and sample tool implementation for developers to build their own MCP servers.Last updated -
- -securityAlicense-qualityA Model Context Protocol server that integrates AI assistants with Mem0.ai's persistent memory system, allowing models to store, retrieve, search, and manage different types of memories.Last updated -12MIT License