KuzuDBのロゴ

KuzuDB

コミュニティ
jordanburke

A Model Context Protocol server that provides access to Kuzu databases

公開者jordanburke
リポジトリkuzudb-mcp-server
言語HTML
フォーク
5
スター
8
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    KuzuDBは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには8件のスターと5件のフォークがあります。

kuzudb-mcp-server

⚠️ ARCHIVED: This project is archived as the Kuzu database repository was archived on October 10, 2025. See ARCHIVE_NOTICE.md for details and alternatives.


A Model Context Protocol server that provides access to Kuzu graph databases. This server enables LLMs to inspect database schemas and execute queries with robust connection recovery, multi-agent coordination, and a built-in web interface.

Archive Status

Archived - October 21, 2025

The Kuzu graph database repository was archived by its maintainers on October 10, 2025 and is now read-only. As Kuzu is no longer actively maintained, this MCP server is also being archived. The project remains fully functional with Kuzu v1.4.1-r.4. See ARCHIVE_NOTICE.md for full details, technical achievements, and alternative graph database options.

🚀 Key Features

  • 📊 Web UI: Built-in database management interface with backup/restore capabilities
  • 🔐 Authentication: OAuth and Basic Auth support for secure access
  • 🤝 Multi-Agent: Safe concurrent access from multiple AI agents (experimental)
  • 🔄 Auto-Recovery: Automatic connection recovery with exponential backoff
  • 🐳 Docker Ready: Pre-built images and docker-compose workflow
  • 📱 Dual Transport: Both stdio and HTTP transport modes
  • 🧠 AI-Powered: Natural language to Cypher query generation

Quick Start

Install and Test

bash
# Install globally
npm install -g kuzudb-mcp-server

# Quick test with auto-created database
pnpm serve:test              # stdio transport (default)
pnpm serve:test:http         # HTTP transport with Web UI
pnpm serve:test:inspect      # HTTP with MCP Inspector

# Server management
pnpm kill    # Stop running servers
pnpm restart # Restart with HTTP transport

Development Setup

bash
# Clone and setup
git clone https://github.com/jordanburke/kuzudb-mcp-server.git
cd kuzudb-mcp-server
pnpm install

# Initialize databases
pnpm db:init                 # Empty test database
pnpm db:init:movies          # Sample movie data

One-Line Docker Setup

bash
# Pull and run with mounted database
docker run -d -p 3000:3000 -p 3001:3001 \
  -v /path/to/your/database:/database \
  ghcr.io/jordanburke/kuzudb-mcp-server:latest

# Access Web UI at http://localhost:3001/admin
# MCP endpoint at http://localhost:3000/mcp

Components

Tools

  • getSchema - Fetch complete database schema (nodes, relationships, properties)
  • query - Execute Cypher queries with automatic error recovery

Prompts

  • generateKuzuCypher - Convert natural language to Kuzu-specific Cypher queries

🖥️ Web UI for Database Management

The server includes a powerful web interface that automatically starts with HTTP transport.

Features

  • 📁 Database Backup & Restore: Download .kuzu backups and restore from browser
  • 📤 Direct File Upload: Upload existing Kuzu database files (main + .wal)
  • 📊 Database Info: View path, mode, connection status, and schema statistics
  • 🔒 Secure Access: Optional authentication protection
  • 👁️ Read-Only Support: Upload/restore disabled in read-only mode

Quick Access

bash
# Start with Web UI (auto-enabled with HTTP)
pnpm serve:test:http

# Access Web UI
open http://localhost:3001/admin

Docker with Web UI

bash
# Using docker-compose (recommended)
docker-compose up -d
open http://localhost:3001/admin

# Manual Docker with Web UI
docker run -d \
  -p 3000:3000 -p 3001:3001 \
  -v /path/to/database:/database \
  -e KUZU_WEB_UI_AUTH_USER=admin \
  -e KUZU_WEB_UI_AUTH_PASSWORD=changeme \
  ghcr.io/jordanburke/kuzudb-mcp-server:latest

API Endpoints

  • /admin - Main web interface
  • /health - Health check endpoint
  • /api/info - Database information (JSON)
  • /api/backup - Download database backup
  • /api/restore - Upload and restore database

🔐 Authentication & Security

The server supports two authentication methods for different use cases:

OAuth (Production Recommended)

Best for production deployments with token-based security:

bash
# Testing OAuth locally
pnpm serve:test:http:oauth     # admin/secret123
pnpm serve:test:inspect:oauth  # With MCP Inspector

# Production OAuth setup
KUZU_OAUTH_ENABLED=true \
KUZU_OAUTH_USERNAME=admin \
KUZU_OAUTH_PASSWORD=your-secure-password \
KUZU_OAUTH_USER_ID=admin-user \
KUZU_OAUTH_EMAIL=admin@example.com \
KUZU_JWT_EXPIRES_IN=31536000 \
node dist/index.js /path/to/database --transport http

Basic Auth (Development/Testing)

Simpler setup for development and testing:

bash
# Testing Basic Auth locally  
pnpm serve:test:http:basic     # admin/secret123
pnpm serve:test:inspect:basic  # With MCP Inspector

# Production Basic Auth setup
KUZU_BASIC_AUTH_USERNAME=admin \
KUZU_BASIC_AUTH_PASSWORD=your-secure-password \
KUZU_BASIC_AUTH_USER_ID=admin-user \
KUZU_BASIC_AUTH_EMAIL=admin@example.com \
node dist/index.js /path/to/database --transport http

Web UI Authentication

Secure the Web UI interface:

bash
# Add Web UI authentication
KUZU_WEB_UI_AUTH_USER=admin \
KUZU_WEB_UI_AUTH_PASSWORD=changeme \
node dist/index.js /path/to/database --transport http

JWT Token Configuration

Configure JWT token lifetime (OAuth mode only):

bash
# Set token expiration in seconds (default: 31536000 = 1 year)
KUZU_JWT_EXPIRES_IN=3600    # 1 hour
KUZU_JWT_EXPIRES_IN=86400   # 24 hours
KUZU_JWT_EXPIRES_IN=2592000 # 30 days

Security Recommendations

  • Always use authentication for production deployments
  • Use OAuth for external-facing servers
  • Use Basic Auth for internal development/testing
  • Enable Web UI auth when exposing the interface
  • Use HTTPS in production environments
  • Configure JWT expiration based on your security requirements

Usage with Claude Desktop

Docker (Recommended)

json
{
  "mcpServers": {
    "kuzu": {
      "command": "docker",
      "args": [
        "run", "-v", "/path/to/database:/database",
        "--rm", "-i", "ghcr.io/jordanburke/kuzudb-mcp-server:latest"
      ]
    }
  }
}

npm/npx

json
{
  "mcpServers": {
    "kuzu": {
      "command": "npx",
      "args": ["kuzudb-mcp-server", "/path/to/database"]
    }
  }
}

Smithery (Easiest)

bash
# Install via Smithery - includes sample database
smithery install kuzudb-mcp-server

Environment Variables

json
{
  "mcpServers": {
    "kuzu": {
      "command": "npx",
      "args": ["kuzudb-mcp-server"],
      "env": {
        "KUZU_MCP_DATABASE_PATH": "/path/to/database",
        "KUZU_READ_ONLY": "true"
      }
    }
  }
}

🌐 Remote Connection (HTTP Transport)

Pre-built Docker Images

bash
# Pull latest image
docker pull ghcr.io/jordanburke/kuzudb-mcp-server:latest

# Run with custom configuration
docker run -d \
  -p 3000:3000 -p 3001:3001 \
  -v /path/to/database:/database \
  -e KUZU_READ_ONLY=false \
  ghcr.io/jordanburke/kuzudb-mcp-server:latest

Local Development

bash
# HTTP server mode
node dist/index.js /path/to/database --transport http --port 3000

# With custom endpoint
node dist/index.js /path/to/database --transport http --port 8080 --endpoint /kuzu

MCP Inspector Testing

bash
# Auto-start inspector
pnpm serve:test:inspect

# Manual setup
node dist/index.js /path/to/database --transport http
npx @modelcontextprotocol/inspector http://localhost:3000/mcp

Remote Client Configuration

json
{
  "mcpServers": {
    "kuzu-remote": {
      "uri": "http://localhost:3000/mcp",
      "transport": "http"
    }
  }
}

🤝 Multi-Agent Coordination (Experimental)

Enable safe concurrent access from multiple AI agents (e.g., Claude Desktop + Claude Code):

Configuration

json
{
  "mcpServers": {
    "kuzu": {
      "command": "npx",
      "args": ["kuzudb-mcp-server", "/path/to/database"],
      "env": {
        "KUZU_MULTI_AGENT": "true",
        "KUZU_AGENT_ID": "claude-desktop",
        "KUZU_LOCK_TIMEOUT": "10000"
      }
    }
  }
}

How It Works

  • Read queries: Execute immediately without coordination
  • Write queries: Acquire exclusive file-based locks
  • Auto cleanup: Stale locks detected and removed
  • Clear errors: Lock conflicts return helpful retry messages

Important Notes

  • Experimental feature for local development
  • Both agents must use the same database path
  • Lock files created in database directory
  • 10-second default timeout covers most operations

🛠️ Development

Build and Test

bash
# Install dependencies
pnpm install

# Build project
pnpm build

# Development with watch
pnpm dev

# Run tests
pnpm test
pnpm test:ui
pnpm test:coverage

# Linting and formatting
pnpm lint
pnpm typecheck
pnpm format:check

Local Claude Desktop Setup

json
{
  "mcpServers": {
    "kuzu": {
      "command": "node",
      "args": [
        "/path/to/kuzudb-mcp-server/dist/index.js",
        "/path/to/database"
      ]
    }
  }
}

🔧 Environment Variables Reference

VariableDescriptionDefaultUsage
Database
KUZU_MCP_DATABASE_PATHDatabase path if not in args-Startup
KUZU_READ_ONLYEnable read-only modefalseSecurity
Connection
KUZU_MAX_RETRIESConnection recovery attempts2Reliability
Multi-Agent
KUZU_MULTI_AGENTEnable coordinationfalseConcurrency
KUZU_AGENT_IDUnique agent identifierunknown-{pid}Locking
KUZU_LOCK_TIMEOUTLock timeout (ms)10000Performance
Web UI
KUZU_WEB_UI_ENABLEDEnable/disable Web UItrueInterface
KUZU_WEB_UI_PORTWeb UI port3001Network
KUZU_WEB_UI_AUTH_USERWeb UI username-Security
KUZU_WEB_UI_AUTH_PASSWORDWeb UI password-Security
Authentication
KUZU_OAUTH_ENABLEDEnable OAuthfalseSecurity
KUZU_OAUTH_USERNAMEOAuth username-Auth
KUZU_OAUTH_PASSWORDOAuth password-Auth
KUZU_BASIC_AUTH_USERNAMEBasic Auth username-Auth
KUZU_BASIC_AUTH_PASSWORDBasic Auth password-Auth

🔍 Troubleshooting

Connection Issues

  • "Database connection could not be restored" → Check database file exists and permissions
  • "getAll timeout" → DDL operation hung, server will auto-recover
  • Lock timeout → Another agent writing, wait and retry

Web UI Issues

  • 404 on /admin → Ensure HTTP transport mode is enabled
  • Authentication failing → Check KUZU_WEB_UI_AUTH_* variables
  • Port conflicts → Change KUZU_WEB_UI_PORT or PORT

Docker Issues

  • Health check failing → Verify database mount and port availability
  • Permission errors → Check volume mount permissions
  • Database not found → Ensure correct path mapping

Performance Notes

Based on testing:

  • Simple queries: < 100ms response time
  • Complex multi-hop: 200-500ms response time
  • Schema retrieval: ~100-200ms response time
  • AI query generation: 1-3 seconds (normal for LLM processing)

📚 Documentation

Core Features

Bug Workarounds


Repository: github.com/jordanburke/kuzudb-mcp-server
Docker Images: ghcr.io/jordanburke/kuzudb-mcp-server
Package: npmjs.com/package/kuzudb-mcp-server

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "kuzu": {
      "command": "npx",
      "args": [
        "-y",
        "kuzudb-mcp-server"
      ],
      "env": {
        "KUZU_MCP_DATABASE_PATH": "/path/to/database",
        "KUZU_READ_ONLY": "true",
        "KUZU_MULTI_AGENT": "true",
        "KUZU_AGENT_ID": "claude-desktop",
        "KUZU_LOCK_TIMEOUT": "10000"
      }
    }
  }
}

KuzuDBのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度KuzuDBに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

KuzuDBをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. KuzuDBのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "kuzudb": {
      "command": "npx",
      "args": [
        "-y",
        "kuzudb-mcp-server"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてKuzuDBのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. KuzuDBのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
KuzuDBを使ってこのタスクを手伝ってもらえますか?
KuzuDB
はい、読みました。
KuzuDBで調べた結果をお伝えします。

よくある質問

KuzuDB MCPサーバーは何に使いますか?

KuzuDBは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでKuzuDB MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでKuzuDBを利用できます。

TypingMindでKuzuDB MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。KuzuDBを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

KuzuDB MCPをTypingMindに接続するにはどうすればよいですか?

KuzuDBはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでKuzuDB MCPのどのようなツールを利用できますか?

KuzuDBはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

KuzuDB MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。KuzuDBで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇