Skip to main content

Add your description here

Project description

image

Python Version License PyPI GitHub pull request

[ 中文 | English ]

db-query-mcp

Introduction

db-query-mcp is a versatile Database Query MCP tool with the following core features:

  • Multi-Database Support: Full compatibility with mainstream relational databases (MySQL, PostgreSQL, Oracle, SQLite, etc.)
  • Secure Access: Default read-only mode connection ensures data safety
  • Smart Query: Provides efficient SQL generation and execution capabilities
  • Data Export: Supports query result export functionality
  • Future versions will expand support for Elasticsearch, MongoDB, and graph databases, aiming to become a full-stack database query solution.

Installation

pip install db-query-mcp

MySQL requires additional dependencies:

pip install pymysql

PostgreSQL requires additional dependencies:

pip install psycopg2-binary

For other databases, install their respective connection packages:

Database Connection Package Example Connection String
SQLite Built-in Python sqlite:///example.db
MySQL pymysql or mysql-connector-python mysql+pymysql://user:password@localhost/dbname
PostgreSQL psycopg2 or psycopg2-binary postgresql://user:password@localhost:5432/dbname
Oracle cx_Oracle oracle+cx_oracle://user:password@hostname:1521/sidname
SQL Server pyodbc or pymssql mssql+pyodbc://user:password@hostname/dbname

Configuration

{
  "mcpServers": {
    "db_query_mcp": {
      "command": "db-query-mcp",
      "args": [
        "--db",
        "mysql+pymysql://user:password@host:port/database"
      ]
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

db_query_mcp-0.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

db_query_mcp-0.0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file db_query_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: db_query_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for db_query_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c8b36d00f3867c3f2f8cfa03a2d3ec3bcb4f04f6fbd96cf7c68650b9625aec68
MD5 5a4efc519f4860745ea2f63d1bfc9fff
BLAKE2b-256 2df0438336ae43b35ee456a9947ec437f60efcc0ab3a31b573401843e9f48afb

See more details on using hashes here.

File details

Details for the file db_query_mcp-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for db_query_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c23d4ec64b2a93abb59a4a3448959833355872ca3ebf988e1f30f5b2d581831e
MD5 d602ddb44b0dbf10c9a20e2fa5f32bde
BLAKE2b-256 37e9e4ea1fbec8d789595a43d8653b350bb0c4ff7ad0719b3e08bced00c9828b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page