Overview
Self-hosted database explorer for PostgreSQL, MySQL, SQL Server, and SQLite with an MCP server and built-in AI features.
DBVision is an Apache-2.0 self-hosted tool to explore any database from your browser: schema, data, and SQL. It exposes an MCP server with OAuth 2.1 for external AI clients such as Claude Code and Codex, and offers built-in AI features (chat with your data, natural language to SQL, and generated charts) using your own LLM key.
Architecture at a glance
DBVision runs as a single Node.js process inside one container:
- API and SPA: A Hono API serving a React single-page application built with Vite.
- Metadata store: Local SQLite database on the
/datavolume, managed with Drizzle ORM and migrated automatically at startup. - Target database drivers: Native drivers (
pg,mysql2,mssql, andbetter-sqlite3) behind a read-onlyDatabaseDriverport. - Auth and MCP: Better Auth with
@better-auth/mcpand the official@modelcontextprotocol/serverSDK atPOST /mcp. - Built-in AI: Vercel AI SDK supporting OpenAI, Anthropic, Mistral, and OpenAI-compatible endpoints, plus ECharts for validated chart rendering.
Supported engines
| Engine | Driver | Notes |
|---|---|---|
| PostgreSQL | pg | Dedicated read-only role recommended |
| MySQL | mysql2 | Refuses accounts with global write privileges or write privileges on system schemas |
| SQL Server | mssql | Refuses write-capable logins; cursor reads for SELECT queries |
| SQLite | better-sqlite3 | Requires DBVISION_SQLITE_DIR to be set |
Next steps
- Install with Docker to start a container and configure environment variables.
- First run to create your account and add your first database connection.
- MCP Server & Clients to connect Claude Code or Codex over OAuth 2.1.