MCP Neo4j
This server enables interaction between Neo4j databases and Claude Desktop, allowing users to execute Cypher queries, create nodes, and establish relationships in the database.
What is MCP Neo4j?
MCP Neo4j is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this server enables interaction between neo4j databases and claude desktop, allowing users to execute cypher queries, create nodes, and establish relationships in the database.
This server enables interaction between Neo4j databases and Claude Desktop, allowing users to execute Cypher queries, create nodes, and establish relationships in the database.
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- This server enables interaction between Neo4j databases and
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-neo4j-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Neo4j
The MCP Neo4j Server connects Claude and other MCP clients directly to a Neo4j graph database, enabling natural-language execution of Cypher queries, node creation, and relationship management. It supports the full Bolt protocol so you can run reads, writes, updates, and deletes against any Neo4j 4.x or 5.x instance. Developers use it to query knowledge graphs, explore connected data, or automate graph-building workflows without leaving their AI assistant.
Prerequisites
- Node.js 18 or later installed (required to run npx)
- A running Neo4j instance (local AuraDB or self-hosted) with Bolt access on port 7687
- Neo4j credentials: URI, username, and password
- An MCP-compatible client such as Claude Desktop or Claude Code
Ensure Neo4j is running
Start your Neo4j database and confirm it is reachable. For local instances use Neo4j Desktop or the community server. For cloud use Neo4j AuraDB and note the connection URI (e.g. neo4j+s://xxxxx.databases.neo4j.io).
Test connectivity with the Cypher shell
Verify your credentials before wiring up the MCP server. This avoids silent authentication failures later.
cypher-shell -a bolt://localhost:7687 -u neo4j -p your-password 'RETURN 1'Open your MCP client configuration file
For Claude Desktop this is claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json). For Claude Code it is your project or user-level .mcp.json.
Add the neo4j server entry
Insert the server block with your real Neo4j credentials. NEO4J_PASSWORD is required; the other three have defaults but should be set explicitly for clarity.
{
"mcpServers": {
"neo4j": {
"command": "npx",
"args": ["@alanse/mcp-neo4j-server"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password",
"NEO4J_DATABASE": "neo4j"
}
}
}
}Restart your MCP client
Quit and reopen Claude Desktop (or reload your MCP client) so it picks up the new server configuration. The server process is launched on demand via npx.
Verify the connection
Ask your AI assistant to run a simple query. A successful response confirms the server is connected and authenticated.
MCP Neo4j Examples
Client configuration
Complete claude_desktop_config.json entry for the MCP Neo4j Server using the @alanse/mcp-neo4j-server package.
{
"mcpServers": {
"neo4j": {
"command": "npx",
"args": ["@alanse/mcp-neo4j-server"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password",
"NEO4J_DATABASE": "neo4j"
}
}
}
}Prompts to try
Example natural-language requests that map to the server's execute_query, create_node, and create_relationship tools.
- "Run the Cypher query MATCH (n:Person) RETURN n.name LIMIT 10 and show me the results"
- "Create a node with label Product and properties name='Widget', price=9.99"
- "Create a PURCHASED relationship from the Person node with id 1 to the Product node with id 5"
- "Find all nodes connected to the node named 'Alice' and tell me their labels"
- "Delete all nodes with the label Temp using a Cypher query"Troubleshooting MCP Neo4j
Connection refused or timeout on bolt://localhost:7687
Make sure Neo4j is running and the Bolt connector is enabled. In neo4j.conf check that dbms.connector.bolt.enabled=true. For Docker, ensure port 7687 is published (-p 7687:7687).
Authentication error: Neo4j.ClientError.Security.Unauthorized
Double-check NEO4J_USERNAME and NEO4J_PASSWORD in your config. After a fresh Neo4j install the default password must be changed before any client can connect.
npx command not found or hangs on first run
npx downloads the package on first invocation. Ensure Node.js 18+ is installed (node --version) and that your machine has outbound internet access to reach npm's registry.
Frequently Asked Questions about MCP Neo4j
What is MCP Neo4j?
MCP Neo4j is a Model Context Protocol (MCP) server that this server enables interaction between neo4j databases and claude desktop, allowing users to execute cypher queries, create nodes, and establish relationships in the database. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Neo4j?
Follow the installation instructions on the MCP Neo4j GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Neo4j?
MCP Neo4j works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Neo4j free to use?
Yes, MCP Neo4j is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
MCP Neo4j Alternatives — Similar Databases Servers
Looking for alternatives to MCP Neo4j? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Neo4j in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Neo4j?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.