You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: servers/mcp-neo4j-memory/README.md
+89-36Lines changed: 89 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,21 @@
1
-
# Neo4j Knowledge Graph Memory MCP Server
1
+
# 🧠🕸️ Neo4j Knowledge Graph Memory MCP Server
2
2
3
-
## Overview
3
+
## 🌟 Overview
4
4
5
-
A Model Context Protocol (MCP) server implementation that provides persistent memory capabilities through Neo4j graph database integration.
5
+
A Model Context Protocol (MCP) server implementation that provides persistent memory capabilities through Neo4j graph database integration.
6
6
7
7
By storing information in a graph structure, this server maintains complex relationships between entities as memory nodes and enables long-term retention of knowledge that can be queried and analyzed across multiple conversations or sessions.
8
8
9
9
With [Neo4j Aura](https://console.neo4j.io) you can host your own database server for free or share it with your collaborators. Otherwise you can run your own Neo4j server locally.
10
10
11
11
The MCP server leverages Neo4j's graph database capabilities to create an interconnected knowledge base that serves as an external memory system. Through Cypher queries, it allows exploration and retrieval of stored information, relationship analysis between different data points, and generation of insights from the accumulated knowledge. This memory can be further enhanced with Claude's capabilities.
12
12
13
-
### Graph Schema
13
+
### 🕸️ Graph Schema
14
14
15
15
*`Memory` - A node representing an entity with a name, type, and observations.
16
16
*`Relationship` - A relationship between two entities with a type.
17
17
18
-
### Usage Example
18
+
### 🔍 Usage Example
19
19
20
20
```
21
21
Let's add some memories
@@ -29,17 +29,13 @@ Results in Claude calling the create_entities and create_relations tools.
29
29
30
30

31
31
32
-
## Components
32
+
## 📦 Components
33
33
34
-
<!--
35
-
### Resources
36
-
### Prompts
37
-
-->
38
-
### Tools
34
+
### 🔧 Tools
39
35
40
36
The server offers these core tools:
41
37
42
-
#### Query Tools
38
+
#### 🔎 Query Tools
43
39
-`read_graph`
44
40
- Read the entire knowledge graph
45
41
- No input required
@@ -57,7 +53,7 @@ The server offers these core tools:
57
53
-`names` (array of strings): Entity names to retrieve
58
54
- Returns: Subgraph with specified nodes
59
55
60
-
#### Entity Management Tools
56
+
#### ♟️ Entity Management Tools
61
57
-`create_entities`
62
58
- Create multiple new entities in the knowledge graph
63
59
- Input:
@@ -73,7 +69,7 @@ The server offers these core tools:
73
69
-`entityNames` (array of strings): Names of entities to delete
74
70
- Returns: Success confirmation
75
71
76
-
#### Relation Management Tools
72
+
#### 🔗 Relation Management Tools
77
73
-`create_relations`
78
74
- Create multiple new relations between entities
79
75
- Input:
@@ -89,7 +85,7 @@ The server offers these core tools:
89
85
-`relations`: Array of objects with same schema as create_relations
90
86
- Returns: Success confirmation
91
87
92
-
#### Observation Management Tools
88
+
#### 📝 Observation Management Tools
93
89
-`add_observations`
94
90
- Add new observations to existing entities
95
91
- Input:
@@ -106,24 +102,24 @@ The server offers these core tools:
106
102
-`observations` (array of strings): Observations to remove
107
103
- Returns: Success confirmation
108
104
109
-
## Usage with Claude Desktop
105
+
## 🔧 Usage with Claude Desktop
110
106
111
-
### Released Package
107
+
### 💾 Installation
112
108
113
-
Can be found on PyPi https://pypi.org/project/mcp-neo4j-memory/
109
+
```bash
110
+
pip install mcp-neo4j-memory
111
+
```
114
112
115
-
Add the server to your `claude_desktop_config.json` with configuration of
113
+
### ⚙️ Configuration
116
114
117
-
* db-url (for [Neo4j Aura](https://console.neo4j.io)`neo4j+s://xxxx.databases.neo4j.io` for local `bolt://localhost`)
118
-
* username
119
-
* password
115
+
Add the server to your `claude_desktop_config.json` with configuration of:
120
116
121
117
```json
122
118
"mcpServers": {
123
119
"neo4j": {
124
120
"command": "uvx",
125
121
"args": [
126
-
"mcp-neo4j-memory",
122
+
"mcp-neo4j-memory==0.1.1",
127
123
"--db-url",
128
124
"neo4j+s://xxxx.databases.neo4j.io",
129
125
"--username",
@@ -135,29 +131,86 @@ Add the server to your `claude_desktop_config.json` with configuration of
135
131
}
136
132
```
137
133
138
-
### Development
134
+
Alternatively, you can set environment variables:
139
135
140
136
```json
141
-
# Add the server to your claude_desktop_config.json
# Create and activate virtual environment using uv
191
+
uv venv
192
+
source .venv/bin/activate # On Unix/macOS
193
+
.venv\Scripts\activate # On Windows
194
+
195
+
# Install dependencies including dev dependencies
196
+
uv pip install -e ".[dev]"
197
+
```
198
+
199
+
### 🐳 Docker
200
+
201
+
Build and run the Docker container:
202
+
203
+
```bash
204
+
# Build the image
205
+
docker build -t mcp/neo4j-memory:latest .
206
+
207
+
# Run the container
208
+
docker run -e NEO4J_URL="neo4j+s://xxxx.databases.neo4j.io" \
209
+
-e NEO4J_USERNAME="your-username" \
210
+
-e NEO4J_PASSWORD="your-password" \
211
+
mcp/neo4j-memory:latest
212
+
```
213
+
214
+
## 📄 License
162
215
163
216
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
0 commit comments