Planned future support for querying Elasticsearch databases
Planned future support for connecting to and querying MongoDB databases
Supports querying MySQL databases with read-only access, enabling SQL generation and execution with data export capabilities
Enables connection to PostgreSQL databases for executing queries and exporting results with default read-only mode for data safety
Provides functionality to connect to and query SQLite databases with read-only access and data export features
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Database Query MCPshow me the top 10 customers by total purchase amount"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.

[ English | 中文 ]
db-query-mcp
Introduction
db-query-mcp is a mcp tool supporting diverse database querying and exporting, featuring:
Multi-DB Support: Full compatibility with mainstream databases (ElasticSearch, MySQL, PostgreSQL, Oracle, SQLite, etc.)
Secure Access: Default read-only mode for data protection
Smart Query: Natural language to SQL conversion with query optimization
Data Export: CSV / Json export capabilities
Roadmap: Expanding support for MongoDB and GraphDatabase to become full-stack DB query MCP
Related MCP server: MariaDB MCP Server
Demo
https://github.com/user-attachments/assets/60771cda-8b52-41bd-90e3-523c836f6366
Changelog
2025-06-02: Added support for ElasticSearch database queries
Installation
ElasticSearch:
Install from GitHub:
MySQL requires additional dependencies:
PostgreSQL requires additional dependencies:
For other databases, install their respective connection packages:
Database | Connection Package | Example Connection String |
SQLite | Built-in Python |
|
MySQL |
|
|
PostgreSQL |
|
|
Oracle |
|
|
SQL Server |
|
|
Configuration
Note: For certain clients, such as Cursor, only one db-query-mcp server can run at a time.