MCP Directory

MCP servers that execute SQL

Let your AI run SQL queries against a real database.

29 servers · Last updated August 5, 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★). 28 more compared below.

Compare 29 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
DBHubLocal (stdio)No auth3,043execute_sql
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
Apache Doris MCP ServerLocal (stdio)No auth306get_sql_explain, get_sql_profile
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
Prisma MCPLocal (stdio)OAuth43ExecuteSqlQueryTool
Hologres MCP ServerLocal (stdio)API key34execute_hg_select_sql, execute_hg_select_sql_with_serverless, execute_hg_dml_sql +1
InfluxDB MCP ServerLocal (stdio)API key33execute_query
SingleStore MCP ServerLocal (stdio)OAuth33run_sql
Couchbase MCP ServerLocal (stdio)API key32run_sql_plus_plus_query, explain_sql_plus_plus_query
SQL AnalyzerLocal (stdio)No auth31lint_sql, transpile_sql
GreptimeDB MCP ServerLocal (stdio)No auth28execute_sql
Turso Cloud MCP ServerLocal (stdio)API key16execute_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

Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, and SQLite.

execute_sql

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

Query, explore, and govern Apache Doris databases via MCP — NL2SQL, metadata, and analytics tools.

get_sql_explainget_sql_profile

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

Prisma's official MCP: run migrations, provision Prisma Postgres, execute SQL and manage backups from your agent.

ExecuteSqlQueryTool

Universal interface between AI agents and Alibaba Cloud Hologres — query metadata, run SQL, diagnose performance.

execute_hg_select_sqlexecute_hg_select_sql_with_serverlessexecute_hg_dml_sqlexecute_hg_ddl_sql

Official MCP server for InfluxDB 3 (Core/Enterprise/Cloud) — query, write, and manage databases and tokens.

execute_query

Query and manage SingleStore workspaces, jobs, notebooks, and Stage files in natural language.

run_sql

Let LLMs query Couchbase clusters, run SQL++, manage documents, and analyze query performance.

run_sql_plus_plus_queryexplain_sql_plus_plus_query

SQL static analysis, linting, and dialect conversion for your AI assistant, powered by SQLGlot.

lint_sqltranspile_sql

Query and analyze GreptimeDB observability data (metrics, logs, traces) via SQL, TQL, and RANGE queries.

execute_sql

Manage Turso databases and run SQL from an agent, with separate read-only and destructive query tools.

execute_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