Give Your AI a Memory That Survives Between Sessions

beginnerSetup time: 5 minutes

By default, AI conversations start fresh each time. The Memory MCP server changes that — it stores a knowledge graph of entities and relationships on your machine, and the AI can read and write to it across sessions. Tell it once; it remembers.

Servers You'll Need

Step-by-Step Setup

  1. 1

    Install the memory server

    `npm install -g @modelcontextprotocol/server-memory`. This server stores a JSON knowledge graph in your home directory.

  2. 2

    Add to your config

    Add it to your AI client config. No API keys required — it's entirely local.

  3. 3

    Tell the AI what to remember

    In a new conversation, explicitly ask the AI to remember things: "Remember that my main project is called Atlas and uses a PostgreSQL database at localhost:5432." It will store this as entities and relations.

  4. 4

    Watch it recall in future sessions

    In your next session, the AI will read from the memory graph before answering. You can also ask it to recall what it knows about a topic.

Example Prompts to Try

  • Remember that my preferred coding style uses 2-space indentation and TypeScript strict mode
  • What do you know about my project setup?
  • Remember that the database password is stored in .env.local, never in code
  • Forget what you know about the old API endpoint
  • What have I told you about my team's preferences?

Tips

  • Seed the memory at the start of a project with key context: tech stack, team conventions, project goals.
  • The memory graph is stored locally — back it up if you rely on it heavily.
  • Be explicit when you want something remembered vs. just mentioned in conversation.

FAQ

Is the memory stored in the cloud?

No. The Memory MCP server stores everything in a local JSON file on your machine. It never leaves your computer.

How much can it store?

The knowledge graph is a JSON file with no hard limit. Practically, very large graphs may slow the AI's context processing since the full graph is loaded each session.