Back to MCP Catalog

Neo4j Graph Database MCP Server

DatabasesTypeScript
Interact with Neo4j graph databases through natural language
Available Tools

execute_query

Execute Cypher queries on the Neo4j database with support for all types of operations (READ, CREATE, UPDATE, DELETE)

queryparams

create_node

Create a new node in the graph database with specified labels and properties

labelsproperties

create_relationship

Create a relationship between two existing nodes with defined type, direction, and properties

sourceNodeIdtargetNodeIdtypeproperties

The Neo4j Graph Database MCP provides a seamless integration between Neo4j graph databases and AI assistants. It enables users to perform complex graph database operations through natural language interactions, eliminating the need to write Cypher queries manually. With this MCP, you can create nodes and relationships, execute custom queries, and retrieve data from your Neo4j database using conversational language. This makes graph database operations more accessible to users without specialized knowledge of graph query languages.

Overview

The Neo4j Graph Database MCP allows you to interact with Neo4j graph databases using natural language. This integration enables you to create, query, and manipulate graph data without writing Cypher queries directly.

Installation

Using npx (Quickest Method)

You can run this MCP server directly using npx:

npx @alanse/mcp-neo4j-server

Installation via Smithery

To install the Neo4j MCP for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @alanse/mcp-neo4j-server --client claude

Manual Configuration

To add this MCP to your Claude Desktop configuration manually, add the following to your configuration file:

{
  "mcpServers": {
    "neo4j": {
      "command": "npx",
      "args": ["@alanse/mcp-neo4j-server"],
      "env": {
        "NEO4J_URI": "bolt://localhost:7687",
        "NEO4J_USERNAME": "neo4j",
        "NEO4J_PASSWORD": "your-password"
      }
    }
  }
}

Configuration

The server requires the following environment variables:

  • NEO4J_URI: Neo4j database URI (default: bolt://localhost:7687)
  • NEO4J_USERNAME: Neo4j username (default: neo4j)
  • NEO4J_PASSWORD: Neo4j password (required)

Make sure to replace the placeholder values with your actual Neo4j database credentials.

Usage Examples

Here are examples of how you can interact with your Neo4j database using natural language:

Querying Data

You can ask questions like:

  • "Show me all employees in the Sales department"
  • "Find the top 5 oldest customers"
  • "Who has purchased more than 3 products in the last month?"

Creating Data

You can give instructions like:

  • "Add a new person named John Doe who is 30 years old"
  • "Create a product called 'Premium Coffee' with price $24.99"
  • "Add a new department called 'Research & Development'"

Creating Relationships

You can request relationships like:

  • "Make John Doe friends with Jane Smith"
  • "Set Product A as a component of Product B"
  • "Assign John Doe to the Sales department"

Complex Operations

You can perform more complex operations with natural language:

  • "Find all products purchased by customers who live in New York"
  • "Show me friends of friends of John Doe"
  • "Calculate the average age of employees in each department"

Development

If you want to contribute or modify the MCP:

  1. Clone the repository:
git clone https://github.com/da-okazaki/mcp-neo4j-server.git
cd mcp-neo4j-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run tests:
npm test

Related MCPs

Milvus Vector Database
DatabasesPython

Connect to Milvus vector database for semantic search and vector operations

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.