Configs2026年7月22日·1 分钟阅读

SQL Chat — Chat-Based SQL Client Powered by AI

A chat-based SQL client that converts natural language to SQL queries. Supports MySQL, PostgreSQL, SQL Server, TiDB, and more with a modern conversational interface.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 29/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
CLI Tool
安装
Single
信任
信任等级:Established
入口
SQL Chat
安全暂存命令
npx -y tokrepo@latest install e13ecd64-85a9-11f1-9bc6-00163e2b0d79 --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

Introduction

SQL Chat is an open-source, chat-based SQL client that lets you query databases using natural language. Instead of writing raw SQL, you describe what you want in plain English and the AI generates and executes the query against your connected database.

What SQL Chat Does

  • Converts natural language questions to SQL queries
  • Connects to MySQL, PostgreSQL, SQL Server, TiDB, and more
  • Provides an interactive chat interface for iterative data exploration
  • Shows query results in formatted tables alongside the generated SQL
  • Maintains conversation context for follow-up questions

Architecture Overview

SQL Chat is a Next.js application with a chat-style frontend. The backend connects to your database via standard drivers and uses OpenAI-compatible APIs for natural language to SQL translation. Database credentials stay local to your deployment and are never sent to external services beyond the LLM provider.

Self-Hosting & Configuration

  • Deploy with Docker: docker run -p 3000:3000 sqlchat/sqlchat
  • Or clone the repo and run with pnpm dev
  • Set your OpenAI API key in environment variables
  • Add database connections through the web UI
  • Supports environment-based config for team deployments

Key Features

  • Natural language to SQL with contextual follow-up queries
  • Multi-database support including MySQL, PostgreSQL, TiDB, and more
  • Self-hostable with Docker for data privacy
  • Schema-aware query generation using database metadata
  • Conversation history for iterative data exploration

Comparison with Similar Tools

  • Vanna — Python-based text-to-SQL; SQL Chat offers a ready-to-use web UI
  • Chat2DB — Java-based database client; SQL Chat is lighter with a chat-first design
  • DBeaver — Traditional GUI client; SQL Chat focuses on natural language interaction
  • WrenAI — Semantic layer approach; SQL Chat connects directly to databases

FAQ

Q: Which LLM providers are supported? A: OpenAI by default, with support for any OpenAI-compatible API endpoint.

Q: Is my data sent to external servers? A: Only the schema metadata and your query text go to the LLM. Actual data stays between your deployment and the database.

Q: Can I use it with local LLMs? A: Yes, point the API endpoint to a local OpenAI-compatible server like Ollama or LiteLLM.

Q: What databases are supported? A: MySQL, PostgreSQL, SQL Server, TiDB, CockroachDB, ClickHouse, Snowflake, MongoDB, Redis, Oracle, and SQLite.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产