Neo4j MCP Server is an MCP server that provides a read-only query and exploration service for Neo4j graph databases. Built with Java 21, Spring Boot, and Spring AI, it connects directly to local or remote Neo4j instances over the Bolt protocol using standard stdio communication. Database engineers, software developers, and data analysts use it to allow AI assistants to safely inspect graph structures without risking unwanted data modifications. The server strictly enforces read-only operations, allowing query statements like MATCH, RETURN, and WITH while blocking mutating commands such as CREATE, MERGE, DELETE, or DROP. Through ten specialized MCP tools, assistants can execute custom read-only Cypher queries, fetch database metadata, inspect schema constraints and indexes, traverse relationships between specific nodes, retrieve node neighborhoods up to multiple degrees of separation, and perform text searches across node properties. It also includes guardrails such as a 1000-record query limit and a 30-second timeout to maintain database stability.
Category: Databases & Data Stores
Tags: cypher, graph, neo4j, nosql
src/main/resources/application.properties (including neo4j.uri, neo4j.username, and neo4j.password). 3. Build the JAR file using Maven: bash ./mvnw clean package -DskipTests 4. Add the server configuration to your MCP client, such as Claude Desktop, pointing to the built JAR file: json { "mcpServers": { "neo4j": { "command": "java", "args": ["-jar", "/path/to/neo4jmcp-0.0.1-SNAPSHOT.jar"] } } } 5. Restart your MCP client to register the tools.Part of MCP Servers
Neo4j MCP Server exposes ten read-only tools to inspect and traverse Neo4j graph databases. It lets AI assistants run safe Cypher queries, view database statistics, retrieve schema details like indexes and constraints, find relationships between specific nodes, explore neighboring nodes up to several degrees of separation, and perform text searches on node attributes.
You need Java 21+ and Maven 3.6+. Clone the repository, configure your connection settings in the application properties file, and package the project using Maven with the skip tests flag. Then, register the resulting JAR file in your MCP client configuration using the java command.
It operates over standard input and output (stdio), making it compatible with any MCP client that supports stdio process execution, including Claude Desktop.
Yes, Neo4j MCP Server is open source and hosted on GitHub under the STUzhy/java-neo4j-mcp repository.
No, it enforces strict read-only safety. It permits statements containing MATCH, RETURN, OPTIONAL MATCH, and UNWIND, while explicitly rejecting write commands like CREATE, MERGE, DELETE, SET, and DROP.