Best MCP servers for SQL querying
790 MCP servers in the Official MCP Registry do SQL querying. 280 can be used as a hosted endpoint, with nothing to install, and 639 publish their source code.
| # | Tool | Relevance | Connect | Code | Seen |
|---|---|---|---|---|---|
| 51 | MADB — Agent Memory Database Durable causal memory for AI agents — semantic recall, causal lineage, and skills. Local-first. | In name database | HOSTEDLOCAL | Open | 2d ago |
| 52 | postgres-mcp PostgreSQL MCP server with 15 tools (SQL, EXPLAIN, health, indexes) plus a Gradio UI with LLM chat. | In name postgres | HOSTEDLOCAL | Open | 2d ago |
| 53 | DBeast PostgreSQL MCP PostgreSQL MCP server for schema, query, health, security, and performance analysis. | In name postgresql | HOSTEDLOCAL | Open | 2d ago |
| 54 | MySQL (read-only, switchable) Read-only MySQL access, with the database and server switchable mid-conversation. | In name mysql | HOSTEDLOCAL | Open | 2d ago |
| 55 | Databases (read-only, switchable) Read-only SQL, MongoDB, Redis and Elasticsearch access, switchable mid-conversation. | In name databases | HOSTEDLOCAL | Open | 2d ago |
| 56 | Sezzlee SQL Server Explore and query Microsoft SQL Server read-only: catalogue search, schema and bounded queries. | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 57 | Sezzlee PostgreSQL Explore and query PostgreSQL read-only: catalogue search, schema introspection and bounded queries. | In name postgresql | HOSTEDLOCAL | Open | 2d ago |
| 58 | strut-stack-sql Token-efficient MCP server for MySQL, PostgreSQL, and SQLite | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 59 | mcp-sql-rust Token-efficient MCP server for MySQL, PostgreSQL, and SQLite | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 60 | mcp-sqlite MCP server for SQLCipher 4 encrypted SQLite databases with full CRUD operations and query support | In name sqlite | HOSTEDLOCAL | Open | 2d ago |
| 61 | mcp-encrypted-sqlite MCP server for encrypted SQLite databases (SQLCipher 4) - Works with MoneyMoney, KeePass and more | In name sqlite | HOSTEDLOCAL | Open | 2d ago |
| 62 | database SQL formatting, schema visualization, migration generation | In name database | HOSTEDLOCAL | Open | 2d ago |
| 63 | custom-mcp-database Run alias-based queries against PostgreSQL, MySQL, MongoDB and Oracle without exposing credentials. | In name database | HOSTEDLOCAL | Open | 2d ago |
| 64 | SQL Benchmarks Lab Query pre-computed SQL engine benchmarks. Runs standalone, no server setup required. | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 65 | SQL Safe MCP Minimal, read-only, PII-safe MCP server for SQL databases. | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 66 | MCP Database Doctor Offline PostgreSQL query, migration and EXPLAIN diagnostics for AI agents. | In name database | HOSTEDLOCAL | Open | 2d ago |
| 67 | sqlike-mcp SQL static analysis & query-equivalence for Postgres, MySQL, SQLite, and SQL Server | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 68 | postgres PostgreSQL MCP — query databases, inspect schemas, explain queries. | In name postgres | HOSTEDLOCAL | Open | 2d ago |
| 69 | sqlite SQLite MCP — query databases, inspect schemas, explain queries, export data. | In name sqlite | HOSTEDLOCAL | Open | 2d ago |
| 70 | Snowflake MCP Server A Snowflake MCP server — SQL queries, schema exploration, and data insights for AI assistants | In name snowflake | HOSTEDLOCAL | Open | 2d ago |
| 71 | SQL MCP Server Controlled SQL access gateway with policy, cost limits, tenant isolation, and safe tools. | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 72 | PostgreSQL MCP Server PostgreSQL MCP server with 203 tools, connection pooling, HTTP/SSE, OAuth 2.1, and tool filtering | In name postgresql | HOSTEDLOCAL | Open | 2d ago |
| 73 | mysql-mcp Enterprise-grade MySQL MCP Server with OAuth 2.0, 106 tools, and Docker deployment | In name mysql | HOSTEDLOCAL | Open | 2d ago |
| 74 | sqlite-mcp-server SQLite MCP server with 73 tools for JSONB, full-text search, geospatial, and analytics. | In name sqlite | HOSTEDLOCAL | Open | 2d ago |
| 75 | db-mcp (SQLite MCP Server) SQLite MCP server with OAuth 2.1, HTTP/SSE, 122 tools, and smart tool filtering | In name sqlite | HOSTEDLOCAL | Open | 2d ago |
| 76 | MySQL MCP Server Python MCP server for MySQL database inspection and querying | In name mysql | HOSTEDLOCAL | Open | 2d ago |
| 77 | sql-formatter-mcp Format SQL queries into readable layouts locally. No network and no key. | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 78 | PostgreSQL CVE & Release Intelligence PostgreSQL security for AI agents: CVEs, yanked releases, exploits, and upgrade paths | In name postgresql | HOSTEDLOCAL | Open | 2d ago |
| 79 | SqlAugur MCP server providing AI assistants with safe, read-only SQL Server access | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 80 | sw-postgres-mcp Safe-write Postgres MCP server with preview-before-execute writes and rollback safety. | In name postgres | HOSTEDLOCAL | Open | 2d ago |
| 81 | PostgreSQL performance Tuner MCP Server provides AI-powered PostgreSQL performance tuning capabilities. | In name postgresql | HOSTEDLOCAL | Open | 2d ago |
| 82 | mcp-mongodb Read-only MongoDB for AI agents — find, aggregate (no write stages), count, stats. | In name mongodb | HOSTEDLOCAL | Open | 2d ago |
| 83 | mcp-mysql Read-only MySQL/MariaDB for AI agents — query, list/describe tables, health. SQL-guarded. | In name mysql | HOSTEDLOCAL | Open | 2d ago |
| 84 | mcp-clickhouse Read-only ClickHouse for AI agents — analytics queries, table inspection, sizes, health. | In name clickhouse | HOSTEDLOCAL | Open | 2d ago |
| 85 | mcp-postgres-nl-query RLS/tenant-aware Postgres for AI agents — schema, read-only SQL, NL→SQL with safety rails. | In name postgres | HOSTEDLOCAL | Open | 2d ago |
| 86 | Polyglot Database MCP Unified MCP for 20 databases: SurrealDB, ArangoDB, Virtuoso, CouchDB, Cassandra, and more | In name database | HOSTEDLOCAL | Open | 2d ago |
| 87 | MSSQL LocalDB MCP MCP server for SQL Server Express LocalDB on Windows: manage instances, run T-SQL, discover DBs | In name mssql | HOSTEDLOCAL | Open | 2d ago |
| 88 | SQL Server Servidor MCP para SQL Server com controle de permissões e modo somente-leitura | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 89 | MCP Toolbox for Databases MCP Toolbox for Databases enables your agent to connect to your database. | In name databases | HOSTEDLOCAL | Open | 2d ago |
| 90 | PostgreSQL Performance (read-only) Read-only PostgreSQL performance diagnostics: slow queries, EXPLAIN, index advice, locks, functions | In name postgresql | HOSTEDLOCAL | Open | 2d ago |
| 91 | MySQL MCP MCP server for one MySQL database: schema, read-only queries and guarded writes. | In name mysql | HOSTEDLOCAL | Open | 2d ago |
| 92 | SQL Preview Run governed SQL queries and inspect database schemas from MCP agents. | In name sql | HOSTEDLOCAL | Open | 2d ago |
| 93 | Postgres MCP PostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults. | In name postgres | HOSTEDLOCAL | Open | 2d ago |
| 94 | Elekto SQL Server Read-only SQL Server introspection and querying: schema, definitions, dependencies and data. | In name sql | HOSTEDLOCAL | Open | 2d ago |
FAQ
How many MCP servers are there for SQL querying?
Electra Index lists 790 active MCP servers for SQL querying from the Official MCP Registry. 280 offer a hosted endpoint and 639 publish their source code.
Is there a ready-made AI agent for SQL querying instead?
Yes. If you prefer a finished product to plugging tools into your own assistant, Apollo.io, ThoughtSpot Spotter and Wren AI do this out of the box.
How this list is ordered: a tool comes first when the use case appears in its name rather than only in its description, then when it offers a hosted endpoint, then when its source code is public, then by how recently our robot saw it in the Official MCP Registry. The match to SQL Querying comes from the publisher's description (keyword method), not from a test of the tool. Only active tools with a real description are listed. No tool pays to appear here.