An MCP server that provides integration between Neo4j graph database and Claude Desktop, enabling graph database operations through natural language interactions.
You can run this MCP server directly using npx:
npx @alanse/mcp-neo4j
Or add it to your Claude Desktop configuration:
{
"mcpServers": {
"neo4j": {
"command": "npx",
"args": ["@alanse/mcp-neo4j-server"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password"
}
}
}
}
This server provides tools for interacting with a Neo4j database:
execute_query
: Execute Cypher queries on the Neo4j database
create_node
: Create a new node in the graph database
create_relationship
: Create a relationship between two existing nodes
To install MCP Neo4j Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @alanse/mcp-neo4j-server --client claude
git clone https://github.com/da-okazaki/mcp-neo4j-server.git
cd mcp-neo4j-server
npm install
npm run build
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)Here are examples of how you can interact with the Neo4j database using natural language:
You can ask questions like:
Example:
User: "Show me all employees in the Sales department"
Claude: Let me query the database for Sales department employees.
[Executes query internally: MATCH (e:Employee)-[:WORKS_IN]->(d:Department {name: 'Sales'}) RETURN e.name, e.position]
Result:
- John Smith (Sales Manager)
- Sarah Johnson (Sales Representative)
- Mike Brown (Account Executive)
You can give instructions like:
Example:
User: "Add a new person named John Doe who is 30 years old"
Claude: I'll create a new Person node with the provided information.
[Creates node internally with label 'Person' and properties {name: 'John Doe', age: 30}]
Result: Created new person node with ID: 123
You can request relationships like:
Example:
User: "Make John Doe friends with Jane Smith"
Claude: I'll create a friendship relationship between these two people.
[Creates relationship internally: MATCH (a:Person {name: 'John Doe'}), (b:Person {name: 'Jane Smith'})
CREATE (a)-[:FRIENDS_WITH {since: '2024-01-05'}]->(b)]
Result: Created friendship relationship between John Doe and Jane Smith
You can perform more complex operations with natural language:
Example:
User: "Find all products purchased by customers who live in New York"
Claude: I'll query the database for this information.
[Executes query internally:
MATCH (c:Customer {city: 'New York'})-[:PURCHASED]->(p:Product)
RETURN c.name, collect(p.name) as products]
Result:
- Alice Wilson: [Premium Coffee, Tea Set, Cookies]
- Bob Miller: [Premium Coffee, Water Bottle]
Run the test suite:
npm test
MIT
Seamless access to top MCP servers powering the future of AI integration.