
da-okazaki/mcp-neo4j-server 是从 https://github.com/da-okazaki/mcp-neo4j-server. 导入的 MCP 服务器候选
概览
da-okazaki/mcp-neo4j-server 是从 https://github.com/da-okazaki/mcp-neo4j-server. 导入的 MCP 服务器候选
概述(AI 翻译)
这是一个MCP服务器,提供Neo4j图数据库与Claude Desktop之间的集成,通过自然语言交互实现图数据库操作。
快速启动
你可以直接用 npx 运行这个 MCP 服务器:
或者把它添加到你的Claude桌面配置中:
特色
该服务器提供与 Neo4j 数据库交互的工具:
Neo4j 企业支持
该服务器现在支持连接 Neo4j 企业版中的特定数据库。默认情况下,它连接到“neo4j”数据库,但你可以使用 NEO4J_DATABASE 环境变量指定不同的数据库。
工具
-
execute_query:在 Neo4j 数据库上执行密码查询 -
支持所有类型的密码查询(读取、创建、更新、删除)
-
以结构化格式返回查询结果
-
可以传递参数以防止注入攻击
-
create_node:在图数据库中创建新节点 -
指定节点标签和属性
-
返回已创建节点及其内部ID
-
支持所有 Neo4j 属性数据类型
-
create_relationship:创建两个现有节点之间的关系 -
定义关系类型和方向
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Neo4j Server
An MCP server that provides integration between Neo4j graph database and Claude Desktop, enabling graph database operations through natural language interactions.
Quick Start
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"
}
}
}
}
Features
This server provides tools for interacting with a Neo4j database:
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.
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
For Development
- Clone the repository:
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) - Use this to connect to a specific database in Neo4j Enterprise
Usage Examples
Here are examples of how you can interact with the Neo4j database using natural language:
Connecting to a Specific Database
安装
npx @alanse/mcp-neo4j-server配置
{
"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"
}
}
}
}