Stop making your AI agent guess your schema.
sql-mcp gives Claude, Cursor, and any MCP client live, accurate access to your MySQL, PostgreSQL, SQL Server, or SQLite database — real tables, real types, real rows, straight from the source.
Add it to your client in one line
Enter your database details, pick your client, and copy the generated command. It all runs in your browser — nothing you type is sent anywhere.
# Prefer a .sql-mcp file or an env var to keep credentials out of your shell history.
Point it at any SQL database
The driver is auto-detected from the connection URI. Same tools, same permission model, whichever engine you run.
mysql://user:pass@host:3306/db
mysql://
postgres://user:pass@host:5432/db
postgres:// · postgresql://
mssql://user:pass@host:1433/db
mssql:// · sqlserver://
sqlite:./path/to/file.db
sqlite: · file: · *.db
Three ways to hand it a database
Give sql-mcp a connection URI however suits your setup — a per-project file, a flag, or an environment variable.
-
.sql-mcpA file in your project root. Each project connects to its own database automatically, with nothing to change in your client. highest priority -
--dbPass the connection URI on the command line. Handy for a quick run or straight inside your MCP client's config. then -
DB_URLSet it in your shell or your client'senvblock. Keeps credentials out of config files and shell history. fallback
Set more than one and the highest wins — so a project's .sql-mcp always overrides a global --db or DB_URL.
Everything an agent needs to read a database
From a full schema dump to execution-plan analysis. Each tool declares exactly what it's allowed to do.
Locked down until you say otherwise
Reads are always open. Everything that changes data stays closed behind an explicit flag — and a few things can never be opened at all.
SELECT 1; DROP TABLE x never runs.