liveBook · Manning

MCP memory server

As explained in AI Agents in Action, Second Edition

The MCP memory server is the official reference MCP server that provides persistent memory through a local knowledge graph.

The MCP memory server gives a cognitive agent persistent long-term memory through a local knowledge graph. It runs locally, needs no external database or embedding service, and persists its state in a JSON file. section 10.2.8

Think of the knowledge graph as structured institutional memory rather than a flat interaction log:

  • Entities represent primary nodes, such as problem types. section 10.2.8
  • Observations attach discrete information to entities, such as successful strategies or outcomes. section 10.2.8
  • Relations connect entities with directed links, including related problems, useful tool combinations, and known failure modes. section 10.2.8

The memory module makes these primitives active in the cognitive cycle. Before planning, it retrieves relevant entities and observations; after evaluation, it records the result; when strategies transfer across problem types, it builds relations. section 10.2.8

Minimal local configuration

Configure the server as an MCP server launched with npx and @modelcontextprotocol/server-memory. A memory agent can then use search_nodes for proactive retrieval, create_entities for new problem types, and add_observations for strategies and outcomes.

Figure 10.7 The memory module’s three behaviors layered on the MCP memory server

Inspect the layered flow from the MCP knowledge graph to proactive retrieval, experience recording, and relation building. section 10.2.8

How AI Agents in Action, Second Edition covers it

How deep it goes
Defines three graph primitives and their lifecycle, while deferring detailed implementation beyond the configuration and module listing.
Examples
Uses problem types, strategies, outcomes, failure modes, tool combinations, and a local JSON-backed server configuration.
What it assumes
Assumes an MCP-connected cognitive agent but introduces entities, observations, relations, retrieval, and recording through concrete responsibilities.
What you can do after
Operate/configure a local MCP memory server and organize agent experience for retrieval, recording, and relationship building.
How it connects
Connects entities, observations, relations, planning, evaluation, and the cognitive workspace.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents in Action, Second Edition. The section links point to the parts of the book it draws on.