Neo4j Graph MCP server

Interact with Neo4j graph databases to query, analyze, and manipulate data.
Back to servers
Setup instructions
Provider
Neo4j
Release date
Dec 03, 2024
Language
TypeScript
Stats
476 stars

Neo4j MCP Server allows you to interact with Neo4j databases and services using natural language through the Model Context Protocol (MCP). This integration enables AI assistants like Claude to execute Cypher queries, manage knowledge graphs, control Aura instances, and create data models - all through conversation.

Available Servers

Neo4j Cypher Server

The mcp-neo4j-cypher server translates natural language to Cypher queries, allowing you to query and update Neo4j databases using conversational language.

Neo4j Memory Server

The mcp-neo4j-memory server creates a personal knowledge graph in Neo4j, storing entities and relationships mentioned in your conversations for retrieval across different sessions and clients.

Neo4j Cloud Aura API Server

The mcp-neo4j-cloud-aura-api server provides management capabilities for Neo4j Aura instances, enabling creation, deletion, scaling, and feature management through natural language.

Neo4j Data Modeling Server

The mcp-neo4j-data-modeling server supports interactive graph data modeling and visualization, including import/export functionality with Arrows.app.

Installation

To install any of the Neo4j MCP servers, follow these general steps:

  1. Clone the repository:

    git clone https://github.com/neo4j/mcp.git
    cd mcp
    
  2. Navigate to the specific server directory:

    cd servers/[server-name]
    
  3. Install dependencies (typically using npm):

    npm install
    
  4. Start the server:

    npm start
    

Usage

Configuring MCP Clients

To use these servers with an MCP client (Claude Desktop, VS Code, Cursor, etc.), you'll need to configure the client to connect to your running MCP server. Typically, this involves adding the server URL to your client's MCP configuration.

For Claude Desktop, add the server in the Claude settings under "Model Context Protocol".

Example Interactions

Here are some example prompts you can use with the different servers:

Cypher Server:

  • "What is the schema of my database?"
  • "Find all customers who purchased more than $1000 in the last month"
  • "Create a new Product node with name 'Widget' and price 29.99"

Memory Server:

  • "Remember that I met Sarah at the conference yesterday"
  • "What do you know about my meeting schedule?"
  • "Who have I worked with on the Neo4j project?"

Aura API Server:

  • "List all my Aura instances"
  • "Create a new 4GB Aura Professional instance named 'project-graph'"
  • "Scale my 'analytics' instance to 8GB"
  • "Enable Graph Data Science on my 'research' instance"

Data Modeling Server:

  • "Create a data model for an e-commerce system"
  • "Validate my current data model"
  • "Visualize the relationships between Customer, Order, and Product"
  • "Export this model to Arrows.app format"

For detailed documentation on each server's capabilities and configuration options, visit the dedicated server directories in the repository.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-neo4j-cypher" '{"command":"npx","args":["-y","mcp-neo4j-cypher"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-neo4j-cypher": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-cypher"
            ]
        },
        "mcp-neo4j-memory": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-memory"
            ]
        },
        "mcp-neo4j-cloud-aura-api": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-cloud-aura-api"
            ]
        },
        "mcp-neo4j-data-modeling": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-data-modeling"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-neo4j-cypher": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-cypher"
            ]
        },
        "mcp-neo4j-memory": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-memory"
            ]
        },
        "mcp-neo4j-cloud-aura-api": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-cloud-aura-api"
            ]
        },
        "mcp-neo4j-data-modeling": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-neo4j-data-modeling"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later