mcp-server-memory

mcp-server-memory

3.5

A Python implementation of an MCP server that processes and saves memory in the form of a knowledge graph.

MCP Server Memory provides functionality for maintaining a persistent knowledge graph for AI memory. It allows storing, retrieving, and querying structured data in the form of entities, relations, and observations. This enables AI systems to store and recall information across sessions.

Features

  • Create and manage entities with structured information
  • Establish typed relations between entities
  • Add observations to existing entities
  • Delete entities, relations, and observations
  • Search nodes in the knowledge graph

MCP Tools

  • create_entities: Create multiple new entities in the knowledge graph
  • create_relations: Create multiple new relations between entities
  • add_observations: Add new observations to existing entities
  • delete_entities: Delete entities and their associated relations
  • delete_observations: Delete specific observations from entities
  • delete_relations: Delete specific relations from the graph
  • read_graph: Read the entire knowledge graph
  • search_nodes: Search for nodes matching a query
  • open_nodes: Retrieve specific nodes by name

Usage with Different Platforms

uv

bash
uv add mcp-server-memory

pip

bash
pip install mcp-server-memory

running_server

bash
# Run the server directly
mcp-server-memory

# Set custom memory file path
MEMORY_FILE_PATH=/path/to/memory.json mcp-server-memory

configure_uv


"mcpServers": {
  "memory": {
    "command": "/path/to/uv",
    "args": [
      "--directory",
      "/path/to/mcp_server_memory/src",
      "run",
      "python",
      "-m",
      "mcp_server_memory"
    ],
    "env": {
      "MEMORY_FILE_PATH": "/path/to/memory.json"
    }
  }
}

configure_pip


"mcpServers": {
  "memory": {
    "command": "python",
    "args": ["-m", "mcp_server_memory"]
  }
}