This server provides tools for interacting with a Neo4j database:\n\n### Neo4j Enterprise Support
This server now supports connecting to specific databases in Neo4j Enterprise Edition. By default, it connects to the "neo4j" database, but you can specify a different database using the NEO4J_DATABASE environment variable.\n\n### Tools
execute_query: Execute Cypher queries on the Neo4j database
Supports all types of Cypher queries (READ, CREATE, UPDATE, DELETE)
Returns query results in a structured format
Parameters can be passed to prevent injection attacks
create_node: Create a new node in the graph database
Specify node labels and properties
Returns the created node with its internal ID
Supports all Neo4j data types for properties
create_relationship: Create a relationship between two existing nodes
Define relationship type and direction
Add properties to relationships
Requires node IDs for source and target nodes
Installation# Installing via Smithery
To install MCP Neo4j Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @alanse/mcp-neo4j-server --client claude
```\n\n### For Development
1. Clone the repository:
```bash
git clone https://github.com/da-okazaki/mcp-neo4j-server.git
cd mcp-neo4j-server
Install dependencies:
npm install
Build the project:
npm run build
Configuration
The server requires the following environment variables:
NEO4J_URI: Neo4j database URI (default: bolt://localhost:7687)
NEO4J_USERNAME: Neo4j username (default: neo4j)
NEO4J_PASSWORD: Neo4j password (required)
NEO4J_DATABASE: Neo4j database name (default: neo4j)
Usage Examples
Here are examples of how you can interact with the Neo4j database using natural language:\n\n### Connecting to a Specific Database
For Neo4j Enterprise users with multiple databases, you can specify which database to connect to:
{
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password",
"NEO4J_DATABASE": "myCustomDatabase"
}
}
```\n\n### Querying Data
You can ask questions like:
- "Show me all employees in the Sales department"
- "Find the top 5 oldest customers"
- "Who has purchased more than 3 products in the last month?"\n\n### Creating Data
You can give instructions like:
- "Add a new person named John Doe who is 30 years old"
- "Create a product called 'Premium Coffee' with price $24.99"\n\n### Creating Relationships
You can request relationships like:
- "Make John Doe friends with Jane Smith"
- "Set Product A as a component of Product B"\n\n### Complex Operations
You can perform more complex operations with natural language:
- "Find all products purchased by customers who live in New York"
- "Show me friends of friends of John Doe"
## Testing
Run the test suite:
```bash
npm test