Neo4j Memory

Provides persistent graph memory for AI assistants with memory storage, search, and organization via Neo4j and GDS.
  • typescript

31

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "sylweriusz-mcp-neo4j-memory-server": {
      "command": "npx",
      "args": [
        "-y",
        "@sylweriusz/mcp-neo4j-memory-server"
      ],
      "env": {
        "NEO4J_URI": "bolt://localhost:7687",
        "NEO4J_PASSWORD": "your-password",
        "NEO4J_USERNAME": "neo4j"
      }
    }
  }
}

You can give AI assistants long-term memory with a persistent graph-based store powered by Neo4j. This MCP server lets you store memories as interconnected nodes, search them efficiently, connect related memories, and organize memory by project, all while evolving knowledge over time.

How to use

You will use this MCP server alongside your MCP client to store, query, and manage memories for your assistants. Begin by selecting a project-specific database context and then use the memory tools to store observations, create relationships, and retrieve memories with semantic or exact searches. Use batch operations to add multiple memories with relations in one go, and switch contexts to keep projects isolated. Control the amount of detail in responses to fit your workflow: minimal lists for quick results or full data dumps for in-depth analysis. Time-based queries let you filter memories by relative dates (e.g., 7d, 30d) or absolute timestamps.

Typical workflows include: 1) creating a memory with associated observations and immediate relations in a single operation, 2) performing semantic searches to locate relevant memories, 3) traversing the memory graph to understand connections, and 4) switching between databases to separate different projects or contexts.

How to install

Prerequisites: you need Node.js and npm installed on your machine. You also require a running Neo4j instance with the Graph Data Science (GDS) plugin enabled. The Neo4j instance can be provided by a DozerDB setup demonstrated below.

Install the MCP package for memory server from npm.

Install and run the DozerDB Neo4j database with GDS plugin, then verify the plugin works in the Neo4j browser.

Install the MCP package and configure the client with your Neo4j connection details as shown in the example configuration sections.

Configuration and setup notes

Create a dedicated MCP memory server entry to run locally via your MCP client. The following example shows how to install the package and how to configure the client to connect to your local Neo4j instance.

npm install @sylweriusz/mcp-neo4j-memory-server
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@sylweriusz/mcp-neo4j-memory-server"],
      "env": {
        "NEO4J_URI": "bolt://localhost:7687",
        "NEO4J_USERNAME": "neo4j", 
        "NEO4J_PASSWORD": "your-password"
      }
    }
  }
}

Neo4j Setup

Choose a working DozerDB setup with the Graph Data Science plugin to enable vector operations. Use the following container run command to start DozerDB with the GDS plugin enabled.

docker run \
    -p 7474:7474 -p 7687:7687 \
    -v $HOME/neo4j/data:/data \
    -v $HOME/neo4j/logs:/logs \
    -v $HOME/neo4j/plugins:/plugins \
    --env NEO4J_AUTH=neo4j/password \
    --env NEO4J_dbms_security_procedures_unrestricted='gds.*' \
    graphstack/dozerdb:latest

Unified Tools

The server provides four unified MCP tools that integrate automatically with Claude:

memory_store - Create memories with observations and immediate relations in ONE operation

memory_find - Unified search/retrieval with semantic search, direct ID lookup, date filtering, and graph traversal

memory_modify - Comprehensive modification operations (update, delete, observations, relations)

database_switch - Switch database context for isolated environments

Memory structure

Memories are organized as nodes with relationships, observations, and metadata. A memory can be linked to ancestors and descendants to reflect its context within a project.

Troubleshooting

Vector search issues: check logs for GDS plugin activity and ensure the DozerDB setup is correctly configured. Connection issues: verify Neo4j is running and the credentials match your environment variables.

License

MIT

Notes on security and debugging

Explicit errors are produced for debugging purposes to avoid silent failures. Ensure your Neo4j credentials are secured and not exposed in client configurations.

Available tools

memory_store

Create memories with observations and immediate relations in ONE operation

memory_find

Unified search/retrieval with semantic search, direct ID lookup, date filtering, and graph traversal

memory_modify

Comprehensive modification operations (update, delete, observations, relations)

database_switch

Switch database context for isolated environments

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational