Logo van KuzuDB

KuzuDB

Community
jordanburke

A Model Context Protocol server that provides access to Kuzu databases

Uitgeverjordanburke
Repositorykuzudb-mcp-server
TaalHTML
Forks
5
Sterren
8
Beschikbare tools
0
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    KuzuDB biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    8 sterren en 5 forks in de gekoppelde repository.

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

Installatie

TypingMind
Vereisten:

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"
      }
    }
  }
}

Gebruik KuzuDB MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra KuzuDB is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg KuzuDB toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van KuzuDB.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "kuzudb": {
      "command": "npx",
      "args": [
        "-y",
        "kuzudb-mcp-server"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van KuzuDB in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van KuzuDB in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je KuzuDB gebruiken om me hiermee te helpen?
KuzuDB
Zeker. Ik heb het gelezen.
Dit vond ik met KuzuDB.

Veelgestelde vragen

Waarvoor wordt de MCP-server KuzuDB gebruikt?

KuzuDB is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik KuzuDB MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je KuzuDB gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom KuzuDB MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als KuzuDB verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik KuzuDB MCP met TypingMind?

KuzuDB werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt KuzuDB MCP in TypingMind?

KuzuDB biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om KuzuDB MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als KuzuDB authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇