db-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_HOST | Yes | Public host name or IPv4 address. No URL, no `user@`, no `:port`. IPv6 literals are not supported (a host name that resolves to IPv6 is fine). Must be public; loopback, private, link-local, CGNAT and cloud-metadata addresses are refused. | |
| DB_NAME | Yes | The database (schema) to query. | |
| DB_PORT | No | The database port. Empty means the default. | 3306 |
| DB_TYPE | No | Only `mysql` in this version. `postgres` is reserved for a later version and is rejected for now. | mysql |
| DB_USER | Yes | A read-only account. | |
| DB_SSLMODE | No | `require`: encrypted, certificate not verified. `verify-full`: encrypted, certificate and host name verified against the system CAs (add a private CA with `NODE_EXTRA_CA_CERTS`). `disable`: plaintext, logs a warning. | require |
| DB_PASSWORD | Yes | The only secret. Any characters are allowed; it is not trimmed. | |
| DB_MCP_LOG_LEVEL | No | `debug`, `info`, `warn`, or `error` (stderr). | info |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
db-mcp could not start because of a configuration problem; every tool call returns the details as a CONFIG_ERROR tool error.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| execute_sqlA | DATETIME and DATE values are returned with the digits stored in the database and a trailing "Z" that is only formatting: they have no time zone, so do not convert them to another time zone. TIMESTAMP values are in the server's default session time zone. Execute SQL queries on the mysql database [READ-ONLY MODE] (limited to 500 rows; capped results carry "truncated": true) |
| search_objectsB | DATETIME and DATE values are returned with the digits stored in the database and a trailing "Z" that is only formatting: they have no time zone, so do not convert them to another time zone. TIMESTAMP values are in the server's default session time zone. Search and list database objects on the mysql database |
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 2 tools
The two tools target clearly different concerns: execute_sql runs arbitrary read-only queries, while search_objects is for metadata exploration (listing tables, columns, etc.). The boundary is mostly clear, though without an explicit schema/object list example, an agent might occasionally try to list tables via execute_sql instead.
Both names follow a verb_noun pattern (execute_sql, search_objects) in snake_case. The only minor deviation is that execute_sql embeds a resource abbreviation (sql) rather than a noun like 'query', but the convention is coherent.
Two tools is thin but defensible for a read-only database access server where execute_sql covers nearly all query needs and search_objects covers metadata. Still, it sits at the borderline of minimalism, lacking any convenience or schema-description helper.
Read-only query and object search are covered, but by design there are no write operations (insert/update/delete) and no dedicated schema/describe tool beyond generic search. For a read-only exploration server this is reasonable, but the surface is notably limited for general database work.