MCP Neo4j Knowledge Graph Memory Server logo

MCP Neo4j Knowledge Graph Memory Server

by sylweriusz

This is a Model Context Protocol (MCP) server that utilizes Neo4j as a backend for storing and retrieving knowledge graphs. It enables AI assistants to maintain and access a knowledge graph for enhanced context and memory.

View on GitHub

Last updated: N/A

What is MCP Neo4j Knowledge Graph Memory Server?

The MCP Neo4j Knowledge Graph Memory Server is a server that implements the Model Context Protocol (MCP) and uses Neo4j, a graph database, to store and manage a knowledge graph. This allows AI assistants to have a persistent memory and retrieve relevant information from the graph.

How to use MCP Neo4j Knowledge Graph Memory Server?

The server can be installed via NPM, manually, or using Docker. It requires configuration of Neo4j connection details (URI, username, password, database) through environment variables. AI assistants can interact with the server using the MCP protocol, following the provided instructions for user identification, memory retrieval, and memory updates. Project-specific knowledge graphs can be managed using the provided database management commands in the system prompt.

Key features of MCP Neo4j Knowledge Graph Memory Server

  • Neo4j backend for graph storage

  • MCP protocol support

  • Database management API

  • Fuzzy search implementation

  • Project-specific knowledge graph support

Use cases of MCP Neo4j Knowledge Graph Memory Server

  • Providing context to AI assistants

  • Storing and retrieving user information

  • Managing project-specific knowledge

  • Enabling AI agents to remember past interactions

  • Building knowledge graphs for various domains

FAQ from MCP Neo4j Knowledge Graph Memory Server

What is Neo4j?

Neo4j is a graph database management system, offering native graph storage and processing.

What is the Model Context Protocol (MCP)?

MCP is a protocol that allows AI models to access and manage external knowledge sources.

How do I configure the Neo4j connection?

You can configure the connection using environment variables such as NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD, and NEO4J_DATABASE.

How do I switch to a project-specific database?

Use the switch_database command in your system prompt, specifying the database name and whether to create it if it doesn't exist.

What is the database schema?

The knowledge graph is stored with Entity nodes, Observation nodes, and RELATES_TO relationships. Projects contain Files, which have Functions and Classes, and can also have Errors and Requirements.