Neo4j MCP Server

Integrations

  • Supports configuration through .env files for setting Neo4j connection details, providing a convenient way to manage database credentials.

  • Enables execution of Cypher queries against a Neo4j graph database, allowing management of graph database operations through the Model Context Protocol.

Neo4j MCP Server

A Neo4j MCP server implementation for managing graph database operations through the Model Context Protocol.

🔌 Compatible with both Cursor and Claude Desktop!

Quick Start

You can run the server directly using npx:

# Using a single connection string NEO4J_CONNECTION=neo4j+s://your-instance.databases.neo4j.io,neo4j,your-password npx neo4j-mcpserver # Or using separate environment variables NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io NEO4J_USER=neo4j NEO4J_PASSWORD=your-password npx neo4j-mcpserver

Installation

If you prefer to install the package globally:

npm install -g neo4j-mcpserver

Then run it:

NEO4J_CONNECTION=neo4j+s://your-instance.databases.neo4j.io,neo4j,your-password neo4j-mcpserver

Environment Variables

You can provide the Neo4j connection details in two ways:

  1. Using a single connection string:
    NEO4J_CONNECTION=<uri>,<user>,<password>
  2. Using separate environment variables:
    NEO4J_URI=<your-uri> NEO4J_USER=<your-user> NEO4J_PASSWORD=<your-password>

You can also use a .env file in your project root:

NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io NEO4J_USER=neo4j NEO4J_PASSWORD=your-password

Configuration ⚙️

Configuring Cursor 🖥️

To set up the Neo4j MCP server in Cursor:

  1. Open Cursor Settings
  2. Navigate to Features > MCP Servers
  3. Click on the "+ Add New MCP Server" button
  4. Fill out the following information:
    • Name: Enter a nickname for the server (e.g., "neo4j-mcp")
    • Type: Select "command" as the type
    • Command: Enter the command to run the server:
    env=NEO4J_URI=your-neo4j-uri,NEO4J_USER=your-neo4j-user,NEO4J_PASSWORD=your-neo4j-password npx -y @neobarrientos/neo4j_mcpserver

    Important: Replace the credentials with your actual Neo4j database credentials.

Available Tools 🛠️

neo4j-query

Execute Cypher queries against your Neo4j database.

Example usage in Cursor:

MATCH (n) RETURN n LIMIT 5

Troubleshooting 🔧

If you encounter issues:

  1. Verify Neo4j Credentials
    • Check that your Neo4j URI, username, and password are correct
    • Ensure your Neo4j database is accessible
  2. Path Issues
    • Ensure there are no spaces in the installation path
    • Use forward slashes (/) in paths
  3. Tool Detection Issues
    • Try restarting Cursor
    • Verify the server is running (check Cursor's MCP server list)
    • Check that environment variables are properly set

Development 👩‍💻

To run locally:

git clone <repository-url> cd neo4j-mcpserver npm install npm run build npm start

License

ISC

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

An implementation for managing Neo4j graph database operations through the Model Context Protocol, enabling users to execute Cypher queries against their Neo4j database via AI assistants like Cursor and Claude Desktop.

  1. Quick Start
    1. Installation
      1. Environment Variables
        1. Configuration ⚙️
          1. Configuring Cursor 🖥️
        2. Available Tools 🛠️
          1. neo4j-query
        3. Troubleshooting 🔧
          1. Development 👩‍💻
            1. License

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                This server enables interaction between Neo4j databases and Claude Desktop, allowing users to execute Cypher queries, create nodes, and establish relationships in the database.
                Last updated -
                3
                72
                24
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A fork of the Neo4j Model Context Protocol server that enables interaction with Neo4j knowledge graphs through environment variable configuration and improved options for remote connections.
                Last updated -
                1
                TypeScript
              • -
                security
                F
                license
                -
                quality
                An MCP server that enables graph database interactions with Neo4j, allowing users to access and manipulate graph data through natural language commands.
                Last updated -
                Python
              • -
                security
                A
                license
                -
                quality
                Enhanced knowledge graph memory server for AI assistants that uses Neo4j as the backend storage engine, enabling powerful graph queries and efficient storage of user interaction information with full MCP protocol compatibility.
                Last updated -
                TypeScript
                MIT License

              View all related MCP servers

              ID: dnuw2xtl57