Postgres & MySQL · Supports all deployments

The DBA and data engineer for Postgres and MySQL

Fully context-aware: monitors workloads, optimizes slow queries, and ships BI dashboards.

Free to get started · Self-host in 15 minutes

Works with
ClaudeCodexCursor
venkat@laptop — deepsql — 120×34

██████╗ ███████╗███████╗██████╗ ███████╗ ██████╗ ██╗
██╔══██╗██╔════╝██╔════╝██╔══██╗██╔════╝██╔═══██╗██║
██║  ██║█████╗  █████╗  ██████╔╝███████╗██║   ██║██║
██║  ██║██╔══╝  ██╔══╝  ██╔═══╝ ╚════██║██║▄▄ ██║██║
██████╔╝███████╗███████╗██║     ███████║╚██████╔╝███████╗
╚═════╝ ╚══════╝╚══════╝╚═╝     ╚══════╝ ╚══▀▀═╝ ╚══════╝
I am your DBA and Data agent. DeepSQL is the brain for your database.
Try these prompts
Connections (4)
analytics-replica mysql
prod-warehouse postgres
deepsql-vault postgres
prod-primary mysql
Needs attention
⚠ analytics-replica · brain still initializing (73%)
→ deepsql connections init analytics-replica
⚠ prod-primary · brain still initializing (73%)
→ deepsql connections init prod-primary
42 brain recommendations to review → deepsql brain recs
Ask a question · exit to quit · deepsql --help for CLI commands
v0.26.0 · latest
[deepsql] >
Product

Your full-time DBA and Data Engineer, in one agent.

BI answers, slow query fixes, and schema watch — from one shared brain.

Agent

Ask the agent about database health or BI

DeepSQL Agent loads your business context, resolves schema, drafts and validates SQL, then executes on a read replica — with every step you can inspect.

what are the top 5 customers having large velocity of data in last 7 days?
7 steps · brain · schema · workload · executed
  1. Loaded brain contextcustomers · sales_report_aggregation · velocity metric
  2. Resolved schemapublic.sales_report_aggregation · public.accounts
  3. Checked workload patternssimilar aggregation seen 42× in last 24h
  4. Drafted queryGROUP BY account_id · SUM(rows_ingested)
  5. Validated planindex scan on idx_sra_created_at · 38ms est.
  6. Confidence: highmatches 3 governed metrics in brain
  7. Executed on read replicareturned 5 rows in 41ms

Top 5 customers by rows ingested into sales_report_aggregation over the last 7 days:

CustomerRows / dayΔ vs prior wk
Aurora Hospitality (30469)4.82M+18%
Nordic Stays Group (28104)3.91M+12%
Coastline Resorts (31287)3.44M+9%
Meridian Hotels (29553)2.87M+6%
Lumen Suites (30988)2.31M+21%

Combined 17.35M rows/day — 62% of total ingestion volume.

BI

Dashboards without the analyst backlog

Ship BI directly from the warehouse. Pre-aggregated, governed by your brain, and always in sync with production schema.

Dashboard
Rooms sold & revenue
Rooms sold
585
Revenue
$15.6K
ADR
$26.87
Rooms sold by day
Mon
Tue
Wed
Thu
Fri
Sat
Sun
Brain

The business context your database is missing

Teach DeepSQL your metrics, rules, and conventions once. Every query, dashboard, and recommendation uses the same governed definitions.

Brain
Teach DeepSQL how your business works
5 of 41
Slow Queries

Find and fix the queries costing you money

Per-fingerprint trends, regressions, and by-customer breakdowns — sourced from pg_stat_statements or the MySQL slow log.

Slow queries
Per-query analytics · last 30 days
Tracked queries (6)
6 queries regressed on the latest runAggregation query is 13.33× slower vs baseline.
Aggregation query
query hash · 6821d4140d0e5365
SELECT hotel_id, SUM(net_room_revenue) rev,
COUNT(*) rooms_sold
FROM sales_report_aggregation
WHERE report_date >= CURRENT_DATE - INTERVAL '90 day'
GROUP BY hotel_id;
Mean execution time / day
last 14 days · peak 5.3
Jul 5Jul 10Jul 14Jul 18
Who it's for

One agent. Every team that touches the database.

From the migration a developer writes to the number a CEO asks for in Slack.

For engineers

Ship schema changes that don't haunt you later

DeepSQL MCP plugs into Claude, Codex, or Cursor and reviews every migration before it lands — blocking schema bloat, wrong table joins, and unsafe SQL at authoring time.

  • Intercepts schema changes and flags irreversible ones
  • Points agents at the right table, not the stale duplicate
  • Enforces security guardrails on generated SQL
migrations/0142_add_bookings.sqldeepsql mcp
-- proposed by coding agent
ALTER TABLE bookings
DROP COLUMN checkin_date;
ADD COLUMN checkin_ts timestamptz;
-- rewritten by deepsql
ALTER TABLE bookings
ADD COLUMN checkin_ts timestamptz;
-- backfill, then deprecate in 2 releases
Blocked
Destructive drop on a column with 41M rows and 3 downstream dashboards.
Joined orders_v2 — the live table, not orders_old
PII columns masked in agent-generated SQL
Redundant index on (tenant_id) rejected
How it works

From zero to a fully context-aware database agent in 15 minutes

Self-hosted end-to-end. Your data, your credentials, your VPC.

1
Install
One line

Clone the open source repo and run the installer on any Linux box, EC2, or container in your VPC. Installs the DeepSQL agent, CLI, and MCP server on the machine.

Install from GitHub
2
Setup
Let the brain learn

Connect your databases, hand over your company context, and set up your team. DeepSQL indexes your schema and starts learning your workload immediately.

Add connections

Every flavour of Postgres and MySQL — RDS, Aurora, Cloud SQL, self-managed. Read-only, VPC-peered credentials.

host: aws-rds-replica.internal
role: deepsql_ro
ssl: require
Give company context

Business rules, code scans, and slow query logs. The brain learns how your data is actually modelled and used.

// MRR = SUM(subscription.mrr)
// WHERE status = 'active'
scan: 1.2k repos · 96 fingerprints
Configure users

Invite your team in minutes. Row- and column-level policies mean everyone asks freely, and nobody sees what they shouldn't.

analytics_ro: masked PII
support: row filter tenant_id
sso: okta / google
3
Go live
Start chatting

Chat with the built-in DeepSQL agent in your browser or CLI, or connect Claude, Codex, and Cursor to your DeepSQL instance over MCP.

Works with
ClaudeCodexCursor

Put your database on autopilot.

One-line install. Self-host in 15 minutes. Role-based access, query policies, and audit logs built in.

View on GitHub