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

[ 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 |
or
|
|
PostgreSQL |
or
|
|
Oracle |
|
|
SQL Server |
or
|
|
Configuration
Note: For certain clients, such as Cursor, only one db-query-mcp server can run at a time.