neo4j-server-remote 是一个使用 Server-Sent Events (SSE) 或 STDIO 作为传输协议的 MCP 服务器。
这是一个提供数据库交互并允许通过 Neo4j 进行图探索能力的 Model Context Protocol (MCP) 服务器实现。该服务器支持执行 Cypher 图查询、分析复杂领域数据,并支持选择远程可访问的数据库。灵感来源于 neo4j-contrib/mcp-neo4j。
服务器提供了一个演示提示:
mcp-demo:引导用户进行数据库操作的交互式提示
服务器提供了三个核心工具:
read-neo4j-cypher
query(字符串):要执行的 Cypher 查询write-neo4j-cypher
query(字符串):Cypher 更新查询{ nodes_updated: 数字, relationships_created: 数字, ... } 的结果摘要计数器get-neo4j-schema
git clone https://github.com/dsimile/mcp-neo4j-server-sse.git
cd mcp-neo4j-server-sse
pip install -r requirements.txt
使用 UX 命令运行 MCP 服务器,并选择您选择的数据库。默认 IP 地址是 0.0.0.0,默认端口是 8543。
uv run .\src\mcp-neo4j-cypher\neo4j_server_remote.py --url bolt://localhost:7687 --username neo4j --password neo4j123 --database neo4j
使用 UX 命令在本地运行 MCP 服务器,模式设置为 STDIO 并使用相同的 Neo4j 连接信息。
注意:请确保 Neo4j 正在运行并且可以进行远程连接。
将服务器配置添加到您的 cline_mcp_settings.json 中。
{
"mcpServers": {
"neo4j-remote": {
"url": "http://0.0.0.0:8543/sse",
"disabled": false,
"autoApprove": []
}
}
}
{
"mcpServers": {
"neo4j-local": {
"disabled": false,
"timeout": 60,
"command": "uv",
"args": [
"run",
"/absolute/path/to/neo4j_server_remote.py",
"--url",
"bolt://localhost:7687",
"--username",
"neo4j",
"--password",
"neo4j123",
"--database",
"neo4j",
"--mode",
"stdio"
]
}
}
}
此 MCP 服务器采用 MIT 许可证。这意味着您可以自由地使用、修改和分发软件,但需遵守 MIT 许可证中的条款和条件。更多详情,请参阅项目存储库中的 LICENSE 文件。