Db Query MCP Server

ElasticSearch: ```bash pip install "db-query-mcp[elasticsearch]" ```

Local serverstdioPython

What is the Db Query MCP MCP server?

ElasticSearch: bash pip install "db-query-mcp[elasticsearch]" . Exposed over MCP by the db query mcp mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

db-query-mcp is a mcp tool supporting diverse database querying and exporting, featuring:

Its toolset

Everything the assistant can do here goes through one of these:

  • Multi — DB Support**: Full compatibility with mainstream databases (ElasticSearch, MySQL, PostgreSQL, Oracle, SQLite, etc.)
  • Roadmap — Expanding support for MongoDB and GraphDatabase to become full-stack DB query MCP
  • Database — Connection Package
  • SQLite — Built-in Python
  • MySQL — pymysql or mysql-connector-python
  • PostgreSQL — psycopg2 or psycopg2-binary
  • Oracle — cx_Oracle

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at db-query-mcp on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Db Query MCP's toolset — Multi, Roadmap, Database and 4 more — is a fair guide to whether it matches your workflow. It is maintained by NewToolAI; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Db Query MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the db query mcp mcp server does with a few real requests.

Available tools

ToolWhat it does
MultiDB Support**: Full compatibility with mainstream databases (ElasticSearch, MySQL, PostgreSQL, Oracle, SQLite, etc.)
RoadmapExpanding support for MongoDB and GraphDatabase to become full-stack DB query MCP
DatabaseConnection Package
SQLiteBuilt-in Python
MySQLpymysql or mysql-connector-python
PostgreSQLpsycopg2 or psycopg2-binary
Oraclecx_Oracle

How to install the Db Query MCP MCP server

```json
{
  "mcpServers": {
      "es_db_mcp": {
        "command": "uvx",
        "args": [
          "db-query-mcp",
          "--db",
          "elasticsearch",
          "--uri", 
          "https://user:password@localhost:9200?index=test_data_index&ca_certs=/home/user/http_ca.crt"
        ]
      }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Db Query MCP to Multi.
  • Use Db Query MCP to Roadmap.
  • Use Db Query MCP to Database.

Frequently asked questions

It connects Db Query MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 7 tools (Multi, Roadmap, Database, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Db Query MCP directly.