Neo4j Knowledge Graph Memory
About
Provides a Neo4j-powered knowledge graph storage solution for maintaining complex relationships between data points with persistent memory across conversations and efficient fuzzy search capabilities.
Details
- Author
- jovanhsu
- Repository
- JovanHsu/mcp-neo4j-memory-server
- GitHub stars
- 5
- License
- MIT License
- Categories
- Database, Other, Knowledge Base, AI, Developer Tools, Design, File Management, Search, Infrastructure, Frontend
- Tags
- #neo4j
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Neo4j Knowledge Graph MemoryCommand (node, npx, python, etc.)npxArguments-
Argument 1
-y -
Argument 2
@izumisy/mcp-neo4j-memory-server
Environment-
NEO4J_URI
neo4j://localhost:7687 -
NEO4J_USER
neo4j -
NEO4J_DATABASE
memory -
NEO4J_PASSWORD
password
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
A knowledge graph memory server using the Neo4j graph database to store and retrieve information from AI interactions.
MCP Neo4j Knowledge Graph Memory Server是一个基于Neo4j图数据库的知识图谱记忆服务器,用于存储和检索AI助手与用户交互过程中的信息。该项目是官方Knowledge Graph Memory Server的增强版本,使用Neo4j作为后端存储引擎。
通过使用Neo4j作为存储后端,本项目提供了更强大的图查询能力、更好的性能和可扩展性,特别适合构建复杂的知识图谱应用。
- 🚀 基于Neo4j的高性能图数据库存储
- 🔍 强大的模糊搜索和精确匹配能力
- 🔄 实体、关系和观察的完整CRUD操作
- 🌐 与MCP协议完全兼容
- 📊 支持复杂的图查询和遍历
- 🐳 Docker支持,便于部署
# 全局安装 npm install -g @jovanhsu/mcp-neo4j-memory-server # 或作为项目依赖安装 npm install @jovanhsu/mcp-neo4j-memory-server
# 使用docker-compose启动Neo4j和Memory Server git clone https://github.com/JovanHsu/mcp-neo4j-memory-server.git cd mcp-neo4j-memory-server docker-compose up -d
{ "mcpServers": { "graph-memory": { "command": "npx", "args": [ "-y", "@izumisy/mcp-neo4j-memory-server" ], "env": { "NEO4J_URI": "neo4j://localhost:7687", "NEO4J_USER": "neo4j", "NEO4J_PASSWORD": "password", "NEO4J_DATABASE": "memory" } } } }
- 安装MCP Inspector
- 启动Neo4j Memory Server:
npx @jovanhsu/mcp-neo4j-memory-server
npx @modelcontextprotocol/inspector npx @jovanhsu/mcp-neo4j-memory-server
Follow these steps for each interaction: 1. User Identification: - You should assume that you are interacting with default_user - If you have not identified default_user, proactively try to do so. 2. Memory Retrieval: - Always begin your chat by saying only "Remembering..." and search relevant information from your knowledge graph - Create a search query from user words, and search things from "memory". If nothing matches, try to break down words in the query at first ("A B" to "A" and "B" for example). - Always refer to your knowledge graph as your "memory" 3. Memory - While conversing with the user, be attentive to any new information that falls into these categories: a) Basic Identity (age, gender, location, job title, education level, etc.) b) Behaviors (interests, habits, etc.) c) Preferences (communication style, preferred language, etc.) d) Goals (goals, targets, aspirations, etc.) e) Relationships (personal and professional relationships up to 3 degrees of separation) 4. Memory Update: - If any new information was gathered during the interaction, update your memory as follows: a) Create entities for recurring organizations, people, and significant events b) Connect them to the current entities using relations b) Store facts about them as observations
import { McpClient } from '@modelcontextprotocol/sdk/client/mcp.js'; import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'; // 创建客户端 const transport = new StdioClientTransport({ command: 'npx', args: ['-y', '@izumisy/mcp-neo4j-memory-server'], env: { NEO4J_URI: 'bolt://localhost:7687', NEO4J_USER: 'neo4j', NEO4J_PASSWORD: 'password', NEO4J_DATABASE: 'neo4j' } }); const client = new McpClient(); await client.connect(transport); // 创建实体 const result = await client.callTool('create_entities', { entities: [ { name: '用户', entityType: '人物', observations: ['喜欢编程', '使用TypeScript'] } ] }); console.log(result);
相比于原始版本使用的JSON文件存储和DuckDB版本,Neo4j提供了以下优势:
- 原生图数据库:Neo4j是专为图数据设计的数据库,非常适合知识图谱的存储和查询
- 高性能查询:使用Cypher查询语言可以高效地进行复杂的图遍历和模式匹配
- 关系优先:Neo4j将关系作为一等公民,使得实体间的关系查询更加高效
- 可视化能力:Neo4j提供了内置的可视化工具,方便调试和理解知识图谱
- 扩展性:支持集群部署,可以处理大规模知识图谱
(Entity:EntityType {name: "实体名称"}) (Entity)-[:HAS_OBSERVATION]->(Observation {content: "观察内容"}) (Entity1)-[:RELATION_TYPE]->(Entity2)
- 使用Neo4j的全文索引进行初步搜索
- Fuse.js提供额外的模糊匹配能力
- 搜索结果包括精确和部分匹配,按相关性排序
# 克隆仓库 git clone https://github.com/JovanHsu/mcp-neo4j-memory-server.git cd mcp-neo4j-memory-server # 安装依赖 pnpm install # 构建项目 pnpm build # 开发模式(使用MCP Inspector) pnpm dev
# 准备发布 npm version [patch|minor|major] # 发布到NPM npm publish
- Fork本仓库
- 创建您的特性分支 (git checkout -b feature/amazing-feature)
- 提交您的更改 (git commit -m 'Add some amazing feature')
- 推送到分支 (git push origin feature/amazing-feature)
- 创建一个Pull Request
- Model Context Protocol
- MCP Inspector
- Claude Desktop
- GitHub:https://github.com/JovanHsu/mcp-neo4j-memory-server
- NPM:https://www.npmjs.com/package/@jovanhsu/mcp-neo4j-memory-server
- 作者: JovanHsu
A scalable knowledge graph memory system for LLMs with semantic retrieval and temporal awareness, using Neo4j as a backend.
Neo4j graph database server (schema + read/write-cypher) and separate graph database backed memory
Query a Neo4j graph database containing a knowledge graph of German family businesses.
An MCP server for graph-based memory management, enabling AI to create, retrieve, and manage knowledge entities and their relationships.
MCP memory server with Hebbian learning — concept connections strengthen through co-activation and weaken through disuse.
A knowledge graph server that provides persistent, multi-context memory for AI models.
A distributed memory bank MCP tool that stores memories in a KùzuDB graph database, with repository and branch filtering capabilities.
Provides persistent memory for AI models using a local knowledge graph.
A desktop application for managing and interacting with the MCP Memory Service, a semantic memory system built on the Model Context Protocol.
Integrate the Neo4j graph database with clients through natural language interactions.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"neo4j knowledge graph memory": {
"env": {
"NEO4J_URI": "neo4j://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_DATABASE": "memory",
"NEO4J_PASSWORD": "password"
},
"args": [
"-y",
"@izumisy/mcp-neo4j-memory-server"
],
"command": "npx"
}
}
}
Linux
{
"env": {
"NEO4J_URI": "neo4j://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_DATABASE": "memory",
"NEO4J_PASSWORD": "password"
},
"args": [
"-y",
"@izumisy/mcp-neo4j-memory-server"
],
"command": "npx"
}
Macos
{
"env": {
"NEO4J_URI": "neo4j://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_DATABASE": "memory",
"NEO4J_PASSWORD": "password"
},
"args": [
"-y",
"@izumisy/mcp-neo4j-memory-server"
],
"command": "npx"
}
Windows
{
"env": {
"NEO4J_URI": "neo4j://localhost:7687",
"NEO4J_USER": "neo4j",
"NEO4J_DATABASE": "memory",
"NEO4J_PASSWORD": "password"
},
"args": [
"/c",
"npx",
"-y",
"@izumisy/mcp-neo4j-memory-server"
],
"command": "cmd"
}
MCP Neo4j Knowledge Graph Memory Server
简介
MCP Neo4j Knowledge Graph Memory Server是一个基于Neo4j图数据库的知识图谱记忆服务器,用于存储和检索AI助手与用户交互过程中的信息。该项目是官方Knowledge Graph Memory Server的增强版本,使用Neo4j作为后端存储引擎。
通过使用Neo4j作为存储后端,本项目提供了更强大的图查询能力、更好的性能和可扩展性,特别适合构建复杂的知识图谱应用。
功能特点
- 🚀 基于Neo4j的高性能图数据库存储
- 🔍 强大的模糊搜索和精确匹配能力
- 🔄 实体、关系和观察的完整CRUD操作
- 🌐 与MCP协议完全兼容
- 📊 支持复杂的图查询和遍历
- 🐳 Docker支持,便于部署
安装
前提条件
- Node.js >= 22.0.0
- Neo4j数据库(本地或远程)
通过npm安装
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





