Neo4j MCP Server
Interact with Neo4j graph databases through MCP: run Cypher queries, inspect schema, manage knowledge graph memory, and model graph data.
The Neo4j Labs MCP servers are a collection of Model Context Protocol servers maintained by the Neo4j Field GenAI team that let MCP-compatible clients (Claude Desktop, Cursor, VS Code) interact with Neo4j graph databases and related tooling. The repository at neo4j-contrib/mcp-neo4j bundles four servers covering different graph workflows.
The four servers are: mcp-neo4j-cypher for executing read/write Cypher queries and inspecting schema (requires APOC), mcp-neo4j-memory for persistent knowledge graph storage of entities, relations, and observations, mcp-neo4j-cloud-aura-api for managing Neo4j Aura cloud instances, and mcp-neo4j-data-modeling for designing, validating, and exporting graph data models compatible with Arrows.app and Neo4j GraphRAG.
All servers are Python-based, distributable via uvx or pip, and support STDIO (default), SSE, and HTTP transports. The Labs collection is actively maintained but is marked as experimental, with no SLA or backwards-compatibility guarantees. Neo4j also publishes a separate official product server at github.com/neo4j/mcp focused specifically on Cypher querying and schema discovery.
Tools
| Tool | Description |
|---|---|
read_neo4j_cypher |
Execute Cypher read queries against the database. |
write_neo4j_cypher |
Execute Cypher write/update queries; can be disabled with --read-only flag. |
get_neo4j_schema |
Retrieve node labels, properties (name/type), and relationships. Requires the APOC plugin. |
read_graph |
Read the entire knowledge graph from the memory server. |
search_nodes |
Search the knowledge graph for nodes matching a query string. |
find_nodes |
Find specific nodes by name. |
create_entities |
Create new entities in the knowledge graph with name, type, and observations. |
delete_entities |
Delete entities and their associated relations. |
create_relations |
Create relations between entities (source, target, relation type). |
delete_relations |
Delete relations from the graph. |
add_observations |
Add observations to existing entities. |
delete_observations |
Delete observations from entities. |
validate_node |
Validate a single node structure in a data model. |
validate_relationship |
Validate a single relationship structure. |
validate_data_model |
Validate the full data model structure. |
get_mermaid_config_str |
Generate a Mermaid diagram for data model visualization. |
load_from_arrows_json |
Import a data model from Arrows.app JSON format. |
export_to_arrows_json |
Export the current data model to Arrows.app JSON. |
export_to_pydantic_models |
Export the data model as Python Pydantic classes. |
get_node_cypher_ingest_query |
Generate a Cypher ingestion query for a node. |
get_relationship_cypher_ingest_query |
Generate a Cypher ingestion query for a relationship. |
get_constraints_cypher_queries |
Generate Cypher constraint-creation queries for a data model. |
Prerequisites
- A running Neo4j instance (Aura cloud or self-managed)
- For
get_neo4j_schema: the APOC plugin installed and enabled uv/uvxinstalled (recommended) or Python withpip
Install
The servers are published to PyPI and run via uvx:
uvx mcp-neo4j-cypher@0.6.0 --transport stdio
Alternative servers in the repo:
uvx mcp-neo4j-memory
uvx mcp-neo4j-data-modeling
uvx mcp-neo4j-cloud-aura-api
Claude Desktop config
Add to claude_desktop_config.json:
{
"mcpServers": {
"neo4j-database": {
"command": "uvx",
"args": ["mcp-neo4j-cypher@0.6.0", "--transport", "stdio"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "<your-password>",
"NEO4J_DATABASE": "neo4j"
}
}
}
}
Environment variables
NEO4J_URI: Bolt connection URI (e.g.bolt://localhost:7687orneo4j+s://xxx.databases.neo4j.io)NEO4J_USERNAME,NEO4J_PASSWORD: database credentialsNEO4J_DATABASE: target database (defaultneo4j)NEO4J_READ_ONLY: set totrueto disable write toolsNEO4J_TRANSPORT,NEO4J_MCP_SERVER_HOST,NEO4J_MCP_SERVER_PORT,NEO4J_MCP_SERVER_PATH: configure HTTP/SSE transport for remote deployments
- Ask natural-language questions about a Neo4j graph and have the agent generate, run, and summarize Cypher queries.
- Inspect an unfamiliar Neo4j database's schema (labels, relationship types, property keys) before writing application code.
- Give an AI assistant persistent, structured memory across sessions using
mcp-neo4j-memoryas a knowledge graph. - Design a graph data model interactively, validate it, and export ingestion Cypher or Pydantic classes for code generation.
- Provision and scale Neo4j Aura cloud instances from an agent workflow via
mcp-neo4j-cloud-aura-api.
- "What node labels and relationship types exist in my Neo4j database?"
- "Find all Person nodes connected to Company 'Acme' through WORKS_AT and list their titles."
- "Create a node for product SKU-1234 and link it to category 'Electronics'."
- "Remember that Alice is the project lead for the Phoenix initiative and works with Bob and Carol."
- "Validate this data model and generate the Cypher constraints and Pydantic classes for it."
- Maintained by Neo4j's Field GenAI team, so coverage tracks the product (Aura, GraphRAG, Arrows.app).
- Four complementary servers cover querying, memory, modeling, and cloud management in one repo.
- Supports STDIO, SSE, and HTTP transports, enabling local and containerized cloud deployments.
- Read-only mode via
--read-onlyflag protects production databases from accidental writes.
- Marked experimental: no SLA or backwards-compatibility guarantees between versions.
- Schema discovery in
mcp-neo4j-cypherrequires the APOC plugin, which is not enabled by default on all instances. - No fine-grained authorization; the server inherits whatever permissions the configured Neo4j user has.
- neo4j/mcp: Neo4j's separate official product MCP server, focused on Cypher and schema.
- neo4j-field/mcp-neo4j-graphrag: Specialized server adding vector search, fulltext search, and search-augmented Cypher for GraphRAG.
- Memgraph MCP server: alternative property-graph database with its own MCP integration.