db-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connectB | Open or replace a dynamic PostgreSQL/MySQL/MongoDB connection. |
| execute_mongodbA | Execute a MongoDB command query. Use MongoDB command syntax, not Mongo shell JavaScript. Do not generate db.collection.find(...) or db.users.aggregate(...). Instead generate command JSON such as {"find":"users","filter":{"active":true},"limit":10}. For aggregate, include "cursor": {}, for example {"aggregate":"orders","pipeline":[{"$match":{"status":"paid"}}],"cursor":{}}. Use query when providing a string; it must be valid Extended JSON. Use $oid/$date Extended JSON for BSON values. In --readOnly mode, write/unknown commands are rejected, and aggregate with $out/$merge is treated as write. |
| execute_sqlA | Execute one PostgreSQL or MySQL SQL statement with optional positional parameters. Generate normal SQL, not MongoDB syntax. Use params instead of interpolating values into sql. For PostgreSQL placeholders use $1, $2, ...; for MySQL placeholders use ?. In --readOnly mode, write/transaction/unknown SQL is rejected. |
| begin_transactionB | Begin a transaction for a connection. |
| commit_transactionC | Commit the current transaction for a connection. |
| rollback_transactionB | Rollback the current transaction for a connection. |
| close_connectionB | Close one connection, or the latest connection if no id is supplied. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool targets a distinct operation: connection management, SQL execution, MongoDB execution, and transaction control. No overlapping functionality.
All tool names use snake_case with a consistent verb_noun pattern (e.g., begin_transaction, execute_sql). No mixing of conventions.
Seven tools is well-scoped for a database server covering connections, transactions, and query execution for two database types. No extraneous tools.
Covers connection lifecycle, transaction lifecycle, and query execution for both SQL and MongoDB. Minor gaps like listing connections or switching databases, but core workflows are complete.