X

db-query-mcp

Information

[ 中文 | English ] db-query-mcp 简介 db-query-mcp 是一个支持多种数据库查询和导出的 MCP 工具,具有以下核心特性: ​多数据库支持​:全面兼容主流关系型数据库(ElasticSearch、MySQL、PostgreSQL、Oracle、SQLite等); 安全访问​:默认以只读模式连接数据库,保障数据安全; 智能查询​:提供高效的查询语句生成与执行能力; ​数据导出​:支持查询结果导出功能; 未来版本规划将扩展对 MongoDB 以及 GraphDatabase 的支持,致力于成为全栈式数据库查询 MCP。 演示 https://github.com/user-attachments/assets/60771cda-8b52-41bd-90e3-523c836f6366 更新日志 2025-06-02: 支持ElasticSearch数据库查询 安装 关系数据库: pip install db-query-mcp ElasticSearch: pip install db-query-mcp[elasticsearch] 源码安装: pip install git+https://github.com/NewToolAI/db-query-mcp mysql需要额外安装依赖: pip install pymysql postgredb需要额外安装依赖: pip install psycopg2-binary 对于其他数据库,需要额外安装相应的数据库连接包。 DatabaseConnection PackageExample Connection StringSQLite(Python 内置)sqlite:///example.dbMySQLpymysql 或 mysql-connector-pythonmysql+pymysql://user:password@localhost/dbnamePostgreSQLpsycopg2、psycopg2-binarypostgresql://user:password@localhost:5432/dbnameOraclecx_Oracleoracle+cx_oracle://user:password@hostname:1521/sidnameSQL Serverpyodbc 或 pymssqlmssql+pyodbc://user:password@hostname/dbname 配置 \{ "mcpServers": \{ "sqlite_db_mcp": \{ "command": "db-query-mcp", "args": [ "--db", "sqlite", "--uri", "sqlite:///sqlite_company.db" ] \}, "es_db_mcp": \{ "command": "db-query-mcp", "args": [ "--db", "elasticsearch", "--uri", "https://user:password@localhost:9200?index=test_data_index&ca_certs=/home/user/http_ca.crt" ] \} \} \}

Prompts

Reviews

Tags

Write Your Review

Detailed Ratings

ALL
Correctness
Helpfulness
Interesting
Upload Pictures and Videos

Name
Size
Type
Download
Last Modified
  • Community

Add Discussion

Upload Pictures and Videos