Skip to Content
DBVision

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 /data volume, managed with Drizzle ORM and migrated automatically at startup.
  • Target database drivers: Native drivers (pg, mysql2, mssql, and better-sqlite3) behind a read-only DatabaseDriver port.
  • Auth and MCP: Better Auth with @better-auth/mcp and the official @modelcontextprotocol/server SDK at POST /mcp.
  • Built-in AI: Vercel AI SDK supporting OpenAI, Anthropic, Mistral, and OpenAI-compatible endpoints, plus ECharts for validated chart rendering.

Supported engines

EngineDriverNotes
PostgreSQLpgDedicated read-only role recommended
MySQLmysql2Refuses accounts with global write privileges or write privileges on system schemas
SQL ServermssqlRefuses write-capable logins; cursor reads for SELECT queries
SQLitebetter-sqlite3Requires DBVISION_SQLITE_DIR to be set

Next steps

On this page