Memory Custom

Memory Custom

一个定制的 MCP 内存服务器,能够创建和管理知识图谱,并具有自定义内存路径和时间戳等功能,用于捕获通过语言模型进行的交互。

AI记忆系统
数据库交互
数据与应用分析
访问服务器

Tools

set_memory_file_path

Set the memory file path

get_current_time

Get the current time

create_entities

Create multiple new entities in the knowledge graph

create_relations

Create multiple new relations between entities in the knowledge graph. Relations should be in active voice

add_observations

Add new observations to existing entities in the knowledge graph

delete_entities

Delete multiple entities and their associated relations from the knowledge graph

delete_observations

Delete specific observations from entities in the knowledge graph

delete_relations

Delete multiple relations from the knowledge graph

read_graph

Read the entire knowledge graph

search_nodes

Search for nodes in the knowledge graph based on a query

open_nodes

Open specific nodes in the knowledge graph by their names

README

Memory Custom

smithery badge

此项目为 MCP 团队提供的 Memory 服务器添加了新功能。它允许创建和管理知识图谱,该图谱通过语言模型 (LLM) 捕获交互。

<a href="https://glama.ai/mcp/servers/w6hi2myrxq"> <img width="380" height="200" src="https://glama.ai/mcp/servers/w6hi2myrxq/badge" alt="Memory Custom MCP server" /> </a>

新功能

1. 自定义内存路径

  • 用户现在可以为不同的项目指定不同的内存文件路径。
  • 原因?:此功能增强了内存数据的组织和管理,允许项目特定的内存存储。

2. 时间戳

  • 服务器现在为交互生成时间戳。
  • 原因?:时间戳能够跟踪每个内存的创建或修改时间,为存储的数据提供更好的上下文和历史记录。

开始使用

前提条件

  • Node.js(版本 16 或更高)

通过 Smithery 安装

要通过 Smithery 自动为 Claude Desktop 安装 Knowledge Graph Memory Server:

npx -y @smithery/cli install @BRO3886/mcp-memory-custom --client claude

安装

  1. 克隆存储库:

    git clone git@github.com:BRO3886/mcp-memory-custom.git
    cd mcp-memory-custom
    
  2. 安装依赖项:

    npm install
    

配置

在运行服务器之前,您可以设置 MEMORY_FILE_PATH 环境变量来指定内存文件的路径。 如果未设置,服务器将默认使用与脚本位于同一目录中的 memory.json

运行服务器

更新 mcp server json 文件

将此添加到您的 claude_desktop_config.json / .cursor/mcp.json 文件中:

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

系统提示更改:

Follow these steps for each interaction:
1. The memoryFilePath for this project is /path/to/memory/project_name.json - always pass this path to the memory file operations (when creating entities, relations, or retrieving memory etc.)
2. User Identification:
   - You should assume that you are interacting with default_user
   - If you have not identified default_user, proactively try to do so.

3. Memory Retrieval:
   - Always begin your chat by saying only "Remembering..." and retrieve all relevant information from your knowledge graph
   - Always refer to your knowledge graph as your "memory"

4. Memory
   - While conversing with the user, be attentive to any new information that falls into these categories:
     a) Basic Identity (age, gender, location, job title, education level, etc.)
     b) Behaviors (interests, habits, etc.)
     c) Preferences (communication style, preferred language, etc.)
     d) Goals (goals, targets, aspirations, etc.)
     e) Relationships (personal and professional relationships up to 3 degrees of separation)

5. Memory Update:
   - If any new information was gathered during the interaction, update your memory as follows:
     a) Create entities for recurring organizations, people, and significant events, add timestamps to wherever required. You can get current timestamp via get_current_time
     b) Connect them to the current entities using relations
     c) Store facts about them as observations, add timestamps to observations via get_current_time


IMPORTANT: Provide a helpful and engaging response, asking relevant questions to encourage user engagement. Update the memory during the interaction, if required, based on the new information gathered (point 4).

在本地运行服务器

要启动 Knowledge Graph Memory Server,请运行:

npm run build
node dist/index.js

服务器将通过标准输入/输出监听请求。

API 端点

服务器公开了几个可以使用特定参数调用的工具:

  • 获取当前时间
  • 设置内存文件路径
  • 创建实体
  • 创建关系
  • 添加观察
  • 删除实体
  • 删除观察
  • 删除关系
  • 读取图
  • 搜索节点
  • 打开节点

致谢

  • 灵感来自 Anthropic 的 Memory 服务器。

推荐服务器

VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
AIO-MCP Server

AIO-MCP Server

🚀 集成了 AI 搜索、RAG 和多服务(GitLab/Jira/Confluence/YouTube)的一体化 MCP 服务器,旨在增强 AI 驱动的开发工作流程。来自 Folk。

精选
本地
Knowledge Graph Memory Server

Knowledge Graph Memory Server

为 Claude 实现持久性记忆,使用本地知识图谱,允许 AI 记住用户的信息,并可在自定义位置存储,跨对话保持记忆。

精选
本地
Hyperbrowser

Hyperbrowser

欢迎来到 Hyperbrowser,人工智能的互联网。Hyperbrowser 是下一代平台,旨在增强人工智能代理的能力,并实现轻松、可扩展的浏览器自动化。它专为人工智能开发者打造,消除了本地基础设施和性能瓶颈带来的麻烦,让您能够:

精选
本地
any-chat-completions-mcp

any-chat-completions-mcp

将 Claude 与任何 OpenAI SDK 兼容的聊天完成 API 集成 - OpenAI、Perplexity、Groq、xAI、PyroPrompts 等。

精选
Exa MCP Server

Exa MCP Server

一个模型上下文协议服务器,它使像 Claude 这样的人工智能助手能够以安全和受控的方式,使用 Exa AI 搜索 API 执行实时网络搜索。

精选
BigQuery MCP Server

BigQuery MCP Server

这是一个服务器,可以让你的大型语言模型(LLM,比如Claude)直接与你的BigQuery数据对话!可以把它想象成一个友好的翻译器,它位于你的AI助手和数据库之间,确保它们可以安全高效地进行交流。

精选