# mcp-neo4j-data-modeling

This MCP server helps agents build, validate, and visualize Neo4j graph models. Use it when a schema needs nodes, relationships, and properties.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 989
- Author: neo4j-contrib
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/neo4j-contrib/mcp-neo4j/tree/HEAD/servers/mcp-neo4j-data-modeling
- Updated: 2026-09-09
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-neo4j-data-modeling

## What it does

mcp-neo4j-data-modeling gives an agent tools for working with Neo4j graph models. It can validate nodes, relationships, or a complete data model, then produce a Mermaid configuration for visualization. Resources include JSON schemas for model objects, example models, and a guide to the Neo4j data ingest process.

The server imports and exports models through Arrows JSON and OWL Turtle. It can also generate Pydantic models and schemas for the Neo4j GraphRAG Python Package. During OWL conversion, classes are mapped to nodes; relationship-attached properties are dropped when a model is exported to OWL.

The environment-based setup uses `uvx` and `NEO4J_NAMESPACE`. Without `NEO4J_NAMESPACE`, the command using that setting will not start the server with the required configuration.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `NEO4J_NAMESPACE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env NEO4J_NAMESPACE=<NEO4J_NAMESPACE> --transport stdio mcp-neo4j-data-modeling -- uvx mcp-neo4j-data-modeling
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-neo4j-data-modeling <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp-neo4j-data-modeling --env NEO4J_NAMESPACE=<NEO4J_NAMESPACE> -- uvx mcp-neo4j-data-modeling
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-neo4j-data-modeling <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-neo4j-data-modeling": {
            "command": "uvx",
            "args": [
                "mcp-neo4j-data-modeling"
            ],
            "env": {
                "NEO4J_NAMESPACE": "<NEO4J_NAMESPACE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-neo4j-data-modeling <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-neo4j-data-modeling": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "mcp-neo4j-data-modeling"
            ],
            "env": {
                "NEO4J_NAMESPACE": "<NEO4J_NAMESPACE>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-neo4j-data-modeling <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e NEO4J_NAMESPACE=<NEO4J_NAMESPACE> mcp-neo4j-data-modeling uvx mcp-neo4j-data-modeling
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-neo4j-data-modeling <command>

## When to use it
- design a Neo4j graph model
- validate a node or relationship
- render a model as Mermaid configuration
- import a schema from Arrows JSON
- export a model as Pydantic classes

## Example prompts
- Design a Neo4j model for orders, products, and warehouses, then validate it with `validate_data_model`.
- Validate this node with `validate_node` and create a Mermaid configuration with `get_mermaid_config_str`.
- Load the model from OWL Turtle with `load_from_owl_turtle`, then export it to Arrows format with `export_to_arrows_json`.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

From the same set: [neo4j-contrib/mcp-neo4j](https://affpapa.org/en/nevibecode/by/neo4j-contrib/mcp-neo4j.md) — 3 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
