by da-okazaki
Enables Claude Desktop to perform Neo4j graph database operations using natural language commands.
Mcp Neo4j Server provides tools that let users interact with a Neo4j database through Claude Desktop. Natural language prompts are translated into Cypher queries, node creations, and relationship definitions, returning structured results.
npx @alanse/mcp-neo4j
{
"mcpServers": {
"neo4j": {
"command": "npx",
"args": ["@alanse/mcp-neo4j-server"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "your-password",
"NEO4J_DATABASE": "neo4j"
}
}
}
}
NEO4J_DATABASE
.npx
command or Smithery CLI.NEO4J_URI
(default bolt://localhost:7687
)NEO4J_USERNAME
(default neo4j
)NEO4J_PASSWORD
(must be provided)NEO4J_DATABASE
(optional, defaults to neo4j
)NEO4J_DATABASE
to the desired database name.execute_query
tool with parameter binding; the server handles sanitization.npm test
after installation to execute the provided tests.npx -y @smithery/cli install @alanse/mcp-neo4j-server --client claude
.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",
"NEO4J_DATABASE": "neo4j"
}
}
}
}
This server provides tools for interacting with a Neo4j database:
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.
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)NEO4J_DATABASE
: Neo4j database name (default: neo4j) - Use this to connect to a specific database in Neo4j EnterpriseHere are examples of how you can interact with the Neo4j database using natural language:
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"
}
}
This will connect to "myCustomDatabase" instead of the default "neo4j" database.
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
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "neo4j": { "command": "npx", "args": [ "@alanse/mcp-neo4j-server" ], "env": { "NEO4J_URI": "bolt://localhost:7687", "NEO4J_USERNAME": "neo4j", "NEO4J_PASSWORD": "<YOUR_PASSWORD>", "NEO4J_DATABASE": "neo4j" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by googleapis
An MCP server that streamlines database tool development by handling connection pooling, authentication, observability, and secure access, allowing agents to interact with databases via natural language.
by bytebase
Provides a universal gateway that lets MCP‑compatible clients explore and query MySQL, PostgreSQL, SQL Server, MariaDB, and SQLite databases through a single standardized interface.
by designcomputer
Enables secure interaction with MySQL databases via the Model Context Protocol, allowing AI applications to list tables, read contents, and execute queries safely.
by benborla
Provides read‑only access to MySQL databases for large language models, allowing schema inspection and safe execution of SQL queries.
by ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by chroma-core
Offers an MCP server exposing Chroma's vector database capabilities for LLM applications, supporting collection and document management, multiple embedding functions, and flexible client types such as in‑memory, persistent, HTTP, and cloud.
by kiliczsh
Enables LLMs to interact with MongoDB databases via a standardized interface, offering schema inspection, query execution, aggregation, and write capabilities, with optional read‑only mode and smart ObjectId handling.
by domdomegg
Provides read and write access to Airtable bases for AI systems, enabling inspection of schemas and manipulation of records.
by XGenerationLab
A Model Context Protocol (MCP) server that enables natural language queries to databases