Knowledge Graph Memory Server

Memoria personalizada: PouchDB 🧠

Este proyecto añade nuevas funcionalidades al servidor de memoria del equipo de MCP. Permite la creación y gestión de un grafo de conocimiento que captura interacciones mediante un modelo de lenguaje (LLM). 🚀

Este repositorio se bifurcó de https://github.com/BRO3886/mcp-memory-custom , lo cual fue un excelente punto de partida. Gracias de nuevo por corregir las marcas de tiempo. El objetivo de este repositorio era principalmente solucionar el problema con un archivo JSON cada vez más grande para el contexto.

Nuevas funciones ✨

1. Integración con PouchDB 💾

  • El servidor ahora utiliza PouchDB para un almacenamiento robusto basado en documentos
  • ¿Por qué?: Mejor consistencia de datos, control de versiones integrado y rendimiento mejorado para grandes conjuntos de datos.
  • Mantiene copias de seguridad de archivos para compatibilidad.

2. Rutas de memoria personalizadas 📁

  • Los usuarios ahora pueden especificar diferentes rutas de archivos de memoria para varios proyectos
  • ¿Por qué? : Esta función mejora la organización y la gestión de los datos de memoria, lo que permite el almacenamiento de memoria específico del proyecto.

3. Sellado de tiempo ⏰

  • El servidor ahora genera marcas de tiempo para las interacciones
  • ¿Por qué?: Las marcas de tiempo permiten rastrear cuándo se creó o modificó cada memoria, lo que proporciona un mejor contexto e historial para los datos almacenados.

Empezando 🚀

Prerrequisitos 🔧

  • Node.js (versión 16 o superior)
  • PouchDB (instalado automáticamente como dependencia)

Instalación mediante Smithery 📦

Para instalar Knowledge Graph Memory Server para Claude Desktop automáticamente a través de Smithery :

npx -y @smithery/cli install @bneil/mcp-memory-pouchdb --client claude

Instalación 🛠️

  1. Clonar el repositorio:
    git clone git@github.com:bneil/mcp-memory-pouchdb.git cd mcp-memory-pouchdb
  2. Instalar las dependencias:
    npm install

Configuración ⚙️

El servidor requiere que se configuren dos variables de entorno:

  1. MEMORY_FILE_PATH : La ruta absoluta donde se almacenará el archivo de respaldo de memoria
  2. POUCHDB_PATH : La ruta absoluta donde se almacenará la base de datos PouchDB

Ejemplo de configuración en su 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" } } } }

El servidor no podrá iniciarse si alguna de las variables de entorno no está configurada. 🚫

Variables de entorno opcionales:

  • POUCHDB_OPTIONS : cadena JSON de opciones de configuración adicionales de PouchDB
  • DISABLE_MEMORY_FILE : Establézcalo en "verdadero" para deshabilitar el guardado en el archivo memory.json (solo use PouchDB para almacenamiento)

Ejecutando el servidor 🚀

Actualizando el archivo json del servidor mcp 📝

Agregue esto a su archivo 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" } } } }

Cambios en el aviso del sistema:

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).
Ejecutando el servidor localmente 💻

Para iniciar el servidor de memoria de Knowledge Graph, ejecute:

npm run build node dist/index.js

El servidor escuchará las solicitudes a través de entrada/salida estándar.

Puntos finales de API 🔌

El servidor expone varias herramientas que pueden llamarse con parámetros específicos:

  • Obtener la hora actual
  • Establecer la ruta del archivo de memoria 📁
  • Crear entidades
  • Crea relaciones 🔗
  • Añadir observaciones 📝
  • Eliminar entidades
  • Eliminar observaciones 🗑️
  • Eliminar relaciones 🔗
  • Leer gráfico 📖
  • Nodos de búsqueda 🔍
  • Nodos abiertos 🔓

Agradecimientos 🙏

  • Inspirado en el servidor Memory de Anthropic
  • Desarrollado con PouchDB para un almacenamiento de datos robusto 💾
-
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.

Mejora el servidor de memoria MCP al implementar PouchDB para un almacenamiento sólido de documentos y permitir la creación y gestión de un gráfico de conocimiento que captura interacciones a través de modelos de lenguaje.

  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