---
description: MCP servers ranked for database queries, with the recorded evidence behind each position.
title: Best MCP servers for database queries
image: https://agentrerank.com/og/default.png
---

1. [Home](https://agentrerank.com/)
2. /[Developers](https://agentrerank.com/developers)
3. /Database queries

# Best MCP servers for database queries

Ranked for the task “query a SQL database”. Relevance comes from retrieval and a dedicated reranker; the rest comes from recorded measurements.

What should your agent do?Rank servers

33 servers ranked by task relevance and recorded signals. [How ranking works](https://agentrerank.com/methodology).

| #  | Server                                                                                                                                                                                                                                         | Recorded evidence                               | Grade | Score |                                                                                                              |
| -- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- | ----- | ----- | ------------------------------------------------------------------------------------------------------------ |
| 1  | [sh.valv/mcp](https://agentrerank.com/mcp-server/sh.valv%2Fmcp/0.6.2)Let coding agents query any SQL database safely. Read-only by default and scoped by your policies.                                                                        | 5 GitHub starsRepository updated 17 days ago    | —     | 0.717 | [Scorecard](https://agentrerank.com/mcp-server/sh.valv%2Fmcp/0.6.2)                                          |
| 2  | [io.github.linq2db/linq2db.cli](https://agentrerank.com/mcp-server/io.github.linq2db%2Flinq2db.cli/6.5.0)Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.                                  | 3334 GitHub starsRepository updated 2 days ago  | —     | 0.695 | [Scorecard](https://agentrerank.com/mcp-server/io.github.linq2db%2Flinq2db.cli/6.5.0)                        |
| 3  | [io.github.dann26parr69/aifordatabase-mcp](https://agentrerank.com/mcp-server/io.github.dann26parr69%2Faifordatabase-mcp/0.1.2)Query any database in plain English or SQL through a guardrailed, read-only data layer.                         | No measured ranking evidence available          | —     | 0.644 | [Scorecard](https://agentrerank.com/mcp-server/io.github.dann26parr69%2Faifordatabase-mcp/0.1.2)             |
| 4  | [app.datarunner/datarunner](https://agentrerank.com/mcp-server/app.datarunner%2Fdatarunner/0.3.1)Query, monitor and schedule SQL across your databases: schemas, read-only SQL, alerts, hosts.                                                 | No measured ranking evidence available          | —     | 0.632 | [Scorecard](https://agentrerank.com/mcp-server/app.datarunner%2Fdatarunner/0.3.1)                            |
| 5  | [io.github.John0King/adomcp](https://agentrerank.com/mcp-server/io.github.John0King%2Fadomcp/1.4.0)Database MCP server for schema discovery, comments, and SQL queries.                                                                        | 4 GitHub starsRepository updated 23 days ago    | —     | 0.618 | [Scorecard](https://agentrerank.com/mcp-server/io.github.John0King%2Fadomcp/1.4.0)                           |
| 6  | [io.github.pattrnlabs/grain](https://agentrerank.com/mcp-server/io.github.pattrnlabs%2Fgrain/0.10.34)Run SQL queries and inspect database schemas through safe, visible MCP tools.                                                             | No measured ranking evidence available          | —     | 0.618 | [Scorecard](https://agentrerank.com/mcp-server/io.github.pattrnlabs%2Fgrain/0.10.34)                         |
| 7  | [com.googleapis.sqladmin/mcp](https://agentrerank.com/mcp-server/com.googleapis.sqladmin%2Fmcp/1.0.0)Create, manage, and query your Google Cloud SQL resources.                                                                                | No measured ranking evidence available          | —     | 0.606 | [Scorecard](https://agentrerank.com/mcp-server/com.googleapis.sqladmin%2Fmcp/1.0.0)                          |
| 8  | [io.github.fadnavismehul/sql-preview](https://agentrerank.com/mcp-server/io.github.fadnavismehul%2Fsql-preview/0.6.28)Run governed SQL queries and inspect database schemas from MCP agents.                                                   | No measured ranking evidence available          | —     | 0.605 | [Scorecard](https://agentrerank.com/mcp-server/io.github.fadnavismehul%2Fsql-preview/0.6.28)                 |
| 9  | [com.jamsql/jam-sql-studio](https://agentrerank.com/mcp-server/com.jamsql%2Fjam-sql-studio/1.0.0)Lets AI agents query SQL Server, PostgreSQL, MySQL, Oracle and SQLite via the Jam SQL Studio app.                                             | No measured ranking evidence available          | —     | 0.601 | [Scorecard](https://agentrerank.com/mcp-server/com.jamsql%2Fjam-sql-studio/1.0.0)                            |
| 10 | [com.clauxel.dbqueryguard/dbqueryguard-mcp](https://agentrerank.com/mcp-server/com.clauxel.dbqueryguard%2Fdbqueryguard-mcp/0.1.0)Paid remote MCP for governed database query review, SQL simulation, approvals, and audits.                    | No measured ranking evidence available          | —     | 0.584 | [Scorecard](https://agentrerank.com/mcp-server/com.clauxel.dbqueryguard%2Fdbqueryguard-mcp/0.1.0)            |
| 11 | [ai.smithery/wgong-sqlite-mcp-server](https://agentrerank.com/mcp-server/ai.smithery%2Fwgong-sqlite-mcp-server/1.16.0)Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…                      | 1 GitHub starsRepository updated 380 days ago   | —     | 0.567 | [Scorecard](https://agentrerank.com/mcp-server/ai.smithery%2Fwgong-sqlite-mcp-server/1.16.0)                 |
| 12 | [io.github.seayniclabs/berth](https://agentrerank.com/mcp-server/io.github.seayniclabs%2Fberth/0.2.1)Database management — query, schema inspection, migrations for PostgreSQL, MySQL, SQLite.                                                 | No measured ranking evidence available          | —     | 0.543 | [Scorecard](https://agentrerank.com/mcp-server/io.github.seayniclabs%2Fberth/0.2.1)                          |
| 13 | [com.dbconvert/streams](https://agentrerank.com/mcp-server/com.dbconvert%2Fstreams/2.7.3)Read-only SQL across your PostgreSQL, MySQL, S3 buckets and local data files, in one query.                                                           | 24 GitHub starsRepository updated 44 days ago   | —     | 0.482 | [Scorecard](https://agentrerank.com/mcp-server/com.dbconvert%2Fstreams/2.7.3)                                |
| 14 | [io.github.Evozim/query-forge](https://agentrerank.com/mcp-server/io.github.Evozim%2Fquery-forge/1.0.0)Enterprise SQL query optimizer and performance analyzer.                                                                                | No measured ranking evidence available          | —     | 0.462 | [Scorecard](https://agentrerank.com/mcp-server/io.github.Evozim%2Fquery-forge/1.0.0)                         |
| 15 | [io.github.sezzlee/mssql](https://agentrerank.com/mcp-server/io.github.sezzlee%2Fmssql/0.2.1)Explore and query Microsoft SQL Server read-only: catalogue search, schema and bounded queries.                                                   | No measured ranking evidence available          | —     | 0.459 | [Scorecard](https://agentrerank.com/mcp-server/io.github.sezzlee%2Fmssql/0.2.1)                              |
| 16 | [io.github.Jarvis-27/mcp-db-agent](https://agentrerank.com/mcp-server/io.github.Jarvis-27%2Fmcp-db-agent/1.0.1)Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.                                              | 0 GitHub starsRepository updated 99 days ago    | —     | 0.439 | [Scorecard](https://agentrerank.com/mcp-server/io.github.Jarvis-27%2Fmcp-db-agent/1.0.1)                     |
| 17 | [io.github.Michael-WhiteCapData/tablebridge-mcp](https://agentrerank.com/mcp-server/io.github.Michael-WhiteCapData%2Ftablebridge-mcp/0.1.1)Query a folder of CSV / Parquet / JSON files with SQL — one queryable source, read-only.            | No measured ranking evidence available          | —     | 0.386 | [Scorecard](https://agentrerank.com/mcp-server/io.github.Michael-WhiteCapData%2Ftablebridge-mcp/0.1.1)       |
| 18 | [io.github.cpenniman12/text2sql-mcp](https://agentrerank.com/mcp-server/io.github.cpenniman12%2Ftext2sql-mcp/0.1.2)Ask any SQL database in natural language. Agent explores schema, writes SQL, self-corrects.                                 | No measured ranking evidence available          | —     | 0.308 | [Scorecard](https://agentrerank.com/mcp-server/io.github.cpenniman12%2Ftext2sql-mcp/0.1.2)                   |
| 19 | [com.aifordatabase/aifordatabase](https://agentrerank.com/mcp-server/com.aifordatabase%2Faifordatabase/1.0.0)Ask your databases questions in plain English, run read-only SQL and set up data alerts.                                          | No measured ranking evidence available          | —     | 0.308 | [Scorecard](https://agentrerank.com/mcp-server/com.aifordatabase%2Faifordatabase/1.0.0)                      |
| 20 | [io.github.cybeleri/database-admin](https://agentrerank.com/mcp-server/io.github.cybeleri%2Fdatabase-admin/1.0.1)Database admin MCP: schema inspection, query optimization for PostgreSQL and MySQL                                            | No measured ranking evidence available          | —     | 0.303 | [Scorecard](https://agentrerank.com/mcp-server/io.github.cybeleri%2Fdatabase-admin/1.0.1)                    |
| 21 | [ai.waystation/postgres](https://agentrerank.com/mcp-server/ai.waystation%2Fpostgres/0.3.1)Connect to your PostgreSQL database to query data and schemas.                                                                                      | 64 GitHub starsRepository updated 405 days ago  | —     | 0.239 | [Scorecard](https://agentrerank.com/mcp-server/ai.waystation%2Fpostgres/0.3.1)                               |
| 22 | [io.github.nightswatchhq/nuthatch](https://agentrerank.com/mcp-server/io.github.nightswatchhq%2Fnuthatch/4.0.0)Query an EVM contract's indexed history with SQL, via a local nuthatch nest and nuthatch dev.                                   | 7 GitHub starsRepository updated 2 days ago     | —     | 0.232 | [Scorecard](https://agentrerank.com/mcp-server/io.github.nightswatchhq%2Fnuthatch/4.0.0)                     |
| 23 | [io.github.t8y2/dbx](https://agentrerank.com/mcp-server/io.github.t8y2%2Fdbx/0.1.3)Query databases from AI agents using connections configured in DBX.                                                                                         | 27068 GitHub starsRepository updated 2 days ago | —     | 0.230 | [Scorecard](https://agentrerank.com/mcp-server/io.github.t8y2%2Fdbx/0.1.3)                                   |
| 24 | [io.github.rctruta/sqlbenchdag](https://agentrerank.com/mcp-server/io.github.rctruta%2Fsqlbenchdag/0.1.2)Query pre-computed SQL engine benchmarks. Runs standalone, no server setup required.                                                  | No measured ranking evidence available          | —     | 0.221 | [Scorecard](https://agentrerank.com/mcp-server/io.github.rctruta%2Fsqlbenchdag/0.1.2)                        |
| 25 | [io.github.infoinlet-marketplace/mcp-mysql](https://agentrerank.com/mcp-server/io.github.infoinlet-marketplace%2Fmcp-mysql/0.1.1)Read-only MySQL/MariaDB for AI agents — query, list/describe tables, health. SQL-guarded.                     | No measured ranking evidence available          | —     | 0.221 | [Scorecard](https://agentrerank.com/mcp-server/io.github.infoinlet-marketplace%2Fmcp-mysql/0.1.1)            |
| 26 | [com.saturnsql/saturnsql](https://agentrerank.com/mcp-server/com.saturnsql%2Fsaturnsql/1.0.0)Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.                                                 | No measured ranking evidence available          | —     | 0.183 | [Scorecard](https://agentrerank.com/mcp-server/com.saturnsql%2Fsaturnsql/1.0.0)                              |
| 27 | [io.cayra/cayra](https://agentrerank.com/mcp-server/io.cayra%2Fcayra/1.0.0)Ask questions in plain language, get answers from your business database. No SQL required.                                                                          | No measured ranking evidence available          | —     | 0.174 | [Scorecard](https://agentrerank.com/mcp-server/io.cayra%2Fcayra/1.0.0)                                       |
| 28 | [io.github.ugurcl/dbridge-mcp](https://agentrerank.com/mcp-server/io.github.ugurcl%2Fdbridge-mcp/0.7.1)Query SQLite, PostgreSQL, and MySQL in plain language - read-only, with column masking and limits.                                      | No measured ranking evidence available          | —     | 0.170 | [Scorecard](https://agentrerank.com/mcp-server/io.github.ugurcl%2Fdbridge-mcp/0.7.1)                         |
| 29 | [ai.waystation/supabase](https://agentrerank.com/mcp-server/ai.waystation%2Fsupabase/0.3.1)Connect to your Supabase database to query data and schemas.                                                                                        | 64 GitHub starsRepository updated 405 days ago  | —     | 0.163 | [Scorecard](https://agentrerank.com/mcp-server/ai.waystation%2Fsupabase/0.3.1)                               |
| 30 | [io.github.kfireliyahu/emerald](https://agentrerank.com/mcp-server/io.github.kfireliyahu%2Femerald/0.1.5)The database under the chat: a local SQLite file a model asks for rows, not notes to re-read.                                         | 2 GitHub starsRepository updated 0 days ago     | —     | 0.154 | [Scorecard](https://agentrerank.com/mcp-server/io.github.kfireliyahu%2Femerald/0.1.5)                        |
| 31 | [io.github.atarkowska/fastmcp-sqltools](https://agentrerank.com/mcp-server/io.github.atarkowska%2Ffastmcp-sqltools/0.3.0)A MCP server provides SQL database access with support for PostgreSQL, MySQL, and SQLite.                             | No measured ranking evidence available          | —     | 0.110 | [Scorecard](https://agentrerank.com/mcp-server/io.github.atarkowska%2Ffastmcp-sqltools/0.3.0)                |
| 32 | [io.github.Optisol-Business/db-metadata-extractor-mcp](https://agentrerank.com/mcp-server/io.github.Optisol-Business%2Fdb-metadata-extractor-mcp/0.1.6)Extract database metadata from PostgreSQL, Snowflake, SQL Server, BigQuery, and Oracle. | 0 GitHub starsRepository updated 187 days ago   | —     | 0.094 | [Scorecard](https://agentrerank.com/mcp-server/io.github.Optisol-Business%2Fdb-metadata-extractor-mcp/0.1.6) |
| 33 | [io.github.deepeshd87/mcp-sql-querystore](https://agentrerank.com/mcp-server/io.github.deepeshd87%2Fmcp-sql-querystore/0.1.1)Read-only SQL Server diagnostics for LLM agents: Query Store, waits, plans, indexes                               | No measured ranking evidence available          | —     | 0.091 | [Scorecard](https://agentrerank.com/mcp-server/io.github.deepeshd87%2Fmcp-sql-querystore/0.1.1)              |

Unknown evidence is never counted as a pass. Scores are comparative signals, not a guarantee of safety or suitability.

## Other tasks

[Web search](https://agentrerank.com/developers/best/web-search)[Browser automation](https://agentrerank.com/developers/best/browser-automation)[GitHub workflows](https://agentrerank.com/developers/best/github)

## Keep going

[PopularExplain a medical term](https://agentrerank.com/t/explain-a-medical-term)[PopularMake a flyer](https://agentrerank.com/t/make-a-flyer)[PopularMake a video for Instagram](https://agentrerank.com/t/make-a-video-for-instagram)[PopularImprove my LinkedIn profile](https://agentrerank.com/t/improve-my-linkedin-profile)[PopularDraft a professional email](https://agentrerank.com/t/draft-a-professional-email)[PopularDraft a patient handout](https://agentrerank.com/t/draft-a-patient-handout)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","name":"Agent Rerank","@id":"https://agentrerank.com/#organization","url":"https://agentrerank.com","founder":{"@id":"https://agentrerank.com/about#ashley-ansons"},"logo":"https://agentrerank.com/brand/mark.svg","contactPoint":{"@type":"ContactPoint","email":"founder@agentrerank.com","contactType":"customer support"}},{"@type":"WebSite","name":"Agent Rerank","@id":"https://agentrerank.com/#website","url":"https://agentrerank.com"}]}
{"@context":"https://schema.org","@type":"ItemList","name":"Best MCP servers for database queries","itemListElement":[{"@type":"ListItem","position":1,"name":"sh.valv/mcp","url":"https://agentrerank.com/mcp-server/sh.valv%2Fmcp/0.6.2"},{"@type":"ListItem","position":2,"name":"io.github.linq2db/linq2db.cli","url":"https://agentrerank.com/mcp-server/io.github.linq2db%2Flinq2db.cli/6.5.0"},{"@type":"ListItem","position":3,"name":"io.github.dann26parr69/aifordatabase-mcp","url":"https://agentrerank.com/mcp-server/io.github.dann26parr69%2Faifordatabase-mcp/0.1.2"},{"@type":"ListItem","position":4,"name":"app.datarunner/datarunner","url":"https://agentrerank.com/mcp-server/app.datarunner%2Fdatarunner/0.3.1"},{"@type":"ListItem","position":5,"name":"io.github.John0King/adomcp","url":"https://agentrerank.com/mcp-server/io.github.John0King%2Fadomcp/1.4.0"},{"@type":"ListItem","position":6,"name":"io.github.pattrnlabs/grain","url":"https://agentrerank.com/mcp-server/io.github.pattrnlabs%2Fgrain/0.10.34"},{"@type":"ListItem","position":7,"name":"com.googleapis.sqladmin/mcp","url":"https://agentrerank.com/mcp-server/com.googleapis.sqladmin%2Fmcp/1.0.0"},{"@type":"ListItem","position":8,"name":"io.github.fadnavismehul/sql-preview","url":"https://agentrerank.com/mcp-server/io.github.fadnavismehul%2Fsql-preview/0.6.28"},{"@type":"ListItem","position":9,"name":"com.jamsql/jam-sql-studio","url":"https://agentrerank.com/mcp-server/com.jamsql%2Fjam-sql-studio/1.0.0"},{"@type":"ListItem","position":10,"name":"com.clauxel.dbqueryguard/dbqueryguard-mcp","url":"https://agentrerank.com/mcp-server/com.clauxel.dbqueryguard%2Fdbqueryguard-mcp/0.1.0"},{"@type":"ListItem","position":11,"name":"ai.smithery/wgong-sqlite-mcp-server","url":"https://agentrerank.com/mcp-server/ai.smithery%2Fwgong-sqlite-mcp-server/1.16.0"},{"@type":"ListItem","position":12,"name":"io.github.seayniclabs/berth","url":"https://agentrerank.com/mcp-server/io.github.seayniclabs%2Fberth/0.2.1"},{"@type":"ListItem","position":13,"name":"com.dbconvert/streams","url":"https://agentrerank.com/mcp-server/com.dbconvert%2Fstreams/2.7.3"},{"@type":"ListItem","position":14,"name":"io.github.Evozim/query-forge","url":"https://agentrerank.com/mcp-server/io.github.Evozim%2Fquery-forge/1.0.0"},{"@type":"ListItem","position":15,"name":"io.github.sezzlee/mssql","url":"https://agentrerank.com/mcp-server/io.github.sezzlee%2Fmssql/0.2.1"},{"@type":"ListItem","position":16,"name":"io.github.Jarvis-27/mcp-db-agent","url":"https://agentrerank.com/mcp-server/io.github.Jarvis-27%2Fmcp-db-agent/1.0.1"},{"@type":"ListItem","position":17,"name":"io.github.Michael-WhiteCapData/tablebridge-mcp","url":"https://agentrerank.com/mcp-server/io.github.Michael-WhiteCapData%2Ftablebridge-mcp/0.1.1"},{"@type":"ListItem","position":18,"name":"io.github.cpenniman12/text2sql-mcp","url":"https://agentrerank.com/mcp-server/io.github.cpenniman12%2Ftext2sql-mcp/0.1.2"},{"@type":"ListItem","position":19,"name":"com.aifordatabase/aifordatabase","url":"https://agentrerank.com/mcp-server/com.aifordatabase%2Faifordatabase/1.0.0"},{"@type":"ListItem","position":20,"name":"io.github.cybeleri/database-admin","url":"https://agentrerank.com/mcp-server/io.github.cybeleri%2Fdatabase-admin/1.0.1"},{"@type":"ListItem","position":21,"name":"ai.waystation/postgres","url":"https://agentrerank.com/mcp-server/ai.waystation%2Fpostgres/0.3.1"},{"@type":"ListItem","position":22,"name":"io.github.nightswatchhq/nuthatch","url":"https://agentrerank.com/mcp-server/io.github.nightswatchhq%2Fnuthatch/4.0.0"},{"@type":"ListItem","position":23,"name":"io.github.t8y2/dbx","url":"https://agentrerank.com/mcp-server/io.github.t8y2%2Fdbx/0.1.3"},{"@type":"ListItem","position":24,"name":"io.github.rctruta/sqlbenchdag","url":"https://agentrerank.com/mcp-server/io.github.rctruta%2Fsqlbenchdag/0.1.2"},{"@type":"ListItem","position":25,"name":"io.github.infoinlet-marketplace/mcp-mysql","url":"https://agentrerank.com/mcp-server/io.github.infoinlet-marketplace%2Fmcp-mysql/0.1.1"},{"@type":"ListItem","position":26,"name":"com.saturnsql/saturnsql","url":"https://agentrerank.com/mcp-server/com.saturnsql%2Fsaturnsql/1.0.0"},{"@type":"ListItem","position":27,"name":"io.cayra/cayra","url":"https://agentrerank.com/mcp-server/io.cayra%2Fcayra/1.0.0"},{"@type":"ListItem","position":28,"name":"io.github.ugurcl/dbridge-mcp","url":"https://agentrerank.com/mcp-server/io.github.ugurcl%2Fdbridge-mcp/0.7.1"},{"@type":"ListItem","position":29,"name":"ai.waystation/supabase","url":"https://agentrerank.com/mcp-server/ai.waystation%2Fsupabase/0.3.1"},{"@type":"ListItem","position":30,"name":"io.github.kfireliyahu/emerald","url":"https://agentrerank.com/mcp-server/io.github.kfireliyahu%2Femerald/0.1.5"},{"@type":"ListItem","position":31,"name":"io.github.atarkowska/fastmcp-sqltools","url":"https://agentrerank.com/mcp-server/io.github.atarkowska%2Ffastmcp-sqltools/0.3.0"},{"@type":"ListItem","position":32,"name":"io.github.Optisol-Business/db-metadata-extractor-mcp","url":"https://agentrerank.com/mcp-server/io.github.Optisol-Business%2Fdb-metadata-extractor-mcp/0.1.6"},{"@type":"ListItem","position":33,"name":"io.github.deepeshd87/mcp-sql-querystore","url":"https://agentrerank.com/mcp-server/io.github.deepeshd87%2Fmcp-sql-querystore/0.1.1"}]}
```
