
Neo4j 官方 MCP 服务器
概览
Neo4j MCP 为 AI 助手和基于大型语言模型(LLM)的工具提供直接、结构化访问你的 Neo4j 图数据库。通过实现模型上下文协议(MCP),它作为任何兼容 MCP 客户端(如支持 MCP 的 Claude、光标或 VS Code)与你的 Neo4j 实例之间的桥梁。 - 探索你的图模式 - 发现节点标签、关系类型和属性键 - 让AI无需事先知识即可推理你的数据模型 - 运行Cypher查询 - 根据自然语言提示对数据库执行、读取和写入查询 - 检查和分析数据 - 检索节点、关系和路径以回答问题、生成摘要或将数据输入其他工作流程 - get-schema — 内省标签、关系类型、属性键- read-cypher — 执行只读密码查询,不修改数据库数据,通过 EXPLAIN 和 Neo4j 的查询类型分类强制执行。
概述(AI 翻译)
Neo4j MCP 为 AI 助手和基于大型语言模型(LLM)的工具提供直接、结构化访问您的 Neo4j 图数据库。 通过实现模型上下文协议(MCP),它作为任何兼容MCP客户端(如支持MCP的Claude、光标或VS Code)与Neo4j实例之间的桥梁。
特色
- 探索你的图模式——发现节点标签、关系类型和属性键
- 让AI在没有事先知识的情况下推理你的数据模型
- 运行密码查询——根据自然语言提示对数据库执行、读取和写入查询
- 检查和分析数据——检索节点、关系和路径,以回答问题、生成摘要或将数据传递给其他工作流程
工具
get-schema— 内省标签、关系类型、属性键- [
read-cypher— 执行不修改数据库数据的只读密码查询,通过EXPLAIN和 Neo4j 的查询类型分类强制执行。注意: Neo4j 错误将自定义过程或函数分类为只读,可能会绕过此检查;确保分类正确的责任由过程/函数维护者负责。
本页由 AI 翻译,技术细节请以原文为准。
README
Neo4j MCP
Neo4j MCP gives AI assistants and LLM-powered tools direct, structured access to your Neo4j graph database. By implementing the Model Context Protocol (MCP), it acts as a bridge between any MCP-compatible client, such as Claude, Cursor, or VS Code with MCP support, and your Neo4j instance.
Features
- Explore your graph schema - discover node labels, relationship types, and property keys
- Let AI reason on your data model without prior knowledge
- Run Cypher queries - execute, read, and write queries against your database in response to natural language prompts
- Inspect and analyze data - retrieve nodes, relationships, and paths to answer questions, generate summaries, or feed data to other workflows
Tools
get-schema— introspect labels, relationship types, property keysread-cypher— execute read-only Cypher queries that do not modify database data, enforced viaEXPLAINand Neo4j’s query-type classification. Note: custom procedures or functions incorrectly classified as read-only by Neo4j may bypass this check; ensuring correct classification is the responsibility of the procedure/function maintainer.write-cypher— execute write Cypher queries (disabled ifNEO4J_MCP_READ_ONLY=true)list-gds-procedures— list available GDS procedures
Installation
Install with PyPI:
pip install neo4j-mcp-server
For manual installation or using brew, please see MCP documentation -> Installation.
Server configuration (VSCode - STDIO)
Create / edit mcp.json:
{
"servers": {
"neo4j": {
"type": "stdio",
"command": "python",
"args": ["-m", "neo4j_mcp_server"],
"env": {
"NEO4J_MCP_URI": "bolt://localhost:7687",
"NEO4J_MCP_USERNAME": "neo4j",
"NEO4J_MCP_PASSWORD": "password",
"NEO4J_MCP_DATABASE": "neo4j",
}
}
}
}
See MCP documentation > Configuration for more details.
Links
- Documentation: The official Neo4j MCP documentation.
- Discord: The Neo4j discord channel.
- Contributing Guide: Contribution workflow, development environment, mocks and testing.
For issues and feedback, you can also create a GitHub issue with reproduction details (omit sensitive data).
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →