Skip to content
FossShelf
Home / Categories / For AI Engineers

Chat2DB

AI text-to-SQL client for 40+ databases; local-first, self-hosted

Replaces Datagrip, Tableplus, Navicat, Dbvisualizer

28.36K starsApache-2.0 with additional commercial restrictions (LicenseRef-Chat2DB)reviewed 15 Oct 2026last commit 11 Nov 2026
Screenshot of Chat2DB

Who it's for

Developers and DBAs working across multiple database engines

Chat2DB replaces the need to maintain separate database clients for different engines. Connect MySQL, PostgreSQL, ClickHouse, MongoDB, and other databases from one interface and use the AI assistant to write correct queries in unfamiliar SQL dialects.

If you work with a single database type and have an established workflow with a dedicated client like psql or mysql-cli, adding Chat2DB introduces a heavier GUI without clear gains.

Teams with data residency or compliance requirements

The local-first processing model means schema data and query results stay within your network. Pointing the AI assistant at a locally hosted model runs the entire text-to-SQL stack without any external network calls. Suitable for environments where database schema cannot leave the premises.

Not a fit for multi-user team environments that need access controls enforced at the client layer. The Community edition has no user-level permissions; that requires the commercial Enterprise tier.

Data analysts without deep SQL expertise

The text-to-SQL feature converts plain English questions into executable queries, making database access practical for analysts who understand the data model but not SQL syntax. The BI dashboard turns query results into charts without requiring a separate visualization tool.

Skip if your analysts need to share live dashboards with non-technical stakeholders or require scheduled reports. Community edition dashboards are local and not externally shareable without the commercial tier.

Engineering teams building LLM agent pipelines with database access

The open-source CLI includes MCP support, letting AI agent frameworks with MCP client capabilities invoke Chat2DB database tools as part of structured agentic workflows. The local-first design avoids routing live database schemas through cloud intermediaries.

If your agent infrastructure runs entirely on managed cloud services, the local-first Docker deployment model may add operational complexity. Evaluate whether the Docker path fits your pipeline architecture before building.

The problem

Database client tooling for professional use is dominated by paid software. DataGrip charges per-user subscription fees; Navicat and TablePlus require one-time or perpetual licenses; DbVisualizer limits free-tier features. Teams connecting to multiple database engines typically pay for several tools or settle for clients that handle only one engine well. The harder problem is AI query assistance: commercial clients that offer AI-generated SQL send your database schema to their own hosted services. For teams with sensitive data or compliance requirements, this means either accepting cloud exposure or going without AI help. Getting an AI SQL generator that uses your own LLM of choice, keeps the schema local, and works across dozens of database engines is not solved by any major paid client today.

How it works

40+ database connections

Connects to MySQL, PostgreSQL, Oracle, SQL Server, ClickHouse, MongoDB, Redis, SQLite, MariaDB, TiDB, Hive, DB2, Snowflake, BigQuery, Elasticsearch, and more. New JDBC databases can be added through configuration without code changes, so the list extends as needed without a client update.

Bring-your-own-model AI text-to-SQL

Type a question in natural language and your configured AI model generates the SQL query. The AI layer also explains and optimizes existing queries. You supply your own model, so your API key and model choice stay under your control and nothing is routed through Chat2DB's servers.

Full SQL workspace

Includes syntax completion, query formatting, execution with result display, saved SQL snippets, and execution history. Multiple tabs handle parallel queries across different connections. The editor targets professional SQL workflows, not just a basic query console.

Visual data management with ER diagrams

Browse table metadata, edit data in place, and manage DDL and DML operations through a GUI without writing SQL. ER diagrams are generated from any connected database, giving a visual overview of schema relationships useful for onboarding and documentation.

Data import, export, and migration

Import and export CSV, XLSX, XLS, and SQL files; the export path handles millions of rows. Schema synchronization and data migration move structures and data between different database instances, covering cross-engine migrations with the same tool used for daily queries.

MCP-enabled CLI

The open-source Chat2DB CLI includes Model Context Protocol support, letting AI agents with MCP client capabilities call Chat2DB database tools as part of agentic workflows. Useful for teams building LLM-powered data pipelines where the agent needs to query production databases through a structured tool interface.

Features

  • 40+ database connections
  • Bring-your-own-model AI text-to-SQL
  • Full SQL workspace
  • Visual data management with ER diagrams
  • Data import, export, and migration
  • MCP-enabled CLI

How to install

Self-hosting with Docker requires generating an encryption key first, then starting the container with Docker Compose.

git clone https://github.com/OtterMind/Chat2DB.git && cd Chat2DB
./script/security/init-community-encryption-key.sh
docker compose --file docker/docker-compose.yml up --detach

Recommended for this setup

Strengths

  • Local-first data privacy: Database query processing and result data stay on your machine. The AI integration sends only schema metadata (table and column names) to your configured AI model to generate SQL; actual query results never leave your local environment. For teams with compliance requirements around data residency, this is a concrete difference from cloud-hosted database tools.
  • 28,000+ stars with active development: With 28,315 GitHub stars and 3,054 forks, Chat2DB is among the most widely adopted open source database clients. The repo received its most recent push on October 14, 2026, indicating ongoing active maintenance. The contributor community and issue tracker provide a channel for reporting bugs and requesting new database support.
  • Cross-platform desktop and Docker: Available as a native desktop installer for Windows, macOS, and Linux with no prerequisites beyond the installer. The Docker path serves headless or server deployments with persistent data stored in a local volume. Both modes share the same feature set.
  • No cloud account or vendor dependency: The Community edition requires no account, no phone-home registration, and no dependency on Chat2DB's own servers for core database operations. The bring-your-own-model design means you are not locked into a specific AI provider and can switch models without changing the client.

Trade-offs

  • Source-available license restricts SaaS and resale: The Community edition (v5.3.0 and later) uses a source-available license based on Apache 2.0 with additional restrictions. Internal self-hosting is permitted, including commercial internal use. Offering Chat2DB as a managed service, embedding it in a product for external users, or distributing object-form binaries to independent parties requires written authorization. Teams building on Chat2DB for external deployment should review the license before building.
  • Community edition is single-user only: The Community edition has no user accounts, role-based access controls, or authorization boundaries between users. The README explicitly states the HTTP service should stay bound to localhost and not be exposed to other network users. Multi-user access, team governance, audit logs, and cloud sync require the commercial Pro or Enterprise tier.
  • Docker setup requires an encryption key init step: The Docker deployment path is not a single docker run command. You first clone the repository to run the bundled init script, generate a per-installation AES-256-GCM key, then start the container with the key file mounted. Losing or replacing this key makes previously stored datasource passwords and AI model API keys unreadable. Desktop mode creates a missing key automatically; headless Docker does not.

Tech stack

Languages
Java, TypeScript, ANTLR, TSQL, Shell, PLSQL, JavaScript, Python, Inno Setup, Less, Ruby, PowerShell, HTML, Dockerfile
Frameworks
React
Databases
Redis, ClickHouse, MongoDB, MySQL, PostgreSQL, SQLite
Tooling
—

FAQ

Is Chat2DB free to use?

The Community edition is free to download and self-host. The license (source-available, based on Apache 2.0 with additional conditions) permits internal use for your organization at no cost, including commercial internal operations. Offering it as a managed service to external parties or embedding it in a product for third parties requires written authorization. Commercial Pro and Enterprise tiers add hosted AI, multi-device sync, and team collaboration at a paid price.

Which databases does Chat2DB support?

Chat2DB connects to 40+ databases including MySQL, PostgreSQL, Oracle, SQL Server, ClickHouse, MongoDB, Redis, SQLite, MariaDB, TiDB, Hive, DB2, Snowflake, BigQuery, and Elasticsearch. New JDBC databases can be added through configuration without code changes, so the supported list extends beyond what ships in the default build.

Does Chat2DB send my database data to the cloud?

Database query processing and results stay local. The AI integration sends only schema metadata (table and column names) to your configured AI model to generate SQL; actual data from your tables is never transmitted. If you configure a locally hosted AI model, the entire workflow runs air-gapped with no external network calls.

Is Chat2DB a replacement for DataGrip or Navicat?

For developers and small teams wanting a self-hosted, multi-database client with AI query generation, Chat2DB covers the core use case of DataGrip and Navicat at no license cost. It lacks DataGrip's deep JetBrains IDE integration and Navicat's long-established enterprise feature set. The Community edition also lacks multi-user access controls, which both DataGrip and Navicat support through team licensing.

Can Chat2DB run offline or in an air-gapped environment?

Yes. The desktop and Docker community editions run fully offline for core database operations; they have no dependency on Chat2DB's servers. For the AI text-to-SQL feature to function without internet access, configure a locally hosted AI model as the backend. The desktop installer is available directly from GitHub Releases with no online activation step.

Similar tools

More in AI Engineers