executeCypherLABSCO SUMMARY
Reads are enforced by the server, not by the prompt.
CREATE, MERGE, DELETE, SET and DROP are rejected rather than discouraged, which is what makes this safe to point at a graph you care about. Two limits are set for you and worth knowing before a big query: a single query returns at most 1000 records and times out after 30 seconds, so ask the schema tools for shape first and save the broad query for when you know what you are looking for.
What it is
A Spring AI MCP server for Neo4j that gives an assistant safe read access to a graph database: arbitrary read Cypher, plus purpose-built tools for schema discovery and graph traversal.
What you get
executeCypherfor read-only queries, andgetDatabaseInfofor version, statistics and schema in one call- Schema discovery:
getNodeLabels,getRelationshipTypes,getPropertyKeysandgetSchemaInfofor constraints and indexes findNodesByLabel— nodes by label with property filtering and a result limit- Traversal:
getRelationshipsBetweenNodesfor the links between two nodes, andgetNodeNeighborhoodfor a node's neighbours to a given depth searchNodesByText— free-text search across node properties- 10 tools in total, and the startup log prints the registered count so you can confirm they all loaded
Requirements
Java 21+, Maven 3.6+ and a reachable Neo4j instance. Put the bolt URI, username, password and database name in application.properties, build with ./mvnw clean package -DskipTests, and have the client launch the jar with java -jar.
Setup effort
Follow the published steps — ./mvnw clean package -DskipTests
USE CASES
Exploring a graph you did not build
Pull the labels, relationship types and property keys before writing a single query.
Understanding how two entities connect
Ask for the relationships between the two nodes, then widen to the neighbourhood if the direct link is missing.
Finding a node when you only know a name
Search node properties for the text, optionally restricted to one label.
10 tools
Listed in project docs. Your client may show a different list.
getDatabaseInfogetNodeLabelsgetRelationshipTypesgetPropertyKeysgetSchemaInfofindNodesByLabelgetRelationshipsBetweenNodesgetNodeNeighborhoodsearchNodesByTextBEFORE YOU INSTALL
What to know first
Tools you get
10 tools named in the project's documentation.
Requires
- Java 21+
- Maven 3.6+
- A Neo4j database (local or remote)
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/STUzhy/java-neo4j-mcp
cd java-neo4j-mcpEdit src/main/resources/application.properties and set neo4j.uri, neo4j.username, neo4j.password and neo4j.database for your Neo4j instance
./mvnw clean package -DskipTestsMCP Clients
Any MCP client
{
"mcpServers": {
"neo4j": {
"command": "java",
"args": [
"-jar",
"<YOUR_PATH_TO_NEO4JMCP_0_1_SNAPSHOT>"
]
}
}
}Claude Desktop
{
"mcpServers": {
"neo4j-server": {
"command": "java",
"args": [
"-jar",
"<YOUR_PATH_TO_NEO4JMCP_0_1_SNAPSHOT>"
]
}
}
}