- Home
- MCP servers
- Neo4j
Neo4j
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-da-okazaki_mcp-neo4j-server": {
"command": "npx",
"args": [
"@alanse/mcp-neo4j-server"
],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_PASSWORD": "your-password",
"NEO4J_USERNAME": "neo4j"
}
}
}
}This MCP server enables natural-language interactions to run Cypher queries against a Neo4j graph database from Claude Desktop. You can execute queries, create nodes, and establish relationships without writing Cypher directly in your client.
How to use
Connect to the MCP server from your Claude Desktop configuration to start issuing graph database operations through natural language. You will use three core tools: execute_query to run Cypher queries, create_node to add nodes with labels and properties, and create_relationship to link existing nodes with a relationship type and optional properties.
Typical workflows you can perform include querying for specific graph patterns, creating nodes with rich properties, and establishing relationships between nodes. You provide natural language prompts, and the MCP server translates them into Cypher operations behind the scenes, returning structured results that you can inspect and refine.
How to install
Prerequisites you need before installing or running the server:
-
Node.js and npm installed on your machine
-
A Neo4j database accessible at a Bolt URI with a valid username and password
Install and run the MCP Neo4j Server directly with npx or configure Claude Desktop to launch it via npx with environment variables
npx @alanse/mcp-neo4j
Configuration
Set up the MCP server configuration in Claude Desktop to point to the MCP package and to provide the required Neo4j credentials.
{
"mcpServers": {
"neo4j": {
"command": "npx",
"args": ["@alanse/mcp-neo4j-server"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password"
}
}
}
}
Usage examples
Query data with natural language prompts, such as finding entities and relationships, or aggregating properties across nodes.
Create nodes with labeled properties by describing the desired entity, then confirm the creation to receive the internal node ID.
Link existing nodes by specifying the relationship type and direction, and optionally attach properties to the relationship.
Notes on security and best practices
Always pass parameters to Cypher queries to prevent injection attacks. Ensure your Neo4j instance is secured and reachable only from trusted clients.
Store credentials securely and rotate passwords regularly. Use environment variables to avoid hard-coding secrets in any configuration files.
Testing and troubleshooting
Run the test suite if provided by the project to verify the MCP server integration with Neo4j.
If you encounter connection errors, verify the NEO4J_URI, NEO4J_USERNAME, and NEO4J_PASSWORD values, and ensure the Neo4j database is reachable from the machine running the MCP server.
Available tools
execute_query
Execute Cypher queries against the Neo4j database. Supports READ, CREATE, UPDATE, and DELETE operations and returns structured results. Parameters can be passed to prevent injection.
create_node
Create a new node in the graph with specified labels and properties. Returns the created node with its internal ID and supports all Neo4j data types for properties.
create_relationship
Create a relationship between two existing nodes. Define the relationship type, direction, and optional properties. Requires source and target node IDs.