MCP Directory

MCP servers that execute SQL

Let your AI run SQL queries against a real database.

19 servers · Last updated June 21, 2026

TL;DR: These MCP servers expose tools that run SQL — from read-only SELECTs to full read/write — so your AI agent can query and inspect a live database instead of guessing. The key differences are which engine they target, whether writes are allowed, and how they guard against destructive or injection-prone queries.

Bottom line: if you only try one, MCP Toolbox for Databases (BigQuery) is the most popular, verified option for this (15,600★). 18 more compared below.

Compare 19 servers

ServerTransportAuthVerifiedStarsTools for this
MCP Toolbox for Databases (BigQuery)Local (stdio)OAuth15,600bigquery-execute-sql, bigquery-sql
AWS S3 Tables MCP ServerLocal (stdio)API key9,200run_sql_query
Postgres MCP ProLocal (stdio)API key2,900execute_sql
Supabase MCP ServerRemote (HTTP)OAuth2,700execute_sql
Neon MCP ServerRemote (HTTP)OAuth2,100run_sql / run_sql_transaction, list_slow_queries / explain_sql_statement
MCP Server for MySQLLocal (stdio)No auth1,834mysql_query
MySQL MCP ServerLocal (stdio)No auth1,304execute_sql
ClickHouse MCP ServerLocal (stdio)API key1,000run_query
Query | Supabase MCP ServerLocal (stdio)API key826execute_postgresql
MotherDuck / DuckDB MCP ServerLocal (stdio)API key800execute_query
Elasticsearch MCP ServerLocal (stdio)API key700esql
MCP AlchemyLocal (stdio)No auth410execute_query
PostHog MCP Server (Official Remote)Local (stdio)API key350execute-sql
Prometheus MCP ServerLocal (stdio)No auth340execute_query
Honeycomb MCP ServerLocal (stdio)API key250run_query
MySQL MCP Server ProLocal (stdio)OAuth246execute_sql, optimize_sql
Snowflake MCP ServerLocal (stdio)API key183read_query, write_query
Trino MCP ServerLocal (stdio)OAuth109execute_query
SQLite Explorer MCP ServerLocal (stdio)No auth105read_query

The servers

Google's official MCP server with prebuilt BigQuery tools, querying datasets via Application Default Credentials.

bigquery-execute-sqlbigquery-sql

Official AWS Labs MCP server to manage and query S3 Tables (table buckets, namespaces, tables).

run_sql_query

Read/write Postgres access plus index tuning, EXPLAIN plans, and database health analysis for AI agents.

execute_sql

Official Supabase server: manage tables, run SQL, branches, configs and edge functions from your AI client.

execute_sql

Manage serverless Postgres on Neon with natural language: projects, branches, migrations, and SQL.

run_sql / run_sql_transactionlist_slow_queries / explain_sql_statement

Read-only (optionally write) access to MySQL databases for LLMs — inspect schemas and run SQL queries.

mysql_query

Secure, structured access to MySQL databases for AI clients — query, sample, and inspect schemas via MCP.

execute_sql

Official ClickHouse server: read-only SQL queries plus database/table exploration and chDB support.

run_query

Safely run SQL, manage schema, call the Supabase Management API & Auth Admin from your IDE — with built-in safety controls.

execute_postgresql

Query local DuckDB files, in-memory DBs, S3, or MotherDuck cloud with read/write SQL.

execute_query

Official Elastic server: list indices, read mappings, and search with Query DSL.

esql

Connect Claude directly to PostgreSQL, MySQL, SQLite, Oracle, MS SQL and other SQLAlchemy databases.

execute_query

Official PostHog server: product analytics, feature flags, experiments, error tracking and SQL.

execute-sql

Run PromQL queries and analyze Prometheus metrics from any MCP client.

execute_query

Honeycomb observability via AI: query datasets, alerts and boards (community + official).

run_query

MySQL CRUD plus anomaly analysis: SQL optimization, health checks, lock and index diagnostics, with role-based permissions.

execute_sqloptimize_sql

Query Snowflake databases over MCP — read/write SQL, schema discovery, and data-insight memos.

read_querywrite_query

High-performance Go MCP server that lets AI assistants run SQL queries and explore data across a Trino cluster.

execute_query

Safe, read-only SQLite database exploration and querying for LLMs, built on FastMCP.

read_query

Use these in a stack

FAQ

Which MCP server is safest for running SQL?

Prefer servers that default to read-only mode and parse SQL before executing (e.g. Postgres MCP Pro). Grant write access only when the agent genuinely needs it, and connect with a least-privilege database role.

Can these run against my production database?

Technically yes, but point them at a read replica or a least-privilege role first. Check each server's security notes — some support read-only mode and safe-SQL parsing, others execute whatever the model sends.

Other capabilities