Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Sqlmate MCP

MCP server by adamrpostjr Verified · npm:sqlmate-mcp

Gives Claude Code, Zed and other MCP clients access to MySQL, MariaDB, SQLite, MSSQL and PostgreSQL databases. It also provides a live browser GUI for browsing, editing and querying the same data. Aimed at developers who want to watch and edit what the AI agent does.

  • Score 74
  • 1 stars
  • 563 a week
  • MIT
  • Updated

Install Sqlmate MCP

Built from the published package, never by AI.

claude mcp add sqlmate-mcp -- npx -y sqlmate-mcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Sqlmate MCP in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the sqlmate-mcp block.

About

sqlmate-mcp is an MCP server that lets an AI assistant work with SQL databases. It reads connection settings from the project's .env file or a .sqlmaterc file, with no separate config needed. It supports MySQL, MariaDB, SQLite, MSSQL and PostgreSQL. The assistant can inspect schemas, run read-only queries, get query plans, make guarded writes, and write SQL backups to disk.

The package also includes a browser GUI at localhost:4737. A person can browse tables, edit cells inline, run SQL with EXPLAIN, and view an entity-relationship diagram. The GUI can run as a standalone daemon that several project sessions attach to, and it shows a live feed of tool calls. The source says the project is MIT licensed. It is aimed at developers using Claude Code, Zed or other MCP clients who want the agent and themselves working on the same database.

Written from the project's README and checked against it.

Tools it gives your assistant

  • list_connectionsLists all detected connections with id, name, type and source.
  • add_connectionAdds a connection for the session via URL, config file or parameters.
  • list_tablesLists table names for a given connection.
  • describe_tableReturns column names, types, nullability and primary key info for a table.
  • get_schemaReturns the full schema graph, including columns, keys, foreign keys and indexes.
  • run_queryRuns a read-only query such as SELECT, EXPLAIN, SHOW or PRAGMA.
  • explain_queryReturns the execution plan, with an analyze option for real timing on read-only statements.
  • run_writeRuns INSERT, UPDATE, DELETE or DDL statements after a risk assessment.
  • dump_databaseWrites a restorable .sql backup of schema and data to the project's .sqlmate/dumps folder.

What you need

  • Node.js 22.5 or higher
  • A MySQL, MariaDB, SQLite, MSSQL or PostgreSQL database
  • Windows, only for the optional GUI autostart option

Try asking

  • Show me the schema of the orders database with keys and indexes.
  • Back up the orders and customers tables, gzipped, before running this migration.
  • Explain the plan for this SELECT query without running it.

Good to know

  • run_query is read-only, and writes go through run_write.
  • Writes without WHERE, DROP, TRUNCATE and ALTER with DROP COLUMN need confirmation.
  • MSSQL dumps are best-effort, and views, routines and triggers are not included (SQLite triggers are).
  • Without the GUI daemon running, the MCP process works with no GUI.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to Sqlmate MCP

All alternatives →
Supabase supabase
97

Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.

AAA Local and remote 172k/wk
ArcadeDB MCP Server ArcadeData
94

ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.

AAA Local 1.3k
DBHubbytebase
94

Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.

AAA Local 343k/wk
MCP Toolbox for Databasesgoogleapis
94

MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.

AAA Local 17k
MCP Toolbox for Databasesgoogleapis
94

Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.

AAA Local 17k
mongodb-mcp-servermongodb-js
94

MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.

AAA Local 203k/wk

Compare with Supabase, ArcadeDB MCP Server or DBHub

Sqlmate MCP: common questions

Does sqlmate-mcp need extra config files?

No. The source says it reads DB_* variables or DATABASE_URL from the project's .env, and also supports a .sqlmaterc file.

Can the assistant change data in the database?

Yes, through run_write. The source says operations affecting all rows, DROP, TRUNCATE and ALTER with DROP COLUMN pause until Claude confirms with confirm: true.

Do I need a native build step to use the SQLite support?

No. The source says SQLite uses Node's built-in node:sqlite module, so nothing needs to be compiled.

How do I install Sqlmate MCP?

In Claude Code run claude mcp add sqlmate-mcp -- npx -y sqlmate-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Sqlmate MCP the official server?

Sqlmate MCP is published by npm:sqlmate-mcp from its verified domain in the official MCP Registry.

Is Sqlmate MCP free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is Sqlmate MCP safe to use?

It scores 74 of 100. Grades: maintenance B, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Sqlmate MCP?

Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.

Does Sqlmate MCP work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Sqlmate MCP Install

Add to stack

Loading.