Prerequisites
Before starting, ensure you have:- Node.js 18+ installed (for NPM method) OR Docker installed
- Access to an AI tool (Claude Desktop, Claude Code, Cursor, or VS Code)
- Optionally: A PostgreSQL, MySQL, or other supported database
Choose Your Transport
DBHub supports two transport protocols:| Transport | How It Works | Best For |
|---|---|---|
| stdio | AI tool spawns DBHub as a subprocess | Local desktop apps, single-user setups |
| http | DBHub runs as a standalone HTTP server | Web clients, shared servers, remote access |
Step 1: Start DBHub in Demo Mode
If using stdio transport, skip this step - your AI tool will spawn DBHub as a subprocess automatically.
- NPM
- Docker
http://localhost:8080. The workbench is available at the root (/), and the MCP endpoint is at /mcp.
Step 2: Connect with Your AI Tool
Choose your AI tool and follow the setup instructions in the Client Integration section:Claude Code
Anthropic’s CLI for agentic coding
Claude Desktop
Anthropic’s desktop app
Codex
OpenAI’s CLI for agentic coding
Cursor
AI-powered code editor
Dify
Open-source AI app platform
LibreChat
Open-source chat UI
VS Code
GitHub Copilot integration
Step 3: Try It Out
Try these example prompts in your AI tool:List available schemas
List available schemas
db://schemas resource to list all schemas.Show tables in a schema
Show tables in a schema
db://schemas/public/tables resource.Query employee data
Query employee data
Change data
Change data
This only works when the
execute_sql tool is not configured with readonly = true. See Read-Only Mode.Step 4: Connect to Your Own Database
Once you’ve verified DBHub works in demo mode, connect it to your actual database.DSN Configuration
Complete connection string formats and options for PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite.