Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI → MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE ↗ (opens in a new tab)
  • llms.txt ↗ (opens in a new tab)
  • Catalog JSON ↗ (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub ↗ (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. 🗄️ Databases
  3. Sql Query MCP
Sql Query MCP logo
Health: ActiveRecent health check succeeded.Last checked 9/11/2026, 7:03:27 PM

Sql Query MCP

User RatingsBe the first to rate and review this MCP server!
View Repository6 GitHub StarsTotal stargazers on GitHub for the source repository (6 stars).
databasessqlpostgresqlmysqlhive

Connects AI clients to PostgreSQL, MySQL, and Hive for schema discovery, bounded read-only SQL, query plans, and controlled file exchange.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.

Add to CursorAdd to VS Code
We couldn’t automatically confirm this listing starts correctly

The install command below didn't complete successfully in our automated test.

pipx run sql-query-mcp sql-query-mcp

/bin/bash: line 1: pipx: command not found

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 6d ago.

Manual Client & Custom JSON ConfigExpand JSON ▾

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "andywang1688-sql-query-mcp": {
      "command": "pipx",
      "args": [
        "run",
        "sql-query-mcp",
        "sql-query-mcp"
      ]
    }
  }
}

💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing Alternatives🗄️ More in Databases

Overview

andyWang1688/sql-query-mcp MCP server exposes PostgreSQL, MySQL, and Hive databases through controlled MCP tools for discovery, sampling, read-only queries, asynchronous execution, and query-plan inspection. It reads database DSNs from environment variables while keeping connection definitions, namespace handling, SQL validation, and audit logging on the server side. PostgreSQL and MySQL results can be exported to local CSV or XLSX files, and prepared CSV/XLSX files can be imported into existing tables. Reach for it when an AI client needs database context and bounded SQL access without granting unrestricted SQL execution.

Use cases

•Inspect database schemas before generating SQL
•Run bounded read-only queries against configured databases
•Review query plans for PostgreSQL, MySQL, or Hive
•Export PostgreSQL or MySQL results to CSV or XLSX
•Import prepared CSV/XLSX files into existing tables

Key features

•PostgreSQL, MySQL, and Hive support
•Schema, database, table, and sample discovery
•Validated read-only SQL execution
•Asynchronous query status, pagination, and cancellation
•Query-plan inspection
•Controlled CSV/XLSX export and import

Capabilities & Tool Schemas

Inspect callable tools, capabilities, and parameters exposed to AI agents by Sql Query MCP.

Extracted Tool Capabilities
PostgreSQL, MySQL, and Hive support
Schema, database, table, and sample discovery
Validated read-only SQL execution
Asynchronous query status, pagination, and cancellation
Query-plan inspection
Controlled CSV/XLSX export and import

How Sql Query MCP works

What the andyWang1688/sql-query-mcp MCP server does

andyWang1688/sql-query-mcp MCP server gives an MCP client a controlled interface to configured PostgreSQL, MySQL, and Hive connections. It supports database structure discovery, table and column inspection, small data samples, read-only SQL, asynchronous query handling, and query-plan inspection. PostgreSQL uses schemas as namespaces; MySQL and Hive use databases.

The server also provides limited file exchange. PostgreSQL and MySQL query results can be written to local CSV or XLSX files. CSV/XLSX files can be imported into existing tables when their headers match table columns exactly. The import operation is the only database write path described by the project.

How it works

Connections are declared in a JSON configuration file. Each connection identifies its engine, connection ID, namespace defaults, and the name of an environment variable containing the real DSN. This keeps credentials out of the configuration file. The MCP client supplies SQL_QUERY_MCP_CONFIG and the DSN variables in its environment when starting the process.

SQL passes through sqlglot validation before execution. Query tools accept only SELECT statements and WITH ... SELECT statements; comments and multiple statements are rejected. Use run_select for short, bounded work. For longer read-only operations, start_query begins execution, get_query retrieves status and paginated results, and cancel_query stops a running query. Calls are recorded in an audit log.

Setup and configuration

The project documents two PyPI-based startup modes. Install the command with pipx install sql-query-mcp, then start sql-query-mcp, or let an MCP client launch it with pipx run --spec sql-query-mcp sql-query-mcp. Set SQL_QUERY_MCP_CONFIG to the connections file, such as a file under ~/.config/sql-query-mcp, rather than relying on the source-checkout default path.

Configuration settings can define default and maximum result limits plus an audit-log path. Each connection needs an explicit engine and a dsn_env entry. PostgreSQL connections may specify default_schema; MySQL and Hive connections may specify default_database. The README includes examples for PostgreSQL, MySQL, and Hive DSNs, but the actual credential-bearing values must be supplied by the operator.

Tools and capabilities

The documented tool set includes:

  • Listing configured connections, schemas, databases, tables, and views.
  • Describing table columns, keys, and indexes.
  • Running bounded read-only queries and retrieving table samples.
  • Starting, paging through, and cancelling asynchronous read-only queries.
  • Inspecting plans with EXPLAIN; Hive also supports EXPLAIN ANALYZE through the plan tool.
  • Exporting PostgreSQL and MySQL results to local CSV/XLSX files.
  • Importing local CSV/XLSX data into existing tables.

Limitations and notes

SQLite, SQL Server, and ClickHouse are listed as candidates and are not supported yet. Hive does not support query-result export. Hive file imports are intended for small files and reject inputs with more than 1,000 data rows; row-by-row insertion can also exceed an MCP client timeout. Large exports may face the same timeout issue because export is synchronous, even though rows are processed in batches.

Files are written to or read from the machine running the MCP server, not necessarily the machine displaying the AI client. Imports do not accept raw SQL and only insert file fields whose headers exactly match existing columns. The andyWang1688/sql-query-mcp MCP server therefore fits controlled database inspection and bounded data workflows better than unrestricted administration or bulk-loading operations.

Read the full README →View source on GitHub →

Related MCP Servers

View all in Databases View all alternatives
  • MCP Server Mysql logoMCP Server Mysql

    MySQL database integration in NodeJS with configurable access controls and schema inspection

    🗄️ Databases3 views
    Compare vs MCP Server Mysql →
  • Mysql MCP Server logoMysql MCP Server

    MySQL database integration with configurable access controls, schema inspection, and comprehensive security guidelines

    🗄️ Databases3 views
    Compare vs Mysql MCP Server →
  • MCP Datalink logoMCP Datalink

    MCP server for secure database access (PostgreSQL, MySQL, SQLite) with parameterized queries and schema inspection

    🗄️ Databases1 views
    Compare vs MCP Datalink →
  • Genai Toolbox logoGenai Toolbox

    Open source MCP server specializing in easy, fast, and secure tools for Databases.

    🗄️ Databases5 views
    Compare vs Genai Toolbox →

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars
6
Stargazers on the source repository.
Last commit
2mo ago
Most recent push to the default branch.
Install check
Inconclusive
Install command did not finish in our automated test.
Directory activity
4 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet — be the first to share how this listing worked for you.

Frequently Asked Questions about Sql Query MCP

Install it with `pipx install sql-query-mcp`, or use managed launch mode with `pipx run --spec sql-query-mcp sql-query-mcp`.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSql Query MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/andywang1688-sql-query-mcp?style=directory)](https://allmcps.com/mcp/andywang1688-sql-query-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/andywang1688-sql-query-mcp"><img src="https://allmcps.com/api/badge/andywang1688-sql-query-mcp?style=directory" alt="Sql Query MCP on AllMCPs" /></a>

Technical Specs & Signals

Category🗄️Databases
PricingFree
More technical detailsExpand ▾
TransportSTDIO
RuntimePython
AuthOther
LicenseMIT
Last updatedSep 5, 2026
Views4
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars6
GitHub Star CountTotal stargazers on GitHub representing community popularity (6 stars).
Last commit2mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Jun 26, 2026
52Quality signal: Good · 52/100How this signal is calculated ▾
Server availabilityNot measured

Not scored for repo-hosted servers — we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools24/30
Adoption & activity4/15
Community engagement1/10

A guidance signal from public completeness & health data — not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge and attach your website — proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it — no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in 🗄️ Databases →Best MCP servers for Databases →Alternatives to Sql Query MCP →Install in Claude DesktopInstall in CursorInstall in VS Code