MCP Directory

MCP servers that execute SQL

Let your AI run SQL queries against a real database.

11 servers · Last updated June 17, 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★). 10 more compared below.

Compare 11 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
ClickHouse MCP ServerLocal (stdio)API key1,000run_query
MotherDuck / DuckDB MCP ServerLocal (stdio)API key800execute_query
Elasticsearch MCP ServerLocal (stdio)API key700esql
PostHog MCP Server (Official Remote)Local (stdio)API key350execute-sql
Prometheus MCP ServerLocal (stdio)No auth340execute_query
Honeycomb MCP ServerLocal (stdio)API key250run_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

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

run_query

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

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

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