Kuzu Mcp Server

Kuzu Mcp Server

🚀 kuzu-mcp-server

kuzu-mcp-server 是一个模型上下文协议(Model Context Protocol)服务器,它提供了对 Kuzu 数据库的访问能力。借助该服务器,大型语言模型可以检查数据库架构,并对指定的 Kuzu 数据库执行查询操作。

🚀 快速开始

在Claude Desktop中的使用

使用 Docker(推荐)

  1. 编辑配置文件 config.json
    • 在 macOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
    • 在 Windows 上:%APPDATA%\Claude\claude_desktop_config.json
  2. 将以下配置添加到 mcpServers 对象中:
{
"mcpServers": {
"kuzu": {
"command": "docker",
"args": [
"run",
"-v",
"{Absolute Path to the Kuzu database}:/database",
"--rm",
"-i",
"kuzudb/mcp-server"
]
}
}
}

请将 {Absolute Path to the Kuzu database} 替换为实际路径。 3. 重启 Claude Desktop。

使用 Node.js 和 npm(用于开发)

  1. 安装依赖:npm install
  2. 编辑配置文件 config.json
    • 在 macOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
    • 在 Windows 上:%APPDATA%\Claude\claude_desktop_config.json
  3. 将以下配置添加到 mcpServers 对象中:
{
"mcpServers": {
"kuzu": {
"command": "node",
"args": [
"{Absolute Path to this repository}/index.js",
"{Absolute Path to the Kuzu database}"
]
}
}
}

请将 {Absolute Path to this repository}{Absolute Path to the Kuzu database} 替换为实际路径。 4. 重启 Claude Desktop。

只读模式

通过设置 KUZU_READ_ONLY 环境变量为 true,服务器可以以只读模式运行。在此模式下,运行任何尝试修改数据库的查询将导致错误。此标志可以在配置文件中如下设置:

{
"mcpServers": {
"kuzu": {
"command": "docker",
"args": [
"run",
"-v",
"{Absolute Path to the Kuzu database}:/database",
"-e",
"KUZU_READ_ONLY=true",
"--rm",
"-i",
"kuzudb/mcp-server"
]
}
}
}

✨ 主要特性

工具

  • getSchema
    • 功能:获取 Kuzu 数据库的完整架构,包括所有节点和关系表及其属性。
    • 输入:无
  • query
    • 功能:在 Kuzu 数据库上运行 Cypher 查询。
    • 输入:cypher(字符串),即要运行的 Cypher 查询。

提示

  • generateKuzuCypher
    • 功能:根据自然语言问题生成 Kuzu 的 Cypher 查询。
    • 参数:question(字符串),即要生成 Cypher 查询的自然语言问题。
  • 0 关注
  • 0 收藏,16 浏览
  • system 提出于 2025-09-24 09:36

相似服务问题

相关AI产品