# DeepSQL

> A self-hosted database agent for Postgres and MySQL that answers BI questions, fixes slow queries, and monitors your schema 24/7.

DeepSQL is a self-hosted database agent designed for Postgres and MySQL that acts as a 24/7 DBA and data engineer. It installs in a single command on any Linux box, EC2 instance, or container inside your VPC, and connects to your databases using read-only credentials so no data leaves your infrastructure. The tool is built for senior DBAs and data engineers who want autonomous database intelligence without giving up control over their environment.

## What It Is

DeepSQL is an AI-powered database agent that combines business intelligence querying, slow query analysis, and schema monitoring into a single self-hosted package. It indexes your database schema, learns your workload from slow query logs, and lets you ask questions in plain English — either through a built-in web UI, a CLI, or a Slack channel. It also exposes an MCP server so external AI tools like Claude, Codex, and Cursor can connect to your DeepSQL instance and query your database context directly.

## How the Setup Path Works

DeepSQL is designed to go from zero to a working agent in about 15 minutes:

- **Install**: One command deploys the DeepSQL agent, CLI, and MCP server on your machine inside your VPC.
- **Connect**: Add Postgres or MySQL connections (read replica recommended, read-only credentials, VPC-peered).
- **Teach**: Feed it company knowledge in plain English — business rules like MRR definitions, active-user thresholds, and currency conventions.
- **Ingest logs**: Point it at `pg_stat_statements` or the MySQL slow log; DeepSQL clusters and ranks query fingerprints automatically.
- **Chat**: Use the built-in browser agent, CLI, or connect Claude/Codex/Cursor over MCP.

## Core Capabilities

DeepSQL covers three main use cases surfaced directly in its interface:

- **BI questions**: Ask natural-language questions like "how many bookings last week?" and get SQL-backed answers grounded in your schema and business rules.
- **DBA recommendations**: Get index recommendations, slow query analysis, and ranked performance suggestions from ingested query logs.
- **Schema guardian**: Monitor recent schema changes and receive alerts when something unexpected shifts in your database structure.

## Deployment Model and Security

DeepSQL is explicitly self-hosted — the homepage states "your data, your credentials, your VPC." It ships with role-based access control, query policies, and audit logs built in. Database connections use read-only credentials over SSL, and the agent runs entirely within the customer's own infrastructure. This positions it for teams with strict data residency or compliance requirements who cannot send query data to a third-party cloud service.

## MCP Integration and AI Tool Compatibility

DeepSQL ships with a built-in MCP (Model Context Protocol) server, making it compatible with Claude, Codex, and Cursor out of the box. This means developers can use their preferred AI coding assistant and have it query live database context — schema, slow queries, business rules — through the DeepSQL layer rather than exposing raw database credentials to external tools.

## Update: v0.26.0

The CLI output shown on the homepage displays `v0.26.0 · latest`, indicating active development with versioned releases. The blog is described as covering topics like cutting Aurora costs, replacing Tableau, and observability billing — suggesting the product is targeting cost-conscious engineering teams running production workloads on AWS RDS and similar managed database services.

## Features
- Natural language BI question answering
- Slow query analysis and index recommendations
- Schema change monitoring (Guardian)
- Self-hosted deployment in your VPC
- MCP server for Claude, Codex, and Cursor integration
- Slack integration for asking questions in a channel
- Built-in web UI agent
- CLI interface
- Role-based access control
- Query policies and audit logs
- pg_stat_statements and MySQL slow log ingestion
- Company knowledge base in plain English
- Read-only database credentials support
- SSL database connections
- Query fingerprint clustering and ranking

## Integrations
PostgreSQL, MySQL, Claude, Codex, Cursor, Slack, AWS RDS, pg_stat_statements, MCP (Model Context Protocol)

## Platforms
LINUX, WEB, API, CLI

## Pricing
Freemium — Free tier available with paid upgrades

## Version
0.26.0

## Links
- Website: https://deepsql.ai
- Documentation: https://docs.deepsql.ai/quickstart/
- EveryDev.ai: https://www.everydev.ai/tools/deepsql
