Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      The Ultimate Guide to Node.js Development Pricing for Enterprises

      July 29, 2025

      Stack Overflow: Developers’ trust in AI outputs is worsening year over year

      July 29, 2025

      Web Components: Working With Shadow DOM

      July 28, 2025

      Google’s new Opal tool allows users to create mini AI apps with no coding required

      July 28, 2025

      5 preinstalled apps you should delete from your Samsung phone immediately

      July 30, 2025

      Ubuntu Linux lagging? Try my 10 go-to tricks to speed it up

      July 30, 2025

      How I survived a week with this $130 smartwatch instead of my Garmin and Galaxy Ultra

      July 30, 2025

      YouTube is using AI to verify your age now – and if it’s wrong, that’s on you to fix

      July 30, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Time-Controlled Data Processing with Laravel LazyCollection Methods

      July 30, 2025
      Recent

      Time-Controlled Data Processing with Laravel LazyCollection Methods

      July 30, 2025

      Create Apple Wallet Passes in Laravel

      July 30, 2025

      The Laravel Idea Plugin is Now FREE for PhpStorm Users

      July 30, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      New data shows Xbox is utterly dominating PlayStation’s storefront — accounting for 60% of the Q2 top 10 game sales spots

      July 30, 2025
      Recent

      New data shows Xbox is utterly dominating PlayStation’s storefront — accounting for 60% of the Q2 top 10 game sales spots

      July 30, 2025

      Opera throws Microsoft to Brazil’s watchdogs for promoting Edge as your default browser — “Microsoft thwarts‬‭ browser‬‭ competition‬‭‬‭ at‬‭ every‬‭ turn”

      July 30, 2025

      Activision once again draws the ire of players for new Diablo Immortal marketing that appears to have been made with generative AI

      July 30, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Machine Learning»Implementing Persistent Memory Using a Local Knowledge Graph in Claude Desktop

    Implementing Persistent Memory Using a Local Knowledge Graph in Claude Desktop

    April 27, 2025

    A Knowledge Graph Memory Server allows Claude Desktop to remember and organize information about a user across multiple chats. It can store things like user preferences, past conversations, and personal details. Because the information is saved as a knowledge graph, Claude can understand relationships between different pieces of information. This leads to more personalized responses and reduces repetition — you won’t have to explain the same things again and again.

    In this tutorial, we will implement a simple persistent memory using a local knowledge graph in Claude Desktop, to help it remember user information across chats and provide more personalized, consistent responses.

    Step 1: Installing the dependencies

    Node.js Installation

    We’ll be using npx to run the Knowledge Graph Memory Server, and for that, Node.js is required.

    • Download the latest version of Node.js from nodejs.org
    • Run the installer.
    • Leave all settings as default and complete the installation

    Claude Desktop Installation

    You can download the latest version of Claude Desktop at https://claude.ai/download. Next, you’ll need to configure Claude to connect with your MCP server. To do this, open the claude_desktop_config.json file located in the Claude directory using any text editor. If the file doesn’t exist, go ahead and create it manually.

    Step 2: Configuring the mcp.json file

    In the mcp.json file, enter the following code:

    Copy CodeCopiedUse a different Browser
    {
        "mcpServers": {
          "memory": {
            "command": "npx",
            "args": [
              "-y",
              "@modelcontextprotocol/server-memory"
            ],
            "env": {
                "MEMORY_PATH": "./memory.json"
            }
          }
        }
      }

    Step 3: Configuring Claude settings

    Now, we need to configure Claude so it can use the knowledge graph to create entities, build relationships, and retrieve relevant information.

    • Go to File > Settings > Claude Settings > Configure.
    • In the Personal Preferences section, add the following text: 

    (This preference will automatically apply to all conversations.)

    Copy CodeCopiedUse a different Browser
    Follow these steps for each interaction:
    
    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"
    
    3. 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)
    
    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
         b) Connect them to the current entities using relations
         b) Store facts about them as observations

    Once everything is configured, you will see 9 MCP tools available for the Knowledge Graph Server. These tools allow you to: create entities, create relationships, add observations, delete entities, delete observations, delete relationships, read the graph, search nodes, and open nodes.

    Additionally, the text we added in the preferences section enables Claude to automatically use these tools during conversations.

    Even if we go to a new chat, Claude will remember the information from the previous chats via the knowledge graph. The integration of this MCP tool enhances Claude’s ability to create, modify, and utilize knowledge in real-time, making it a powerful assistant for tasks like database management and SQL query generation. With this memory system in place, Claude becomes a more intelligent, responsive, and consistent tool for all your future interactions. For more details on the knowledge memory server, you can visit this link, where you’ll find resources to help you build even more advanced applications.


    Also, don’t forget to follow us on Twitter and join our Telegram Channel and LinkedIn Group. Don’t Forget to join our 90k+ ML SubReddit.

    🔥 [Register Now] miniCON Virtual Conference on AGENTIC AI: FREE REGISTRATION + Certificate of Attendance + 4 Hour Short Event (May 21, 9 am- 1 pm PST) + Hands on Workshop

    The post Implementing Persistent Memory Using a Local Knowledge Graph in Claude Desktop appeared first on MarkTechPost.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleWindows Recall finally launches, Oblivion Remastered surprise drops, and Drug Dealer Simulator devs speak out
    Next Article CVE-2025-46579 – GoldenDB DDE Injection Vulnerability

    Related Posts

    Machine Learning

    How to Evaluate Jailbreak Methods: A Case Study with the StrongREJECT Benchmark

    July 29, 2025
    Machine Learning

    Amazon Develops an AI Architecture that Cuts Inference Time 30% by Activating Only Relevant Neurons

    July 29, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    7 new features coming with the July 2025 Security Update for Windows 11

    News & Updates

    CVE-2025-7523 – Jinher OA XXE Vulnerability

    Common Vulnerabilities and Exposures (CVEs)
    Agentic AI in the SOC – Dawn of Autonomous Alert Triage

    Agentic AI in the SOC – Dawn of Autonomous Alert Triage

    Development

    CVE-2025-7474 – Job Diary SQL Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    CVE-2025-49483 – Falcon Linux, Kestrel, and Lapwing Linux ASR180x, ASR190x TR069 Resource Leak Exposure

    July 1, 2025

    CVE ID : CVE-2025-49483

    Published : July 1, 2025, 12:15 p.m. | 3 hours, 20 minutes ago

    Description : Improper Resource Shutdown or Release vulnerability in ASR180x 、ASR190x in tr069 modules allows Resource Leak Exposure. This vulnerability is associated with program files tr069/tr069_uci.c.

    This issue affects Falcon_Linux、Kestrel、Lapwing_Linux: before v1536.

    Severity: 5.4 | MEDIUM

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    CVE-2025-53277 – Infigo Software IS-theme-companion CSRF Object Injection

    June 27, 2025

    CVE-2025-5232 – PHPGurukul Student Study Center Management System SQL Injection Vulnerability

    May 27, 2025

    CVE-2025-40625 – TCMAN GIM Unauthenticated File Upload RCE

    May 6, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.