Mcp Neo4j Data Modeling
io.github.neo4j-contrib/mcp-neo4j-data-modeling · 958 stars · Python · MIT
MCP server A simple Neo4j MCP server for creating graph data models.
Install
The repo has no one-line install. Follow its README.
Published as
- PyPI
mcp-neo4j-data-modelingstdio
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
NEO4J_NAMESPACEOptional | Env var | The namespace to use for the MCP server tool names. |
Files
🔍📊 Neo4j Data Modeling MCP Server
mcp-name: io.github.neo4j-contrib/mcp-neo4j-data-modeling
🌟 Overview
A Model Context Protocol (MCP) server implementation that provides tools for creating, visualizing, and managing Neo4j graph data models. This server enables you to define nodes, relationships, and properties to design graph database schemas that can be visualized interactively.
This MCP server facilitates data modeling workflows like the one detailed below.
- Blue steps are handled by the agent
- Purple by the Data Modeling MCP server
- Green by the user
Demo
For an end to end demo using the Data Modeling and Cypher MCP servers to develop a data model, generate an ingest script, and validate use cases please check out this Github Repo.
🧩 Components
📦 Resources
The server provides these resources:
#### Schema
resource://schema/node- Get the JSON schema for a Node object
- Returns: JSON schema defining the structure of a Node
resource://schema/relationship- Get the JSON schema for a Relationship object
- Returns: JSON schema defining the structure of a Relationship
resource://schema/property- Get the JSON schema for a Property object
- Returns: JSON schema defining the structure of a Property
resource://schema/data_model- Get the JSON schema for a DataModel object
- Returns: JSON schema defining the structure of a DataModel
#### Example Data Models
resource://examples/patient_journey_model- Get a real-world Patient Journey healthcare data model in JSON format
- Returns: JSON DataModel for tracking patient encounters, conditions, medications, and care plans
resource://examples/supply_chain_model- Get a real-world Supply Chain data model in JSON format
- Returns: JSON DataModel for tracking products, orders, inventory, and locations
resource://examples/software_dependency_model- Get a real-world Software Dependency Graph data model in JSON format
- Returns: JSON DataModel for software dependency tracking with security vulnerabilities, commits, and contributor analysis
resource://examples/oil_gas_monitoring_model- Get a real-world Oil and Gas Equipment Monitoring data model in JSON format
- Returns: JSON DataModel for industrial monitoring of oil and gas equipment, sensors, alerts, and maintenance
resource://examples/customer_360_model- Get a real-world Customer 360 data model in JSON format
- Returns: JSON DataModel for customer relationship management with accounts, contacts, orders, tickets, and surveys
resource://examples/fraud_aml_model- Get a real-world Fraud & AML data model in JSON format
- Returns: JSON DataModel for financial fraud detection and anti-money laundering with customers, transactions, alerts, and compliance
resource://examples/health_insurance_fraud_model- Get a real-world Health Insurance Fraud Detection data model in JSON format
- Returns: JSON DataModel for healthcare fraud detection tracking investigations, prescriptions, executions, and beneficiary relationships
#### Ingest
resource://neo4j_data_ingest_process- Get a detailed explanation of the recommended process for ingesting data into Neo4j using the data model
- Returns: Markdown document explaining the ingest process
🛠️ Tools
The server offers these core tools:
#### ✅ Validation Tools
validate_node- Validate a single node structure
- Input:
node(Node): The node to validatereturn_validated(bool, optional): If True, returns the validated node object instead of True- Returns: True if valid (or validated Node object if
return_validated=True), raises ValueError if invalid
validate_relationship- Validate a single relationship structure
- Input:
relationship(Relationship): The relationship to validatereturn_validated(bool, optional): If True, returns the validated relationship object instead of True- Returns: True if valid (or validated Relationship object if
return_validated=True), raises ValueError if invalid
validate_data_model- Validate the entire data model structure
- Input:
data_model(DataModel): The data model to validatereturn_validated(bool, optional): If True, returns the validated data model object instead of True- Returns: True if valid (or validated DataModel object if
return_validated=True), raises ValueError if invalid
#### 👁️ Visualization Tools
get_mermaid_config_str- Generate a Mermaid diagram configuration string for the data model, suitable for visualization in tools that support Mermaid
- Input:
data_model(DataModel): The data model to visualize- Returns: Mermaid configuration string representing the data model
#### 🔄 Import/Export Tools
These tools provide integration with Arrows - a graph drawing web application for creating detailed Neo4j data models with an intuitive visual interface.
load_from_arrows_json- Load a data model from Arrows app JSON format
- Input:
arrows_data_model_dict(dict): JSON dictionary from Arrows app export- Returns: DataModel object
export_to_arrows_json- Export a data model to Arrows app JSON format
- Input:
data_model(DataModel): The data model to export- Returns: JSON string compatible with Arrows app
load_from_owl_turtle- Load a data model from OWL Turtle format
- Input:
owl_turtle_str(str): OWL Turtle string representation of an ontology- Returns: DataModel object with nodes and relationships extracted from the ontology
- Note: This conversion is lossy - OWL Classes become Nodes, ObjectProperties become Relationships, and DatatypeProperties become Node properties.
export_to_owl_turtle- Export a data model to OWL Turtle format
- Input:
data_model(DataModel): The data model to export- Returns: String representation of the data model in OWL Turtle format
- Note: This conversion is lossy - Relationship properties are not preserved since OWL does not support properties on ObjectProperties
export_to_pydantic_models- Export a data model to Pydantic models
- Input:
data_model(DataModel): The data model to export- Returns: String representation of the Pydantic models as a Python file, including imports and model definitions for nodes, relationships, and the complete data model
export_to_neo4j_graphrag_pkg_schema- Export a data model to Neo4j GraphRAG Python Package schema format
- Input:
data_model(DataModel): The data model to export- Returns: Dictionary containing the Neo4j GraphRAG Python Package schema
load_from_neo4j_graphrag_pkg_schema- Load a data model from Neo4j GraphRAG Python Package schema format
- Input:
neo4j_graphrag_python_package_schema(dict): Neo4j GraphRAG Python Package schema dictionary- Returns: DataModel object
#### 📚 Example Data Model Tools
These tools provide access to pre-built example data models for common use cases and domains.
list_example_data_models- List all available example data models with descriptions
- Input: None
- Returns: Dictionary with example names, descriptions, node/relationship counts, and usage instructions
get_example_data_model- Get an example graph data model from the available templates
- Input:
example_name(str): Name of the example to load ('patient_journey', 'supply_chain', 'software_dependency', 'oil_gas_monitoring', 'customer_360', 'fraud_aml', or 'health_insurance_fraud')- Returns: ExampleDataModelResponse containing DataModel object and Mermaid visualization configuration
#### 📝 Cypher Ingest Tools
These tools may be used to create Cypher ingest queries based on the data model. These queries may then be used by other MCP servers or applications to load data into Neo4j.
get_constraints_cypher_queries- Generate Cypher queries to create constraints (e.g., unique keys) for all nodes in the data model
- Input:
data_model(DataModel): The data model to generate constraints for- Returns: List of Cypher statements for constraints
get_node_cypher_ingest_query- Generate a Cypher query to ingest a list of node records into Neo4j
- Input:
node(Node): The node definition (label, key property, properties)- Returns: Parameterized Cypher query for bulk node ingestion (using
$records)
get_relationship_cypher_ingest_query- Generate a Cypher query to ingest a list of relationship records into Neo4j
- Input:
data_model(DataModel): The data model containing nodes and relationshipsrelationship_type(str): The type of the relationshiprelationship_start_node_label(str): The label of the start node
Facts
- Kind
- MCP server
- Repo
- io.github.neo4j-contrib/mcp-neo4j-data-modeling
- Group
- Uncategorized
- Stars
- 958
- License
- MIT
- Language
- Python
- Last push
- 2026-09-09
- Forks
- 262
- MCP Registry
- io.github.neo4j-contrib/mcp-neo4j-data-modeling
- Topics
- database, mcp, mcp-server, neo4j, stdio
- 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
- 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
- 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
- 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
- 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k