Neo4j MCP Server logo

Neo4j MCP Server

by Tobarrientos2

A Neo4j MCP server implementation for managing graph database operations through the Model Context Protocol. It is compatible with both Cursor and Claude Desktop.

View on GitHub

Last updated: N/A

What is Neo4j MCP Server?

The Neo4j MCP Server is a tool that allows you to interact with a Neo4j graph database using the Model Context Protocol. This enables integration with applications like Cursor and Claude Desktop, allowing you to execute Cypher queries and manage your graph database directly from these environments.

How to use Neo4j MCP Server?

The server can be run directly using npx neo4j-mcpserver or installed globally with npm install -g neo4j-mcpserver. You need to configure the Neo4j connection details using environment variables (either a single NEO4J_CONNECTION string or separate NEO4J_URI, NEO4J_USER, and NEO4J_PASSWORD variables). For Cursor, you need to add a new MCP server in the settings, specifying the command to run the server with your Neo4j credentials.

Key features of Neo4j MCP Server

  • Manages Neo4j graph database operations

  • Compatible with Cursor and Claude Desktop

  • Supports Cypher query execution

  • Configurable via environment variables or .env file

Use cases of Neo4j MCP Server

  • Executing Cypher queries from Cursor or Claude

  • Managing graph database schema and data

  • Integrating Neo4j with AI-powered development tools

  • Automating graph database tasks within development workflows

FAQ from Neo4j MCP Server

How do I configure the Neo4j connection?

You can use either a single NEO4J_CONNECTION environment variable or separate NEO4J_URI, NEO4J_USER, and NEO4J_PASSWORD variables.

How do I set up the server in Cursor?

Add a new MCP server in Cursor settings, specifying the command to run the server with your Neo4j credentials.

What if I encounter issues with tool detection?

Try restarting Cursor, verify the server is running, and check that environment variables are properly set.

What if I have spaces in the installation path?

Ensure there are no spaces in the installation path and use forward slashes (/) in paths.

How do I execute Cypher queries?

Use the neo4j-query tool. For example, in Cursor: MATCH (n) RETURN n LIMIT 5