
KuzuDB
STDIOMCP server providing access to Kuzu graph databases for LLM interactions.
MCP server providing access to Kuzu graph databases for LLM interactions.
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.
# 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
# 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
# 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
The server includes a powerful web interface that automatically starts with HTTP transport.
.kuzu
backups and restore from browser# Start with Web UI (auto-enabled with HTTP) pnpm serve:test:http # Access Web UI open http://localhost:3001/admin
# 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
/admin
- Main web interface/health
- Health check endpoint/api/info
- Database information (JSON)/api/backup
- Download database backup/api/restore
- Upload and restore databaseThe server supports two authentication methods for different use cases:
Best for production deployments with token-based security:
# 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=[email protected] \ node dist/index.js /path/to/database --transport http
Simpler setup for development and testing:
# 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=[email protected] \ node dist/index.js /path/to/database --transport http
Secure the Web UI interface:
# 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
{ "mcpServers": { "kuzu": { "command": "docker", "args": [ "run", "-v", "/path/to/database:/database", "--rm", "-i", "ghcr.io/jordanburke/kuzudb-mcp-server:latest" ] } } }
{ "mcpServers": { "kuzu": { "command": "npx", "args": ["kuzudb-mcp-server", "/path/to/database"] } } }
# Install via Smithery - includes sample database smithery install kuzudb-mcp-server
{ "mcpServers": { "kuzu": { "command": "npx", "args": ["kuzudb-mcp-server"], "env": { "KUZU_MCP_DATABASE_PATH": "/path/to/database", "KUZU_READ_ONLY": "true" } } } }
# 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
# 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
# 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
{ "mcpServers": { "kuzu-remote": { "uri": "http://localhost:3000/mcp", "transport": "http" } } }
Enable safe concurrent access from multiple AI agents (e.g., Claude Desktop + Claude Code):
{ "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" } } } }
# 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
{ "mcpServers": { "kuzu": { "command": "node", "args": [ "/path/to/kuzudb-mcp-server/dist/index.js", "/path/to/database" ] } } }
Variable | Description | Default | Usage |
---|---|---|---|
Database | |||
KUZU_MCP_DATABASE_PATH | Database path if not in args | - | Startup |
KUZU_READ_ONLY | Enable read-only mode | false | Security |
Connection | |||
KUZU_MAX_RETRIES | Connection recovery attempts | 2 | Reliability |
Multi-Agent | |||
KUZU_MULTI_AGENT | Enable coordination | false | Concurrency |
KUZU_AGENT_ID | Unique agent identifier | unknown-{pid} | Locking |
KUZU_LOCK_TIMEOUT | Lock timeout (ms) | 10000 | Performance |
Web UI | |||
KUZU_WEB_UI_ENABLED | Enable/disable Web UI | true | Interface |
KUZU_WEB_UI_PORT | Web UI port | 3001 | Network |
KUZU_WEB_UI_AUTH_USER | Web UI username | - | Security |
KUZU_WEB_UI_AUTH_PASSWORD | Web UI password | - | Security |
Authentication | |||
KUZU_OAUTH_ENABLED | Enable OAuth | false | Security |
KUZU_OAUTH_USERNAME | OAuth username | - | Auth |
KUZU_OAUTH_PASSWORD | OAuth password | - | Auth |
KUZU_BASIC_AUTH_USERNAME | Basic Auth username | - | Auth |
KUZU_BASIC_AUTH_PASSWORD | Basic Auth password | - | Auth |
KUZU_WEB_UI_AUTH_*
variablesKUZU_WEB_UI_PORT
or PORT
Based on testing:
Repository: github.com/jordanburke/kuzudb-mcp-server
Docker Images: ghcr.io/jordanburke/kuzudb-mcp-server
Package: npmjs.com/package/kuzudb-mcp-server