Skip to main content
Glama
Neo4j MCP Server

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

执照

国际学习中心

Available Tools

1 tool
neo4j-queryC

Execute a Cypher query against the Neo4j database

Inputs: query (required), parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a single, clear purpose: executing Cypher queries against a Neo4j database.

    Naming Consistency5/5

    Since there is only one tool, naming consistency is inherently perfect. The tool name 'neo4j-query' follows a clear and descriptive pattern, though no pattern can be established or broken with a single tool.

    Tool Count2/5

    A single tool is too few for a database server's apparent scope, which typically requires operations like creating, updating, deleting, and querying data. This minimal set limits functionality and forces all operations through a generic query interface, which is insufficient for structured interactions.

    Completeness2/5

    The tool surface is severely incomplete for a Neo4j database server. While 'neo4j-query' allows executing arbitrary Cypher queries, it lacks dedicated tools for common operations like creating nodes, updating relationships, or managing transactions, leaving significant gaps that agents must work around with raw queries.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI assistants with persistent graph database memory using Neo4j, enabling task management, relationship understanding, semantic search with embeddings, file indexing, and multi-agent coordination through the Model Context Protocol.
      290
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Neo4j graph databases through natural language, supporting Cypher queries, schema management, data manipulation, and graph algorithms.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables interaction with Neo4j databases from the Cursor IDE by executing Cypher queries, managing connections, and retrieving database information.
      3
      -