Token导航 LogoToken导航TokenDH.com
MCP Neo4j Server logo
开发工具stdio官方级别未说明来源级核验

MCP Neo4j Server

MCP Server

@alanse/mcp-neo4j

mcp-neo4j-server

工具数

0

提示词数

0

GitHub Stars

58

资源数

0
TypeScriptClaude数据库集成Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

da-okazaki

提供方

da-okazaki

最后核验

2026/5/18 02:15

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx @alanse/mcp-neo4j

详细介绍

MCP Neo4j服务器

](https://smithery.ai/server/@alanse/mcp-neo4j-server)

一个MCP服务器,提供Neo4j图形数据库和Claude Desktop之间的集成,通过自然语言交互实现图形数据库操作。

快速开始

您可以使用npx直接运行此MCP服务器:

npx @alanse/mcp-neo4j

或者将其添加到您的Claude Desktop配置中:

{
  "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数据库交互的工具:

Neo4j企业支持

此服务器现在支持连接到Neo4j Enterprise Edition中的特定数据库。默认情况下,它连接到“neo4j”数据库,但您可以使用 NEO4J_DATABASE 环境变量。

工具

  • execute_query:在Neo4j数据库上执行Cypher查询

- 支持所有类型的Cypher查询(READ、CREATE、UPDATE、DELETE) - 以结构化格式返回查询结果 - 可以传递参数以防止注射攻击

  • create_node:在图形数据库中创建新节点

- 指定节点标签和属性 - 返回创建的节点及其内部ID - 支持属性的所有Neo4j数据类型

  • create_relationship:在两个现有节点之间创建关系

- 定义关系类型和方向 - 向关系添加属性 - 需要源节点和目标节点的节点ID

安装

通过Smithery安装

通过以下方式自动安装适用于Claude Desktop的MCP Neo4j服务器 史密瑟里:

npx -y @smithery/cli install @alanse/mcp-neo4j-server --client claude

为了发展

  1. 克隆存储库:
git clone https://github.com/da-okazaki/mcp-neo4j-server.git
cd mcp-neo4j-server
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build

配置

服务器需要以下环境变量:

  • NEO4J_URI:Neo 4 J数据库类型(默认值:bolt://localhost:7687)
  • NEO4J_USERNAME:Neo4j用户名(默认:Neo4j)
  • NEO4J_PASSWORD:Neo4j密码(必填)
  • NEO4J_DATABASE:Neo4j数据库名称(默认:Neo4j)-使用此名称连接到Neo4j Enterprise中的特定数据库

使用示例

以下是使用自然语言与Neo4j数据库交互的示例:

连接到特定数据库

对于拥有多个数据库的Neo4j Enterprise用户,您可以指定要连接到哪个数据库:

{
  "env": {
    "NEO4J_URI": "bolt://localhost:7687",
    "NEO4J_USERNAME": "neo4j",
    "NEO4J_PASSWORD": "your-password",
    "NEO4J_DATABASE": "myCustomDatabase"
  }
}

这将连接到“myCustomDatabase”,而不是默认的“neo4j”数据库。

查询数据

你可以问这样的问题:

  • “显示销售部门的所有员工”
  • “查找前5位最老客户”
  • “谁在上个月购买了3件以上的产品?”

例子:

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)

创建数据

您可以给出如下指示:

  • “添加一个名为John Doe的30岁新用户”
  • “创造一款名为‘高级咖啡’的产品,价格为24.99美元”
  • “添加一个名为“研发”的新部门”

例子:

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

建立关系

您可以请求以下关系:

  • “让无名氏和简·史密斯成为朋友”
  • “将产品A设置为产品B的组成部分”
  • “将John Doe分配到销售部门”

例子:

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

复杂操作

您可以使用自然语言执行更复杂的操作:

  • “查找居住在纽约的客户购买的所有产品”
  • “给我看看无名氏的朋友”
  • “计算每个部门员工的平均年龄”

例子:

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]

测试

运行测试套件:

npm test

许可证

麻省理工学院

目录标签

目录标签

TypeScriptClaude数据库集成developer-toolsmcp-neo4jneo4jgraph-database图形数据库本地部署自然语言处理企业支持Cypher查询

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

@alanse/mcp-neo4j

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP