Skip to main content
Glama
Tobarrientos2

Neo4j MCP Server

Neo4j MCP 服务器

Neo4j MCP 服务器实现,用于通过模型上下文协议管理图形数据库操作。

🔌 与 Cursor 和 Claude Desktop 兼容!

快速入门

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

# Using a single connection string
NEO4J_CONNECTION=neo4j+s://your-instance.databases.neo4j.io,neo4j,your-password npx neo4j-mcpserver

# Or using separate environment variables
NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io NEO4J_USER=neo4j NEO4J_PASSWORD=your-password npx neo4j-mcpserver

Related MCP server: Neo4j MCP Server

安装

如果您希望全局安装该包:

npm install -g neo4j-mcpserver

然后运行它:

NEO4J_CONNECTION=neo4j+s://your-instance.databases.neo4j.io,neo4j,your-password neo4j-mcpserver

环境变量

您可以通过两种方式提供 Neo4j 连接详细信息:

  1. 使用单个连接字符串:

    NEO4J_CONNECTION=<uri>,<user>,<password>
  2. 使用单独的环境变量:

    NEO4J_URI=<your-uri>
    NEO4J_USER=<your-user>
    NEO4J_PASSWORD=<your-password>

您还可以在项目根目录中使用.env文件:

NEO4J_URI=neo4j+s://your-instance.databases.neo4j.io
NEO4J_USER=neo4j
NEO4J_PASSWORD=your-password

配置⚙️

配置光标🖥️

要在 Cursor 中设置 Neo4j MCP 服务器:

  1. 打开游标设置

  2. 导航至“功能”>“MCP 服务器”

  3. 点击“+ 添加新的 MCP 服务器”按钮

  4. 填写以下信息:

    • 名称:输入服务器的昵称(例如“neo4j-mcp”)

    • 类型:选择“命令”作为类型

    • 命令:输入运行服务器的命令:GXP7

    重要提示:将凭据替换为您的实际 Neo4j 数据库凭据。

可用工具🛠️

neo4j-查询

针对您的 Neo4j 数据库执行 Cypher 查询。

Cursor 中的用法示例:

MATCH (n) RETURN n LIMIT 5

故障排除

如果您遇到问题:

  1. 验证 Neo4j 凭据

    • 检查您的 Neo4j URI、用户名和密码是否正确

    • 确保您的 Neo4j 数据库可访问

  2. 路径问题

    • 确保安装路径中没有空格

    • 在路径中使用正斜杠 (/)

  3. 工具检测问题

    • 尝试重新启动 Cursor

    • 验证服务器是否正在运行(检查 Cursor 的 MCP 服务器列表)

    • 检查环境变量是否正确设置

开发👩‍💻

要在本地运行:

git clone <repository-url>
cd neo4j-mcpserver
npm install
npm run build
npm start

执照

国际学习中心

Install Server
A
license - permissive license
B
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tobarrientos2/neo4j-mcpserver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server