Memory MCP Server

Official

Store entities, relations and observations in a local knowledge graph with the reference Memory MCP server.

Local serverstdioTypeScriptMIT★ 63.0k

What is the Memory MCP Server?

The reference Memory MCP server gives an assistant a persistent knowledge graph. It stores named entities, relationships between them and text observations attached to entities, making it useful for project facts that should be retrieved explicitly in a later task.

Save facts in a structure you can inspect

For a project, create an entity for a service or decision and attach a concise observation. Connect related entities with a named relationship. Ask the assistant to read or search the graph before relying on an earlier fact. Installing the server does not automatically import every past conversation.

Choose the storage file

Run @modelcontextprotocol/server-memory with npx. The server stores its graph in a JSONL file; MEMORY_FILE_PATH selects a custom location. Use a stable absolute path if you want the same graph across sessions. This is a graph and text-search reference implementation, so avoid assuming it provides a separate vector database or semantic retrieval engine.

Setup and tool documentation. Explore related MCP servers.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
create_entitiesCreate named graph entities with observations.
create_relationsConnect existing entities.
add_observationsAdd facts to entities.
search_nodesSearch graph nodes.
read_graphRetrieve the stored knowledge graph.

How to install the Memory MCP Server

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ],
      "env": {
        "MEMORY_FILE_PATH": "/absolute/path/to/project-memory.jsonl"
      }
    }
  }
}

Replace the example path with a writable absolute file path.

Configuration

Node.js with npx and a writable location for the graph file.

VariableDescriptionRequired
MEMORY_FILE_PATHOptional custom path for the JSONL graph file.Optional

Example prompts to try

  • “Store our chosen API version as a project decision and relate it to the backend service.”

Frequently asked questions

It stores a local JSONL graph. MEMORY_FILE_PATH can specify a custom file location.