# MCP Neo4j Memory

> MCP Neo4j Memory is an open-source MCP server for knowledge and memory. Persistent knowledge-graph memory for AI assistants, stored in a Neo4j database. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, Web, macOS, Windows, Linux
- **Repository:** https://github.com/neo4j-contrib/mcp-neo4j/tree/HEAD/servers/mcp-neo4j-memory
- **MCP Registry name:** io.github.neo4j-contrib/mcp-neo4j-memory
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-18

## About

The README describes this server as a way to give an AI client long-term memory backed by a Neo4j graph database. Entities carry a name, a type and a list of observations, and relationships between entities are stored as typed edges, so connections between people, places and facts persist across conversations and sessions.

The server exposes tools for reading the whole graph, searching or fetching nodes by name, creating and deleting entities, relations and observations. Queries run against a Neo4j instance you configure through connection URI, username, password and database settings. The README points to Neo4j Aura for a hosted database and also covers running Neo4j locally.

It suits developers and teams who already use Neo4j or want structured, queryable memory for an assistant such as Claude Desktop. Multi-tenant setups can add a namespace prefix to tool names, and the README documents stdio, SSE and HTTP transports with host and origin restrictions for HTTP deployments.

## Features

- **Graph-based entity memory:** Stores entities with types and observations and links them through typed relations in a Neo4j graph.
- **Search and retrieval tools:** Offers tools to read the full graph, search by query text, or find nodes by name.
- **Create and delete operations:** Provides tools to add or remove entities, relations and observations in bulk.
- **Namespaced tool names:** Adds an optional prefix to tool names for running several instances in one environment.
- **Multiple transports:** Supports stdio for local clients and SSE or streamable HTTP for remote deployments.
- **Host and origin protection:** HTTP mode restricts allowed hosts and CORS origins, with localhost as the default.

## Good for

- Give an AI assistant persistent memory of people, projects and facts across sessions
- Record and query relationships between entities such as colleagues, locations or products
- Share one knowledge graph between several assistants or applications using namespaces
- Run a remote memory service over HTTP for a team's microservices

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mcp-neo4j-memory --env NEO4J_URI='<NEO4J_URI>' --env NEO4J_USERNAME='<NEO4J_USERNAME>' --env NEO4J_PASSWORD='<NEO4J_PASSWORD>' -- uvx mcp-neo4j-memory
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp-neo4j-memory --env NEO4J_URI='<NEO4J_URI>' --env NEO4J_USERNAME='<NEO4J_USERNAME>' --env NEO4J_PASSWORD='<NEO4J_PASSWORD>' -- uvx mcp-neo4j-memory
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp-neo4j-memory]
command = "uvx"
args = ["mcp-neo4j-memory"]
env = { NEO4J_URI = "<NEO4J_URI>", NEO4J_USERNAME = "<NEO4J_USERNAME>", NEO4J_PASSWORD = "<NEO4J_PASSWORD>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e NEO4J_URI='<NEO4J_URI>' -e NEO4J_USERNAME='<NEO4J_USERNAME>' -e NEO4J_PASSWORD='<NEO4J_PASSWORD>' mcp-neo4j-memory uvx -- mcp-neo4j-memory

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-neo4j-memory": {
      "command": "uvx",
      "args": [
        "mcp-neo4j-memory"
      ],
      "env": {
        "NEO4J_URI": "<NEO4J_URI>",
        "NEO4J_USERNAME": "<NEO4J_USERNAME>",
        "NEO4J_PASSWORD": "<NEO4J_PASSWORD>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 3 of 9 tools delete data and 3 change data. From the server's own tool labels and tool names; not verified by us.

- `read_graph` (name suggests: reads): Read the entire knowledge graph.
- `search_nodes` (name suggests: reads): Search for nodes based on a query matching names, types or observations.
- `find_nodes` (name suggests: reads): Find specific nodes by name.
- `create_entities` (name suggests: changes): Create multiple new entities in the knowledge graph.
- `delete_entities` (name suggests: deletes): Delete multiple entities and their associated relations.
- `create_relations` (name suggests: changes): Create multiple new relations between entities.
- `delete_relations` (name suggests: deletes): Delete multiple relations from the graph.
- `add_observations` (name suggests: changes): Add new observations to existing entities.
- `delete_observations` (name suggests: deletes): Delete specific observations from entities.

## FAQ

### Which database does MCP Neo4j Memory need?

It connects to a Neo4j database, either a hosted Neo4j Aura instance or a Neo4j server run locally, configured through NEO4J_URI, username, password and database.

### What license is MCP Neo4j Memory released under?

The README states that the server is licensed under the MIT License.

### How do I install MCP Neo4j Memory?

The README gives pip install mcp-neo4j-memory and an example uvx configuration for Claude Desktop.

### Can several instances share one Neo4j database?

The README describes a namespace option that prefixes tool names, intended for multi-tenant deployments.

### Is MCP Neo4j Memory free?

Yes. MCP Neo4j Memory is open source, so you can use and self-host it for free.

### How do I add MCP Neo4j Memory to Claude Code?

Run this command in your terminal: claude mcp add mcp-neo4j-memory --env NEO4J_URI='<NEO4J_URI>' --env NEO4J_USERNAME='<NEO4J_USERNAME>' --env NEO4J_PASSWORD='<NEO4J_PASSWORD>' -- uvx mcp-neo4j-memory

### What are the best alternatives to MCP Neo4j Memory?

The closest alternatives to MCP Neo4j Memory are Memoria, Neuromcp, persistent-memory, Memory MCP and Memento.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Memoria](https://ai-powered.com/mcp/memoria): Memoria is an open-source MCP server for knowledge and memory.
- [Neuromcp](https://ai-powered.com/mcp/neuromcp): Neuromcp is an open-source MCP server for knowledge and memory.
- [persistent-memory](https://ai-powered.com/mcp/persistent-memory): persistent-memory is an open-source MCP server for knowledge and memory.
- [Memory MCP](https://ai-powered.com/mcp/memory-mcp-2): Memory MCP is an open-source MCP server for knowledge and memory.
- [Memento](https://ai-powered.com/mcp/memento-2): Memento is an open-source MCP server for knowledge and memory.
- [knowmind](https://ai-powered.com/mcp/knowmind): knowmind is a freemium MCP server for knowledge and memory.
- [Kognite](https://ai-powered.com/mcp/kognite): Kognite is a freemium MCP server for knowledge and memory.
- [MCP Memory](https://ai-powered.com/mcp/mcp-memory): MCP Memory is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/mcp-neo4j-memory
