- Home
- MCP servers
- Neo4j Memory
Neo4j Memory
- javascript
64
GitHub Stars
javascript
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": {
"knowall-ai-mcp-neo4j-agent-memory": {
"command": "npx",
"args": [
"@knowall-ai/mcp-neo4j-agent-memory"
],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_DATABASE": "neo4j",
"NEO4J_PASSWORD": "your-password",
"NEO4J_USERNAME": "neo4j"
}
}
}
}This MCP server bridges Neo4j with AI agents to store, recall, and connect memories in a knowledge graph. It provides memory-focused tools you can use from an MCP client to persist memories, define relationships, and perform graph-based searches across conversations and time.
How to use
Connect to the Neo4j-based memory server from your MCP client. You will run the server as a local process and point your client’s configuration to its standard input/output interface. Use the built-in memory tools to store memories, build connections, and perform semantic searches across your knowledge graph. You’ll primarily interact with actions like search_memories, create_memory, create_connection, update_memory, update_connection, delete_memory, delete_connection, list_memory_labels, and get_guidance through natural language prompts and structured tool calls.
How to install
Prerequisites: you need Node.js v18 or higher and a running Neo4j database. You can also run Neo4j in a container if you prefer.
# Install Node.js (if you don’t have it already)
# Use your platform’s installer, or nvm: nvm install 18
# Ensure Neo4j is running (example with bolt protocol on default ports)
# You can run Neo4j locally or point to an existing instance
Start the MCP server using the standard npx command shown in the quick start. You can also configure it in Claude Desktop by supplying the required environment variables.
Additional configuration and usage notes
Environment variables required to connect to Neo4j are shown here. You will supply these in your runtime environment or in Claude Desktop configuration as shown.
{
"mcpServers": {
"neo4j_memory": {
"command": "npx",
"args": ["@knowall-ai/mcp-neo4j-agent-memory"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password",
"NEO4J_DATABASE": "neo4j"
}
}
}
}
Notes on usage patterns and best practices are included in the tool descriptions below. The memory tools are designed to be simple atomic operations, and the LLM handles orchestration, relationship inference, and policy decisions within the graph.
Security and reliability
Treat memory data as potentially sensitive. Use appropriate access controls on the Neo4j database and limit who can start or configure the MCP server. The server stores conversations and relationships in Neo4j with automatic timestamps, so ensure your database is secured and backed up.
Available tools
search_memories
Search and retrieve memories from the knowledge graph using word-based or natural-language queries, with options to filter by label, since_date, depth, and sort order.
create_memory
Create a new memory in the knowledge graph with a flexible label (lowercase) and a set of properties. Automatic timestamps are included for temporal tracking.
create_connection
Create relationships between memories with semantic types (KNOWS, WORKS_AT, LIVES_IN, CREATED, etc.) and optional properties to describe the relationship context.
update_memory
Update properties of an existing memory. You can add, modify, or remove properties (set to null to remove).
update_connection
Update metadata for an existing relationship, including properties and timestamps.
delete_memory
Permanently remove a memory and all its connections from the graph.
delete_connection
Remove a specific relationship between two memories without deleting the memories themselves.
list_memory_labels
List all unique memory labels in use with counts to help maintain consistency.
get_guidance
Provide guidance on best practices for labeling and connecting memories, including examples and patterns for effective knowledge graphs.