dblink
v2.0.1MCP server for multi-database access: PostgreSQL, MySQL, Redis, SQLite
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
open_connection
Open (or reuse) a database connection. Returns a connection_id used by the other tools. DSN schemes: postgres://, mysql://, redis://, mongodb://, mongodb+srv://, sqlite:
| Parameter | Type | Description |
|---|---|---|
dsn * | string | Database URL / DSN |
name | string | Optional human-friendly label |
read_only | boolean | Read-only connection (default true) |
close_connection
Close a connection and release its pool.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string |
list_connections
List active connections with alive/dead status.
db_query
Run a read-only SQL statement (SELECT/SHOW/EXPLAIN/read-only WITH) and return rows.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
sql * | string | |
limit | integer | |
params | array |
db_execute
Run a write statement on a writable connection (read_only=false). Returns affected_rows.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
sql * | string | |
params | array |
db_list_tables
List tables/views in the connected database.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
schema | string |
db_describe_table
Describe a table: columns (name/type/nullable/default) and indexes.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
table * | string | |
schema | string |
redis_command
Run a read-only Redis command (allow-list). Writes return UNSUPPORTED.
| Parameter | Type | Description |
|---|---|---|
command * | string | |
connection_id * | string | |
args | array |
mongo_find
Query documents from a MongoDB collection. filter/projection/sort accept relaxed EJSON. Returns relaxed EJSON documents.
| Parameter | Type | Description |
|---|---|---|
collection * | string | |
connection_id * | string | |
database | string | |
filter | object | |
limit | integer | |
projection | object | |
sort | object |
mongo_aggregate
Run a MongoDB aggregation pipeline. Read-only connections reject $out/$merge.
| Parameter | Type | Description |
|---|---|---|
collection * | string | |
connection_id * | string | |
pipeline * | ||
database | string | |
limit | integer |
mongo_write
Write to MongoDB (action: insert|update|delete). Only allowed on writable connections (read_only=false).
| Parameter | Type | Description |
|---|---|---|
action * | string | |
collection * | string | |
connection_id * | string | |
payload * | object | |
database | string |
mongo_list_collections
List collections in a MongoDB database.
| Parameter | Type | Description |
|---|---|---|
connection_id * | string | |
database | string |
mongo_describe_collection
Describe a MongoDB collection: sample document (EJSON), indexes and inferred fields.
| Parameter | Type | Description |
|---|---|---|
collection * | string | |
connection_id * | string | |
database | string |