Knowledge Graph Memory Server

메모리 사용자 정의 : PouchDB 🧠

이 프로젝트는 MCP 팀이 제공하는 메모리 서버에 새로운 기능을 추가합니다. 언어 모델(LLM)을 통해 상호작용을 포착하는 지식 그래프를 생성하고 관리할 수 있습니다. 🚀

이 저장소는 https://github.com/BRO3886/mcp-memory-custom 에서 포크되었는데, 좋은 시작점이 되었습니다. 타임스탬프를 수정해 주셔서 다시 한번 감사드립니다. 이 저장소의 목표는 컨텍스트를 위한 JSON 파일이 계속 늘어나는 문제를 해결하는 것이었습니다.

새로운 기능 ✨

1. PouchDB 통합 💾

  • 이제 서버는 강력한 문서 기반 저장소를 위해 PouchDB를 사용합니다.
  • 이유 : 더 나은 데이터 일관성, 내장된 버전 관리 및 대용량 데이터 세트에 대한 향상된 성능
  • 호환성을 위해 파일 백업을 유지합니다.

2. 사용자 정의 메모리 경로 📁

  • 이제 사용자는 다양한 프로젝트에 대해 다른 메모리 파일 경로를 지정할 수 있습니다.
  • 이유 : 이 기능은 메모리 데이터의 구성 및 관리를 향상시켜 프로젝트별 메모리 저장을 가능하게 합니다.

3. 타임스탬핑 ⏰

  • 이제 서버는 상호작용에 대한 타임스탬프를 생성합니다.
  • 이유 : 타임스탬프를 사용하면 각 메모리가 생성되거나 수정된 시점을 추적할 수 있으므로 저장된 데이터에 대한 더 나은 컨텍스트와 기록을 제공할 수 있습니다.

시작하기 🚀

필수 조건 🔧

  • Node.js(버전 16 이상)
  • PouchDB(종속성으로 자동 설치됨)

Smithery를 통해 설치 📦

Smithery 를 통해 Claude Desktop용 Knowledge Graph Memory Server를 자동으로 설치하려면:

지엑스피1

설치 🛠️

  1. 저장소를 복제합니다.
    git clone git@github.com:bneil/mcp-memory-pouchdb.git cd mcp-memory-pouchdb
  2. 종속성을 설치합니다.
    npm install

구성 ⚙️

서버에는 두 개의 환경 변수를 설정해야 합니다.

  1. MEMORY_FILE_PATH : 메모리 백업 파일이 저장될 절대 경로
  2. POUCHDB_PATH : PouchDB 데이터베이스가 저장될 절대 경로

claude_desktop_config.json / .cursor/mcp.json 의 구성 예:

{ "mcpServers": { "memory": { "command": "node", "args": ["/path/to/mcp-memory-pouchdb/dist/index.js"], "env": { "MEMORY_FILE_PATH": "/path/to/custom/memory.json", "POUCHDB_PATH": "/path/to/custom/pouchdb_directory", "DISABLE_MEMORY_FILE": "true" } } } }

두 환경 변수 중 하나가 설정되지 않으면 서버가 시작되지 않습니다. 🚫

선택적 환경 변수:

  • POUCHDB_OPTIONS : 추가 PouchDB 구성 옵션의 JSON 문자열
  • DISABLE_MEMORY_FILE : memory.json 파일에 저장을 비활성화하려면 "true"로 설정합니다(저장에는 PouchDB만 사용).

서버 실행 🚀

mcp 서버 json 파일 업데이트 📝

claude_desktop_config.json / .cursor/mcp.json 파일에 다음을 추가하세요.

{ "mcpServers": { "memory": { "command": "node", "args": ["/path/to/mcp-memory-pouchdb/dist/index.js"], "env" : { "MEMORY_FILE_PATH":"/home/.../local_dbs/memory.json", "POUCHDB_PATH":"/home/.../local_dbs/pouchdb" } } } }

시스템 프롬프트 변경 사항:

Follow these steps for each interaction: 0. Memory Initialization: - At startup, execute a read_graph function to initialize memory access - If memory is empty, create a default entity for the user with basic placeholder info - Run initialization sequence: read_graph → create_entities → read_graph 1. User Identification: - You should assume that you are interacting with default_user - If you have not identified default_user, proactively try to do so 2. 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" - Verify memory access is functioning properly 3. Memory Attention: - 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) 4. 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 5. Error Recovery: - If memory retrieval fails, execute read_graph function immediately - Log any memory access failures for debugging - Continue the conversation with best available information 6. Memory Validation: - Periodically verify that memory access is functional by checking for core entities - If validation fails, attempt reconnection via read_graph 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 3).
로컬에서 서버 실행하기 💻

지식 그래프 메모리 서버를 시작하려면 다음을 실행하세요.

npm run build node dist/index.js

서버는 표준 입출력을 통해 요청을 수신합니다.

API 엔드포인트 🔌

서버는 특정 매개변수로 호출할 수 있는 여러 도구를 제공합니다.

  • 현재 시간 가져오기
  • 메모리 파일 경로 설정 📁
  • 엔터티 생성
  • 관계 만들기 🔗
  • 관찰 추가 📝
  • 엔터티 삭제
  • 관찰 내용 삭제 🗑️
  • 관계 삭제 🔗
  • 그래프 읽기 📖
  • 노드 검색 🔍
  • 오픈 노드 🔓

감사의 말 🙏

  • Anthropic의 메모리 서버에서 영감을 받았습니다.
  • 강력한 데이터 저장을 위해 PouchDB를 사용합니다. 💾
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

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

강력한 문서 저장을 위해 PouchDB를 구현하고 언어 모델을 통해 상호 작용을 포착하는 지식 그래프의 생성 및 관리를 활성화하여 MCP 메모리 서버를 향상시킵니다.

  1. New Features ✨
    1. 1. PouchDB Integration 💾
    2. 2. Custom Memory Paths 📁
    3. 3. Timestamping ⏰
  2. Getting Started 🚀
    1. Prerequisites 🔧
    2. Installing via Smithery 📦
    3. Installation 🛠️
    4. Configuration ⚙️
    5. Running the Server 🚀
  3. API Endpoints 🔌
    1. Acknowledgments 🙏

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        This project is based on the Knowledge Graph Memory Server from the MCP servers repository and retains its core functionality.
        Last updated -
        44
        107
        TypeScript
        MIT License
        • Apple
      • A
        security
        A
        license
        A
        quality
        A customized MCP memory server that enables creation and management of a knowledge graph with features like custom memory paths and timestamping for capturing interactions via language models.
        Last updated -
        11
        2
        JavaScript
        MIT License
        • Apple
      • A
        security
        A
        license
        A
        quality
        A memory server for Claude that stores and retrieves knowledge graph data in DuckDB, enhancing performance and query capabilities for conversations with persistent user information.
        Last updated -
        8
        48
        25
        TypeScript
        MIT License
        • Apple
      • -
        security
        A
        license
        -
        quality
        Enhanced knowledge graph memory server for AI assistants that uses Neo4j as the backend storage engine, enabling powerful graph queries and efficient storage of user interaction information with full MCP protocol compatibility.
        Last updated -
        TypeScript
        MIT License

      View all related MCP servers

      ID: mw0ta0gz8j