DB MCP Server
Allows retrieving database credentials from AWS Secrets Manager to securely connect to databases.
Provides tools for executing SQL queries, exploring schemas, and managing data in MySQL databases.
Provides tools for executing SQL queries, exploring schemas, and managing data in PostgreSQL databases.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DB MCP Servershow me the columns in the orders table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DB MCP Server
A Model Context Protocol (MCP) server for database operations. Execute queries, introspect schemas, and manage data for PostgreSQL and MySQL databases. Works with local databases, SSH tunnels, AWS RDS, RDS Proxy, and any compatible database.
Features
db_list_instances - List RDS database instances (requires AWS credentials)
db_test_connection - Test database connectivity and get version info
db_execute_query - Execute read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN)
db_execute_write - Execute write queries (INSERT/UPDATE only, DELETE blocked)
db_get_schema - Get full database schema with tables, views, and columns
db_get_tables - List tables and views with filtering options
db_get_columns - Get column details for a specific table
db_sample_data - Get sample rows from a table
Related MCP server: MCP MySQL Server
Installation
Using npx (Recommended)
No installation required. Add directly to your config:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/db-mcp"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "mydb",
"DB_USER": "postgres",
"DB_PASSWORD": "password",
"DB_ENGINE": "postgresql"
}
}
}
}Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/db-mcp"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "mydb",
"DB_USER": "postgres",
"DB_PASSWORD": "password",
"DB_ENGINE": "postgresql"
}
}
}
}Manual Installation
# Clone the repository
git clone https://github.com/nikhilchintawar/db-mcp.git
cd db-mcp
# Install dependencies
npm install
# Build
npm run buildThen add to your config:
{
"mcpServers": {
"db": {
"command": "node",
"args": ["/absolute/path/to/db-mcp/build/index.js"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "mydb",
"DB_USER": "postgres",
"DB_PASSWORD": "password",
"DB_ENGINE": "postgresql"
}
}
}
}Configuration Examples
Local Database
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/db-mcp"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "mydb",
"DB_USER": "postgres",
"DB_PASSWORD": "password",
"DB_ENGINE": "postgresql",
"DB_SSL": "false"
}
}
}
}SSH Tunnel
First, establish your SSH tunnel:
ssh -L 5432:rds-endpoint.amazonaws.com:5432 bastion-hostThen configure:
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/db-mcp"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "mydb",
"DB_USER": "admin",
"DB_PASSWORD": "password",
"DB_ENGINE": "postgresql"
}
}
}
}AWS RDS / RDS Proxy
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/db-mcp"],
"env": {
"DB_HOST": "my-proxy.proxy-xxxx.us-east-1.rds.amazonaws.com",
"DB_PORT": "5432",
"DB_NAME": "mydb",
"DB_USER": "admin",
"DB_PASSWORD": "password",
"DB_ENGINE": "postgresql"
}
}
}
}AWS RDS with Temporary Credentials (Read Replica)
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/db-mcp"],
"env": {
"AWS_REGION": "eu-west-1",
"AWS_ACCESS_KEY_ID": "your-access-key",
"AWS_SECRET_ACCESS_KEY": "your-secret-key",
"AWS_SESSION_TOKEN": "your-session-token",
"DB_HOST": "my-proxy-readonly.proxy-xxxx.eu-west-1.rds.amazonaws.com",
"DB_PORT": "5432",
"DB_NAME": "mydb",
"DB_USER": "admin",
"DB_PASSWORD": "password",
"DB_ENGINE": "postgresql",
"DB_IS_READ_REPLICA": "true",
"DB_WRITE_MODE": "disabled"
}
}
}
}AWS Secrets Manager
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "github:nikhilchintawar/db-mcp"],
"env": {
"AWS_REGION": "us-east-1",
"AWS_PROFILE": "your-profile",
"DB_SECRET_ARN": "arn:aws:secretsmanager:us-east-1:123456789012:secret:mydb-AbCdEf"
}
}
}
}Configuration
Config File Locations
Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.jsonClaude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.jsonClaude Code:
~/.claude/settings.json
Environment Variables
Variable | Required | Description |
| Yes* | Database hostname |
| No | Database port (default: 5432 for PostgreSQL, 3306 for MySQL) |
| Yes* | Database name |
| Yes* | Database username |
| Yes* | Database password |
| Yes* |
|
| No | Enable SSL (default: true) |
| No | AWS Secrets Manager ARN (alternative to direct credentials) |
| No |
|
| No | Set to |
| No | Default query row limit (default: 1000) |
| No | Default query timeout in ms (default: 30000) |
*Required unless using DB_SECRET_ARN
AWS Configuration (Optional)
AWS credentials are only needed if using:
DB_SECRET_ARN(Secrets Manager)db_list_instancestool (RDS API)
Variable | Description |
| AWS region (required for AWS features) |
| AWS credentials profile |
| AWS access key |
| AWS secret key |
| Session token (for temporary credentials) |
Usage Examples
Once configured, you can use natural language to interact with your database:
"Show me the database schema"
"List all tables"
"Get sample data from the users table"
"Run a query to find all orders from last week"
"Insert a new record into the settings table"
"Show me the columns in the products table"
Available Tools
db_list_instances
List RDS database instances (requires AWS credentials).
Parameter | Required | Description |
| No | Filter by instance identifier |
| No | Filter by engine (postgres, mysql) |
db_test_connection
Test database connection and return status, latency, and version.
Parameter | Required | Description |
(none) | - | Uses configured connection |
db_execute_query
Execute read-only SQL queries.
Parameter | Required | Description |
| Yes | SELECT, SHOW, DESCRIBE, or EXPLAIN query |
| No | Max rows (default: 1000, max: 10000) |
| No | Query timeout in ms (default: 30000) |
db_execute_write
Execute write operations (INSERT/UPDATE only).
Parameter | Required | Description |
| Yes | INSERT or UPDATE query |
| No | Query timeout in ms (default: 30000) |
Note: DELETE, DROP, TRUNCATE, and ALTER are blocked. Fails gracefully on read replicas.
db_get_schema
Get full database schema including tables, views, and columns.
Parameter | Required | Description |
| No | Filter by schema (e.g., "public") |
db_get_tables
List tables and views.
Parameter | Required | Description |
| No | Filter by schema |
| No |
|
db_get_columns
Get column details for a specific table.
Parameter | Required | Description |
| Yes | Table name |
| No | Schema name |
db_sample_data
Get sample rows from a table.
Parameter | Required | Description |
| Yes | Table name |
| No | Schema name |
| No | Number of rows (default: 10, max: 100) |
Write Protection
The server includes multiple safety mechanisms:
Mode | Behavior |
| Blocks all write operations |
| Allows INSERT/UPDATE on any instance |
| Allows INSERT/UPDATE except on read replicas |
Always blocked: DELETE, DROP, TRUNCATE, ALTER, CREATE, GRANT, REVOKE
Read replica detection works via:
DB_IS_READ_REPLICA=trueenvironment variableAutomatic detection via RDS API (requires
DB_RDS_INSTANCE_IDENTIFIERand AWS credentials)
Development
# Watch mode for development
npm run dev
# Build for production
npm run build
# Test with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsLicense
MIT
Available Tools
8 toolsdb_execute_queryA
Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN). Returns columns, rows, and execution metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL query to execute. Only SELECT, SHOW, DESCRIBE, and EXPLAIN queries are allowed. | |
| limit | No | Maximum number of rows to return (default: 1000, max: 10000) | |
| timeout | No | Query timeout in milliseconds (default: 30000, max: 300000) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavioral traits, and it does so reasnably: it explicitly declares the operation read-only (safety profile) and specifies the returned data structure, which is valuable given there is no output schema. It discloses the allowed statement constraint, though that is also present in the schema. It does not cover error behavior for disallowed queries or prerequisites such as an active connection, but the core transparency needs are met.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences with zero filler. The action and constraint are front-loaded, and the return information is delivered in a short follow-up sentence. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a query tool with fully documented parameters, the description covers purpose, scope, safety, and return format. Minor gaps remain: it does not explain the relationship to sibling introspection tools (db_get_schema, db_get_tables) given that SHOW/DESCRIBE overlap with them, nor does it mention prerequisites like an established connection. These are notable but not blocking for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%: sql, limit, and timeout each have descriptive schema text with defaults and ranges, so the description need not repeat parameter details. The description adds only marginal value beyond the schema, such as clarifying that limit controls rows through the mention of "rows" in the return format. Baseline 3 is appropriate since the schema already does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource — "Execute a read-only SQL query" — and immediately scopes it to SELECT, SHOW, DESCRIBE, and EXPLAIN. It also states the return shape (columns, rows, execution metadata), making the tool's function unambiguous. The read-only qualifier implicitly differentiates it from the sibling db_execute_write.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The read-only qualifier and the explicit list of allowed statement types give the agent a clear sense of when the tool applies (read queries) and when it does not (writes). However, it never names alternatives or states exclusions, so the agent must infer that db_execute_write handles mutations and that the db_get_* siblings may be preferable for schema/metadata inspection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_execute_writeB
Execute a write SQL query (INSERT or UPDATE only). DELETE is not allowed. Fails gracefully on read replicas.
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL query to execute. Only INSERT and UPDATE queries are allowed. DELETE is not permitted. | |
| timeout | No | Query timeout in milliseconds (default: 30000, max: 300000) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses key behavior: only INSERT and UPDATE are executed, DELETE is rejected, and writes fail gracefully on read replicas. However, it doesn't explain what 'fails gracefully' entails (error vs no-op), nor mention commit behavior or side effects beyond the allowed operations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with the core purpose, and includes the most important restriction (DELETE not allowed) and a notable operational behavior. The phrase 'fails gracefully' is slightly vague but efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core operation and restrictions but omits anything about return values or post-conditions, which matters given there is no output schema. For a write tool with only two params, this is adequate but not complete – an agent might not know what to expect on success or failure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both sql and timeout are documented in the schema. The description reiterates the INSERT/UPDATE restriction already present in the schema's sql property, adding no new parameter-specific semantics. Baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes write SQL queries limited to INSERT and UPDATE, explicitly forbidding DELETE. The resource (database) and verb are specific. It distinguishes from sibling db_execute_query by the 'write' qualifier, though it doesn't name the sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance is provided on when to choose this tool over db_execute_query or other siblings. The allowed operations imply usage for INSERT/UPDATE, and the DELETE prohibition tells agents what not to attempt, but there is no explicit when-to-use or alternative routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_get_columnsA
Get column details for a specific table including data types, nullable flags, and key constraints.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | The name of the table to get columns for | |
| schemaName | No | The schema name (e.g., public for PostgreSQL). If not specified, searches all schemas. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. 'Get' implies a read-only operation, and the description reveals what the returned details cover, but it does not address error behavior, schema search semantics, or whether any side effects occur. It is adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Exactly one concise, front-loaded sentence. Every word earns its place: it names the action, the target resource, and the key facets returned. No filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a straightforward metadata-read tool, the description covers the essential contract: what the agent gets back (data types, nullable flags, key constraints). The absence of an output schema raises the burden slightly, but the description provides a reasonable expectation of the return payload. It is slightly short of complete because it omits clarifications like the all-schemas search behavior of schemaName, though the schema partially covers that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both the 'table' and 'schemaName' parameters. The description reinforces what 'table' represents but adds no new semantic meaning for either parameter beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Get' with a clear resource 'column details for a specific table' and enumerates what is returned (data types, nullable flags, key constraints). This distinguishes it from sibling tools like db_get_tables and db_get_schema without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: call this when you need column-level metadata for a given table. However, it does not explicitly state when NOT to use it or point to alternatives such as db_get_tables or db_get_schema, so the guidance is only contextual, not directive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_get_schemaA
Get the full database schema including all tables, views, and their columns with data types and constraints.
| Name | Required | Description | Default |
|---|---|---|---|
| schemaName | No | Filter by specific schema name (e.g., public for PostgreSQL) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the behavioral burden. It clearly discloses the output scope (tables, views, columns, data types, constraints) and the verb 'Get' implies a non-mutating read, but it does not describe default behavior when no schemaName is supplied, response format, or potential size/performance considerations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence that states the action and the exact contents of the returned schema. Every phrase adds useful specificity with no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple introspection tool with one optional parameter and no output schema, the description sufficiently explains what the return value covers. The optional schemaName semantics are handled by the schema, and basic invocation is complete, though it leaves some edge-case behavior undocumented.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, schemaName, is fully documented in the input schema with an example, providing 100% coverage. The tool description does not add any additional meaning about the parameter, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Get') over a clear resource ('the full database schema') and enumerates what is included: all tables, views, columns, data types, and constraints. This makes it easily distinguishable from granular siblings like db_get_tables or db_get_columns.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as db_get_tables or db_get_columns. There is no mention of when schemaName should be provided or omitted, and no exclusions or routing advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_get_tablesB
List all tables and views in the database. Can filter by schema name and object type.
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Filter by object type: table, view, or all | all |
| schemaName | No | Filter by specific schema name (e.g., public for PostgreSQL) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral transparency. It correctly conveys a read-only enumeration behavior and optional filtering, but it does not disclose details such as whether a connection must already exist, what happens with an invalid schema name, or whether results are limited. It is adequate but minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no filler. The first sentence states the primary purpose, and the second efficiently covers both optional filters, making it easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple listing tool with two optional parameters, the description covers the core function and the available filters. There is no output schema, but the return value is reasonably implied by the word 'List'. It could be more explicit about default schema behavior, but nothing critical is missing for basic correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already describes both parameters with 100% coverage, so the baseline is 3. The description only restates that filtering by schema name and object type is possible, adding no extra detail about defaults, formatting, or valid values.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action ('List') and resource ('all tables and views in the database'), so an agent understands what the tool does. It is also distinguishable from sibling tools like db_get_columns and db_get_schema because it targets tables/views rather than schema details or columns, though it does not explicitly name those alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to choose this tool over siblings such as db_get_schema, db_get_columns, or db_execute_query. There are no conditions, exclusions, or alternative tool recommendations, so an agent must infer appropriate usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_list_instancesA
List RDS database instances in the AWS account. Requires AWS credentials. Use this to discover available databases, their endpoints, and status.
| Name | Required | Description | Default |
|---|---|---|---|
| engine | No | Filter by database engine (e.g., postgres, mysql) | |
| identifier | No | Filter by specific RDS instance identifier |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description rightly carries behavioral disclosure: it states 'Requires AWS credentals' and implicitly signals a read-only list operation. It also hints at the return contents (endpoints, status). However, it doesn't mention default behavior when no filters are passed, pagination, or regional scope, leaving meaningful behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, each earning its place: the first defines action and resource, the second gives the credential requirement and intended use. It is front-loaded and free of redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list operation with optional filters and no output schema, the description covers the essentials: action, resource, credentials, intended use, and result hints. It could be more explicit about listing all instances when no filters are given and about response shape, but it is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Both parameters are fully described in the input schema ('Filter by database engine' and 'Filter by specific RDS instance identifier'), so schema coverage is 100%. The description itself adds no parameter-level detail, so a baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('List') and resource ('RDS database instances in the AWS account'), and its discovery intent distinguishes it from sibling tools that test connections, query, write, or inspect schema/tables. The opening sentence leaves no ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly instructs 'Use this to discover available databases, their endpoints, and status,' which gives a clear invocation context. It stops short of naming alternatives or saying when not to use it, but the discovery-vs-operation distinction is easy to infer from sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_sample_dataA
Get sample rows from a table to understand its data structure and content.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of sample rows to return (default: 10, max: 100) | |
| table | Yes | The name of the table to get sample data from | |
| schemaName | No | The schema name (e.g., public for PostgreSQL) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. 'Get' implies a read-only operation and 'sample rows' implies a limited subset, but the description does not disclose ordering, potential errors, permissions, or that no data mutation occurs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that is concise, front-loaded with the core action, and contains no filler. Every word contributes to understanding the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only sample tool, the description adequately conveys what the tool does and returns. The main gap is the lack of explicit guidance on when to use it instead of closely related sibling tools, but the schema covers parameter details and the purpose is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with each parameter already documented including defaults and constraints. The description adds no parameter-specific meaning beyond what the schema provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get sample rows'), the resource ('a table'), and the intent ('understand its data structure and content'). This distinguishes it from sibling tools like db_execute_query, db_get_schema, and db_get_columns without ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for exploring table data, which suggests when it should be used, but it does not explicitly state when to prefer it over alternatives such as db_execute_query or db_get_columns. No exclusions or explicit routing are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
db_test_connectionA
Test the database connection and return connection status, latency, and database version.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It does state what the tool returns (status, latency, version), but does not say whether the operation is read-only, how failures are reported, whether credentials are required, or whether a test query is actually executed. The word 'test' implies non-mutating behavior, but this is not made explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence with no superfluous words. The primary action ('Test the database connection') is front-loaded, followed directly by the exact outputs the agent should expect. Every part of the sentence contributes useful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter utility tool, this description is nearly complete: it names the action and the three expected return values. The main gaps are the exact format of the status and latency fields and any error behavior, but these are minor for a simple connection test without input parameters or an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so no parameter descriptions are required. The description adds value by listing relevant output metrics, which compensates for the absence of an output schema. A no-parameter health-check tool does not need parameter-level detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool's verb ('Test') and resource ('database connection'), and explicitly states the outputs: connection status, latency, and database version. This uniquely distinguishes it from siblings like db_execute_query and db_get_schema, which target data operations rather than connectivity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use is implied by the name and description: use when you need to verify database connectivity. However, no explicit guidance is given about when to prefer this over related database tools, such as before executing queries or after setup, and no alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v1.0.0- First observed
db_execute_query - First observed
db_execute_write - First observed
db_get_columns - First observed
db_get_schema - First observed
db_get_tables - First observed
db_list_instances - First observed
db_sample_data - First observed
db_test_connection
TDQS
Scored across 8 tools
Each tool targets a distinct operation: instance discovery, connectivity testing, read queries, write queries, and schema introspection. The schema-related tools (get_schema, get_tables, get_columns) have some overlap but their descriptions make the scope clear enough to avoid serious confusion.
Tool names consistently use a db_ prefix with snake_case and mostly follow a verb_noun pattern. The main deviation is db_sample_data, which lacks an explicit verb, and list vs get are used inconsistently (list_instances vs get_tables).
Eight tools is well-scoped for a database MCP server. Each tool serves a meaningful purpose without unnecessary redundancy or bloat.
The surface covers instance discovery, connection testing, schema inspection, data sampling, and both read and safe write operations. Minor gaps include lack of DELETE support, DDL/transactions, and explicit database selection tools, but these appear intentional or edge-case.
Related MCP Connectors
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.
Your Supabase account in natural language: run SQL, apply migrations, manage tables, storage, edge f
Generate, fix, explain and run read-only SQL on PostgreSQL, MySQL and SQL Server
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with PostgreSQL and Supabase databases through natural language. Supports secure database operations including queries, migrations, and schema management with user-provided credentials.9 npm1MIT
- AlicenseAqualityCmaintenanceEnables interaction with MySQL databases (including AWS RDS and cloud instances) through natural language. Supports database connections, query execution, schema inspection, and comprehensive database management operations.816 npm8MIT
- AlicenseAqualityDmaintenanceEnables querying and managing PostgreSQL and MySQL databases through natural language, supporting connection management, query execution, schema inspection, and parameterized queries with connection pooling.57 npm4MIT
- AlicenseAqualityCmaintenanceEnables interaction with MySQL databases (including AWS RDS and cloud instances) through natural language, supporting query execution, schema inspection, index management, and comprehensive database operations with secure SSL connections.82 npmMIT