About Neo4j MCP Server
Neo4j MCP Server connects MCP clients to a Neo4j graph database and lets them run Cypher queries. It is configured with Neo4j connection credentials and is compatible with Cursor and Claude Desktop.
Key features
- 01Run Cypher queries against Neo4j
- 02Configure connection with environment variables
- 03Load settings from a .env file
- 04Use with Cursor and Claude Desktop
Use cases
- 01Query graph data from an MCP client
- 02Inspect nodes with Cypher queries
MCP support
Exposes a `neo4j-query` tool to MCP clients for executing Cypher queries against a Neo4j database.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
4Saved tool list · updated 3w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| pulse | object | Yes | |
| pulse.name | string | Yes | |
| pulse.version | string | No | |
| pulse.description | string | No | |
| pulse.isAsync | boolean | No | |
| pulse.isMainPulse | boolean | No | |
| pulse.fileLocation | string | Yes | |
| entity | string | Yes | |
| action | string | Yes | |
| dataStructures | object | No | |
| dataStructures.inputs | array | No | |
| dataStructures.outputs | array | No | |
| relationships | array | No |
Details
From the project READMENeo4j 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:
-
Using a single connection string:
NEO4J_CONNECTION=<uri>,<user>,<password> -
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:
- Open Cursor Settings
- Navigate to Features > MCP Servers
- Click on the "+ Add New MCP Server" button
- 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:
Important: Replace the credentials with your actual Neo4j database credentials.env=NEO4J_URI=your-neo4j-uri,NEO4J_USER=your-neo4j-user,NEO4J_PASSWORD=your-neo4j-password npx -y @neobarrientos/neo4j_mcpserver
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:
-
Verify Neo4j Credentials
- Check that your Neo4j URI, username, and password are correct
- Ensure your Neo4j database is accessible
-
Path Issues
- Ensure there are no spaces in the installation path
- Use forward slashes (/) in paths
-
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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.