dbgate-dashboard-mcp

v0.1.0
dbgate-dashboard-mcp Checked 2 days ago Published 16 days ago

MCP server for querying databases through a running DbGate dashboard.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_connections

List the database connections configured in the DbGate dashboard.

list_databases

List databases available on a connection. DbGate returns an empty list for connections pinned to one database (``singleDatabase``); in that case the connection's default database is reported with ``single_database: true``.

ParameterTypeDescription
conid *string

list_tables

List tables, views and materialized views of a database. Columns are deliberately omitted (only their count is reported) — use describe_table for the details of one object.

ParameterTypeDescription
conid *string
database
schema

describe_table

Describe one table, view or matview: columns, keys, indexes. ``table`` may be qualified (``public.artist``) instead of passing ``schema``.

ParameterTypeDescription
conid *string
table *string
database
schema

query

Run a read query and return at most ``limit`` rows. ``LIMIT n`` is appended to row-returning statements that carry no cap of their own, and the result is truncated to ``limit`` regardless — DbGate's query API takes no row limit parameter, so the cap has to be enforced on both ends. ``SHOW``, ``PRAGMA`` and friends are passed through untouched. Use execute for statements that change data or schema.

ParameterTypeDescription
conid *string
sql *string
database
limitinteger

execute

Run any SQL statement, including writes and DDL. The SQL is passed to DbGate verbatim — no row limit is added. Use query for reads; this tool exists so that data and schema changes are an explicit, separately auditable action.

ParameterTypeDescription
conid *string
sql *string
database

find_documents

Read documents from a MongoDB collection. ``filter`` is a normal Mongo filter document; the supported subset is equality, $eq/$ne/$gt/$gte/$lt/$lte, $in, $regex and $and/$or. $regex is translated to a LIKE with the pattern wrapped in ``%``, so ``%`` and ``_`` inside it act as wildcards rather than literals. ``sort`` takes the Mongo form ``{"field": 1}`` / ``{"field": -1}``.

ParameterTypeDescription
collection *string
conid *string
database
filter
limitinteger
skipinteger
sort

redis_keys

Browse the Redis key space one level at a time. Without ``root`` the reply lists key prefixes (``level: "prefixes"``); with it, the actual keys under that prefix (``level: "keys"``). Pass a prefix's ``name`` back as ``root`` to descend.

ParameterTypeDescription
conid *string
database
filter
limitinteger
root

redis_get

Read one Redis key: its type, TTL and value. Strings come back in ``value``; hashes, lists, sets and sorted sets in ``items``, capped at ``limit`` entries. ``truncated: true`` means the value goes on past that — use redis_command to read the rest.

ParameterTypeDescription
conid *string
key *string
database
limitinteger

redis_command

Run any Redis command and return its raw result. Writes are allowed (``SET``, ``DEL``, …) — this is the Redis counterpart of execute. Use redis_keys and redis_get to explore before writing.

ParameterTypeDescription
command *string
conid *string
args
database