database-explorer-mcp
Generates Mermaid ER diagrams from database schemas.
Allows AI assistants to explore schemas, run queries, and manage MongoDB databases.
Allows AI assistants to explore schemas, run queries, and manage MySQL databases.
Allows AI assistants to explore schemas, run queries, and manage PostgreSQL databases.
Allows AI assistants to explore schemas, run queries, and manage SQLite 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., "@database-explorer-mcplist all tables in the database"
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.
ποΈ Database Explorer MCP Server
Let AI assistants talk to your databases.
Connect Claude, Cursor, VS Code Copilot, Windsurf β or any MCP-compatible AI β to PostgreSQL, MySQL, SQLite, and MongoDB using natural language.
Features Β· Quick Start Β· Setup Guides Β· Tools Reference Β· Prompts Β· Configuration Β· Contributing
π€ What is this?
This is a Model Context Protocol (MCP) server β a bridge that lets AI assistants interact with your databases directly.
Think of it like this: Instead of you manually writing SQL queries and copy-pasting results to ChatGPT, this server lets the AI connect to your database, explore the schema, run queries, and analyze data β all through natural conversation.
How it works
ββββββββββββββββββββ βββββββββββββββββββββββββββ ββββββββββββββββ
β AI Assistant β MCP β Database Explorer β SQL β Database β
β ββββββββββΊβ MCP Server ββββββββββΊβ β
β Claude Desktop β JSON β β β PostgreSQL β
β Cursor β over β β’ Explores schemas β β MySQL β
β VS Code Copilot β stdio β β’ Runs queries β β SQLite β
β Windsurf β β β’ Generates ERDs β β MongoDB β
β Any MCP client β β β’ Suggests indexes β β β
ββββββββββββββββββββ βββββββββββββββββββββββββββ ββββββββββββββββWho is this for?
Developers who want to query databases using natural language through their AI coding assistant
Data analysts who want AI help exploring and understanding databases
Teams who want to let AI tools safely access their databases (with read-only mode)
Anyone using an MCP-compatible AI tool who works with databases
β οΈ Important: This is NOT a standalone tool
This server requires an MCP-compatible AI client to use. It does NOT have its own UI.
The AI client sends commands to this server, and the server talks to your database. See Setup Guides below.
Related MCP server: MCP Database Manager
β¨ Features
Feature | Description |
π 4 Database Engines | PostgreSQL, MySQL, SQLite, MongoDB |
π Schema Explorer | List tables, describe columns, view indexes, full schema dump |
β‘ Query Execution | Run SQL or MongoDB queries with auto-LIMIT safety |
π SQL Safety | Destructive queries (DROP, INSERT, etc.) blocked by default |
π Table Statistics | Row counts, sizes, index info |
π Query Plans | EXPLAIN queries to debug performance |
π‘ Index Suggestions | Smart recommendations for missing indexes |
π€ Data Export | Export results as CSV or JSON |
πΊοΈ ERD Generator | Generate Mermaid ER diagrams from your schema |
π Data Search | Full-text search across all tables and columns |
π§ 4 AI Prompts | Pre-built templates for common database tasks |
π Multi-Connection | Connect to multiple databases simultaneously |
π Quick Start
1. Clone and build
git clone https://github.com/nandanosql/database-explorer-mcp.git
cd database-explorer-mcp
npm install
npm run build2. Add to your AI tool
Choose your AI tool below and add the configuration:
3. Start using it!
Just talk to your AI naturally:
"Connect to my SQLite database at ~/data/app.db"
"What tables are in this database?"
"Show me the first 10 users ordered by signup date"
"Generate an ER diagram of the schema"
"Any missing indexes I should add?"
π§ Setup with Your AI Tool
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %AppData%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"database-explorer": {
"command": "node",
"args": ["/FULL/PATH/TO/database-explorer-mcp/build/index.js"],
"env": {
"DB_EXPLORER_READONLY": "true"
}
}
}
}Restart Claude Desktop. You'll see the π¨ tools icon showing 13 available tools.
Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"database-explorer": {
"command": "node",
"args": ["/FULL/PATH/TO/database-explorer-mcp/build/index.js"]
}
}
}Restart Cursor. The tools will be available in Composer and Chat.
Create .vscode/mcp.json in your project:
{
"servers": {
"database-explorer": {
"command": "node",
"args": ["/FULL/PATH/TO/database-explorer-mcp/build/index.js"]
}
}
}Enable MCP in VS Code settings, then use Copilot Chat with @mcp to access tools.
Add to your Windsurf MCP configuration:
{
"mcpServers": {
"database-explorer": {
"command": "node",
"args": ["/FULL/PATH/TO/database-explorer-mcp/build/index.js"]
}
}
}This server communicates over stdio using the standard MCP protocol. Any client that supports MCP over stdio can connect:
# The server reads from stdin and writes to stdout
node /path/to/database-explorer-mcp/build/index.jsOr use the MCP Inspector for testing:
npx @modelcontextprotocol/inspector node build/index.jsπ οΈ Tools (13 total)
Connection Management
Tool | Description |
| Connect to PostgreSQL, MySQL, SQLite, or MongoDB |
| Disconnect from a database |
| List all active connections |
Schema Exploration
Tool | Description |
| List all tables/views/collections with row counts |
| Get columns, types, constraints, indexes for a table |
| Full database schema as structured JSON |
| π Generate Mermaid ER diagram from schema |
Querying & Analysis
Tool | Description |
| Execute SQL or MongoDB queries (read-only by default) |
| Get query execution plan |
| π Full-text search across all tables and text columns |
Optimization & Export
Tool | Description |
| Row counts, sizes, index statistics |
| Smart index optimization recommendations |
| Export query results as CSV or JSON |
π§ Built-in Prompts
These prompts appear as suggested starting points in compatible AI clients:
Prompt | What it does |
| Automatically explores and explains the entire database structure |
| Analyzes tables for performance issues and suggests fixes |
| Helps you write a query for a specific task |
| Creates a comprehensive data report on a topic |
π Usage Examples
Connect to a Database
You: Connect to my PostgreSQL database at localhost, database 'myapp', user 'admin', password 'secret'
AI: β
Connected to postgresql database "myapp" with alias "default"Explore Schema
You: What tables are in this database?
AI: Database: myapp (postgresql)
ββββββββββββββββββββββββββββββββββββββββββββββββββ
β’ users [table] β 12,450 rows β 4.2 MB
β’ orders [table] β 89,120 rows β 28.7 MB
β’ products [table] β 2,340 rows β 1.1 MB
...Query Data
You: Show me the top 5 customers by total order value
AI: [runs the query automatically]
customer_name β total_orders β total_value
βββββββββββββββΌβββββββββββββββΌββββββββββββ
Alice Johnson β 47 β $12,450.00
Bob Smith β 38 β $9,870.50
...Generate ERD
You: Generate an ER diagram of the database
AI: [returns Mermaid diagram]erDiagram
users {
int id PK
varchar username "NOT NULL"
varchar email "NOT NULL"
}
orders {
int id PK
int user_id FK
decimal total_amount "NOT NULL"
}
users ||--o{ orders : "user_id"Search Data
You: Find any mentions of "alice" across all tables
AI: π Search results for "alice":
ββββββββββββββββββββββββββββββββββββββββββββββββββ
π users.username β 1 match(es)
β id: 1 | username: alice | email: alice@example.com
π users.email β 1 match(es)
β id: 1 | username: alice | email: alice@example.comSQLite (File-based, no server needed)
You: Connect to the SQLite database at /path/to/mydb.sqliteMongoDB
You: Connect to MongoDB at localhost, database 'myapp'
You: Find all users older than 25βοΈ Configuration
Configure via environment variables in your MCP client config:
Variable | Default | Description |
|
| Block destructive queries by default |
|
| Default row limit for queries |
|
| Maximum allowed row limit |
|
| Query timeout in milliseconds |
Example with Claude Desktop:
{
"mcpServers": {
"database-explorer": {
"command": "node",
"args": ["/path/to/build/index.js"],
"env": {
"DB_EXPLORER_READONLY": "true",
"DB_EXPLORER_MAX_ROWS": "200"
}
}
}
}π Security
Read-only by default β DROP, TRUNCATE, ALTER, INSERT, UPDATE, DELETE are blocked unless
readonly: falseis explicitly passedAuto-LIMIT β SELECT queries automatically get a LIMIT clause (default 100, max 1000)
Query timeout β 30-second timeout prevents runaway queries
No credentials stored β Connection details are in-memory only, never written to disk
Local only β Uses stdio transport, no network exposure
ποΈ Project Structure
src/
βββ index.ts # Entry point (stdio transport + env config)
βββ server.ts # MCP server setup, tool/prompt/resource registration
βββ types.ts # Shared TypeScript interfaces + SQL safety patterns
βββ connection-manager.ts # Connection lifecycle management
βββ connectors/
β βββ base.ts # Abstract connector interface
β βββ postgresql.ts # PostgreSQL (pg driver)
β βββ mysql.ts # MySQL (mysql2 driver)
β βββ sqlite.ts # SQLite (better-sqlite3)
β βββ mongodb.ts # MongoDB (mongodb driver)
βββ tools/
βββ connect.ts # connect/disconnect/list
βββ schema.ts # list_tables/describe_table/get_schema
βββ query.ts # run_query/explain_query + SQL safety
βββ stats.ts # get_table_stats
βββ optimize.ts # suggest_indexes
βββ export.ts # export_data
βββ erd.ts # generate_erd (Mermaid)
βββ search.ts # search_dataπ§ͺ Testing
Integration tests use SQLite (no external database needed):
npm testβ connects to SQLite database
β lists all tables
β describes table with columns and types
β describes table with foreign keys
β gets indexes for a table
β gets full database schema
β runs SELECT query
β runs JOIN query
β runs aggregate query
β runs INSERT query (write mode)
β explains query plan
β gets table stats for all tables
β gets table stats for specific table
β blocks DROP statements
β blocks TRUNCATE statements
β blocks ALTER statements
β blocks INSERT statements
β allows SELECT statements
β allows EXPLAIN statements
β connects via connection manager
β lists connections
β throws on missing connection
β stores server config
23 pass / 0 failπ€ Contributing
Contributions are welcome! Here's how:
Fork this repository
Create a feature branch:
git checkout -b feature/amazing-featureCommit your changes:
git commit -m 'Add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a Pull Request
Ideas for contributions
Add support for more databases (Redis, DynamoDB, ClickHouse)
Add query history tracking
Add schema diff between connections
Improve MongoDB aggregation pipeline support
Add data visualization tools
π License
MIT β see LICENSE for details.
Built with β€οΈ for the AI-assisted development community
If this project helps you, give it a β on GitHub!
Available Tools
13 toolsconnect_databaseB
Connect to a database (PostgreSQL, MySQL, SQLite, or MongoDB). Returns the connection alias for use in subsequent queries.
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Database host (default: localhost) | |
| port | No | Database port | |
| type | Yes | Database type | |
| user | No | Username | |
| alias | No | Connection alias (default: 'default') | |
| database | No | Database name | |
| filepath | No | File path for SQLite databases | |
| password | No | Password | |
| connectionString | No | Full connection URI (overrides individual fields) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden, and it only discloses that an alias is returned. It says nothing about credential handling, whether connecting under an existing alias overwrites it, connection persistence/lifetime, or what happens on auth failure β all material for a tool that takes passwords and connection strings.
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 short sentences, no filler, with the supported engines and the return value front-loaded. Every clause 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?
The lack of an output schema is partly offset because the description names the returned alias. However, for a 9-parameter connection tool handling credentials and multiple engines, it omits connection lifecycle and error behavior, leaving gaps an agent would want filled.
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% and every parameter including defaults and the connectionString override behavior is documented in the schema. The description adds no parameter-level meaning beyond that, so the baseline 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?
States a specific verb and resource (connect to a database) and enumerates the supported engines, so an agent can tell it apart from run_query or list_connections. It does not explicitly contrast itself with sibling tools like disconnect_database, but the purpose is unmistakable.
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 phrase 'for use in subsequent queries' implies this is a prerequisite step before run_query, but the description never states when to use this versus list_connections or how to handle an already-established connection. Usage is implied rather than specified.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_tableC
Get detailed schema info for a specific table/collection, including columns, types, constraints, and indexes.
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table or collection name | |
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not state whether the call is read-only, whether it requires a live connection, whether it fails on unknown tables, or how errors are reported. Only the return content is implied, and even that is not framed behaviorally.
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?
It is a single efficient sentence with the resource and return content front-loaded. It earns its length but does not add structural information beyond one clause.
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 two-parameter read tool with no annotations and no output schema, the description covers what is returned but omits connection handling, error behavior, and its relationship to 'get_schema'. It is minimum viable but incomplete for the sibling context.
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 coverage is 100% and both parameters are documented in the schema (including the connection default). The description adds no syntax, format, or scoping detail beyond saying the table is 'specific', so the baseline 3 is correct.
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 states a specific verb+resource ('Get detailed schema info for a specific table/collection') and enumerates what is returned (columns, types, constraints, indexes). It does not distinguish this tool from the sibling 'get_schema', so sibling differentiation is missing.
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?
There is no explicit when-to-use guidance, no alternatives mentioned, and no exclusions. The sibling 'get_schema' is a plausible alternative but is never referenced, leaving the agent to infer which one applies.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
disconnect_databaseC
Disconnect from a database by its alias.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not say whether disconnecting is idempotent, whether it errors on an unknown alias, what happens to in-flight transactions or result sets, or whether the default connection can be closed.
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 with zero waste, stating verb, resource, and lookup key in order. It is efficiently written, though its brevity is what leaves the behavioral gaps noted above.
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 tool is simple (one optional parameter, no output schema, no nesting), and the schema covers the parameter fully, so the description is minimally sufficient. It still omits any error or side-effect behavior for a state-changing connection operation.
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%: the alias parameter and its default of 'default' are fully documented in the schema. The description only restates that the alias identifies the connection, adding no format or behavior detail 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?
Names a specific verb (disconnect) and resource (database), plus the identifying key (alias). It implicitly contrasts with the sibling connect_database, but never explicitly differentiates itself from list_connections or other connection-management tools.
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?
There is no guidance on when to disconnect, whether it is safe to call while queries are running, or what to do if the alias is unknown. The sibling connect_database is never referenced as the counterpart operation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
explain_queryA
Get the execution plan for a query without running it. Useful for optimizing slow queries.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL query or MongoDB JSON query to explain | |
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the key trait that the query is not executed (safe, non-mutating). However it says nothing about permissions, the format of the returned plan, or how plan shape varies by connection type (SQL vs MongoDB).
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 short sentences with zero waste; the non-execution constraint and the use case are front-loaded, so the agent gets the essential fact immediately.
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 two-parameter read-style tool with no output schema, the description covers purpose and the critical non-execution behavior. It is slightly thin on what the returned plan contains, but an agent has enough to call it correctly.
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% for both parameters, so the schema already explains 'query' and 'connection'. The description adds no syntax or format detail 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?
States a specific verb (get execution plan) and resource (query), and the qualifier 'without running it' cleanly separates it from the sibling run_query. It does not name the sibling explicitly, but the scope is unambiguous.
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?
'Useful for optimizing slow queries' implies the usage context but gives no explicit when-to-use vs when-not, and never names run_query as the alternative for actual execution. The routing signal is inferable but not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
export_dataC
Export query results as CSV or JSON format. Useful for getting data out of the database in a portable format.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows (default: 100, max: 1000) | |
| query | Yes | SQL query or MongoDB JSON query | |
| format | No | Output format (default: csv) | |
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full behavioral burden. It discloses format options and portability but omits critical traits: whether export writes files server-side or returns content, read-only vs mutation, permission requirements, row-limit behavior, and error handling.
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, front-loaded with the action and formats. The second sentence is slightly padding but not harmful, so the definition remains appropriately concise.
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 four-parameter tool with no output schema and no annotations, the description leaves too much unspecified. An agent cannot tell whether export_data returns inline data, a file path, or writes to disk, nor how it relates to run_query.
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 all four parameters are documented in the schema. The description only echoes the CSV/JSON format enum and adds no syntax, default, connection-alias, or limit detail beyond what the schema already provides.
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 (export) and resource (query results) plus supported formats (CSV/JSON). It does not differentiate from sibling run_query, which also executes queries, but the export framing is clear enough to identify the tool's core action.
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 when-to-use, prerequisites, or alternatives are provided. The second sentence is generic and does not tell an agent when to choose export_data over run_query or search_data.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_erdB
Generate an Entity Relationship Diagram (ERD) in Mermaid format from the database schema. The output can be rendered in any Mermaid-compatible viewer. Optionally filter to specific tables.
| Name | Required | Description | Default |
|---|---|---|---|
| tables | No | Specific table names to include (omit for all tables) | |
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden, and it does disclose the output format (Mermaid) and that it can be rendered in any Mermaid-compatible viewer. However, it says nothing about permissions, connection/auth requirements, or behavior on large schemas, leaving gaps given zero annotation coverage.
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 tight sentences with the core purpose front-loaded, followed by useful output-rendering context and the optional filter. Efficient, though the rendering sentence is slightly supplementary rather than essential.
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 low-complexity, read-only generation tool with only two optional params and no output schema, the description covers what is produced and in what format. It lacks context on database connection scope and scale limits, but is otherwise adequate to call the tool correctly.
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 parameters are already documented (tables, connection). The description's 'optionally filter to specific tables' merely restates the tables parameter and adds no syntax or format detail beyond the schema, so the 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?
States a specific verb (Generate) and resource (Entity Relationship Diagram) plus the concrete output format (Mermaid), so an agent immediately grasps what it produces. It doesn't explicitly differentiate itself from siblings like get_schema or describe_table, but the ERD output is inherently distinct.
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 over alternatives such as get_schema or describe_table, nor any prerequisites. The only usage signal is the optional table filter, which is really parameter behavior rather than tool-selection guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_schemaB
Get the complete database schema β all tables, columns, indexes, and relationships as structured JSON.
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does disclose the return format ('structured JSON') and the entity types included, which is useful. However, it says nothing about the likely large payload size of a full schema, the read-only nature, or how the connection parameter affects scope β meaningful gaps for a tool that could return a very large document.
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 front-loads the verb and resource and lists the payload contents. No padding, nothing extraneous.
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?
With no output schema, the description usefully compensates by enumerating what the JSON contains. It is nearly complete for this simple read tool, missing only volume/cost expectations and a pointer to narrower siblings.
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 coverage is 100% and there is only one optional parameter, so the schema already documents 'connection' with its default. The description adds nothing about multi-connection behavior. Baseline 3 is appropriate when the schema does the work.
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+resource ('Get the complete database schema') and enumerates what it contains (tables, columns, indexes, relationships), so the agent knows exactly what comes back. It does not differentiate from overlapping siblings like list_tables or describe_table, which cover a subset of the same information.
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?
There is no guidance on when to call this versus list_tables/describe_table, nor any note about cost or scope conditions. The agent must infer that this is the broad 'whole schema' option from the word 'complete' alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_table_statsB
Get statistics for database tables β row counts, sizes, index counts, and last analysis time.
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | Specific table name (omit for all tables) | |
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It implies a read operation via 'Get' and lists returned metrics, but says nothing about permissions, whether stats come from a cache or a live catalog scan, whether omitting 'table' is costly on a large database, or how fresh the 'last analysis time' is. This is thin for a mutation-free but potentially expensive diagnostic call.
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 with the core purpose stated first and the returned metrics enumerated after. Every clause earns its place with no preamble 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?
There is no output schema, and the description usefully compensates by listing the metrics returned. However, with no annotations either, the definition is silent on the read-only nature, cost, and freshness of the statistics, which an agent calling this against a large database would want to know.
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 the 'table' and 'connection' parameters are already documented in the schema ('omit for all tables', 'default: default'). The description adds no syntax or format detail beyond that, so the 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 gives a specific verb (get) and resource (table statistics) and even enumerates what the statistics contain: row counts, sizes, index counts, last analysis time. This clearly separates it from siblings like describe_table or list_tables, though it never explicitly names what those siblings return to force the distinction.
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?
There is no explicit guidance on when to use this tool versus list_tables, describe_table, or get_schema, and no stated prerequisites or exclusions. Usage is only weakly implied by the phrase 'Get statistics for database tables', leaving the agent to infer the scenario.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_connectionsB
List all active database connections.
| 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 behavioral burden. It discloses only that connections are 'active' (an implicit filter), but says nothing about whether it is read-only, whether authentication is required, what the return shape is, or whether it reflects the current session versus the server globally.
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 short sentence that is front-loaded with the verb and resource, with no wasted words. It is terse to the point of under-specification, but structurally clean.
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 read tool with no output schema, this is only minimally complete: the agent knows what it lists but not what 'connection' scopes to (session vs. server), what it returns, or how it relates to connect_database/disconnect_database. Adequate but with clear gaps.
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 tool takes zero parameters, so per the rubric the baseline is 4. The schema is empty and there is nothing for the description to compensate for.
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 (List) and resource (active database connections), which is unambiguous. However it does not distinguish itself from siblings like connect_database or disconnect_database, which frame the same connection lifecycle, so an agent gets no help disambiguating scope beyond the obvious name.
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 when-to-use guidance at all. It does not say to call this before connect_database to check for existing sessions, nor whether it requires an active connection itself. The agent must infer the purpose from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesB
List all tables, views, or collections in the connected database.
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It correctly conveys that this is a non-mutating enumeration, but says nothing about pagination, filtering, permissions, or what the listing contains (names only vs. metadata). Adequate but thin for a schema-less tool.
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?
One compact sentence that leads with the verb and enumerates the resources. No filler and nothing redundant.
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?
With no output schema and no annotations, the description should say more about what is returned and whether the connection must already exist. For a simple list tool it is close to sufficient, but an agent cannot tell the return shape or failure mode from this text alone.
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% for the single 'connection' parameter, so the schema already documents the alias/default behavior. The description adds only the environmental context ('connected database') and no extra parameter meaning, which matches the baseline 3.
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 ('List') and resource ('tables, views, or collections') plus the scope ('in the connected database'). It distinguishes itself from describe_table and get_schema by being the enumeration tool, though it never names those siblings.
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?
There is no when-to-use guidance, no prerequisites, and no reference to alternatives like describe_table or get_schema. The only usable signal is the implicit need for an existing connection, which the agent must infer from 'connected database'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_queryA
Execute a SQL query (PostgreSQL/MySQL/SQLite) or MongoDB query (JSON format). For SQL databases: provide standard SQL. For MongoDB: provide JSON like {"collection":"users","operation":"find","query":{"age":{"$gt":25}},"options":{"limit":10}}. MongoDB operations: find, aggregate, count, distinct. Results are limited to 100 rows by default (max 1000). By default, destructive queries (DROP, TRUNCATE, INSERT, UPDATE, DELETE) are blocked. Set readonly=false to allow writes.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max rows to return (default: 100, max: 1000) | |
| query | Yes | SQL query or MongoDB JSON query | |
| readonly | No | Block destructive queries (default: true). Set to false to allow writes. | |
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it discloses the default row cap (100), the hard max (1000), which operations are blocked by default (DROP/TRUNCATE/INSERT/UPDATE/DELETE), and the exact flag that unlocks writes. It stops short of describing permissions needed or what a write returns.
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?
Front-loaded with the core action, then organized by dialect, then limits, then safety default. Every sentence carries distinct information and the inline JSON example is the most efficient way to convey the Mongo format.
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?
Covers dialect formats, result-size limits, and the destructive-query safety model for a 4-parameter tool with no annotations and no output schema. Minor gaps remain around error behavior and whether writes return affected-row counts, but the operational essentials are present.
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 coverage is already 100%, so the baseline is 3, but the description adds real meaning beyond the schema: a concrete MongoDB JSON shape with collection/operation/query/options keys and the list of supported Mongo operations. That goes beyond the schema's terse 'SQL query or MongoDB JSON query'.
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 (Execute) and resource (SQL / MongoDB query) and immediately scopes the two supported dialects with format examples. An agent can distinguish this from siblings like explain_query, search_data, and export_data without opening any schema.
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 gives a clear condition for the readonly flag ('by default destructive queries are blocked; set readonly=false to allow writes'), which is useful usage guidance. However, it never routes the agent to alternatives such as explain_query for plan inspection or search_data for filtering, and no when-not-to-use case is stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_dataB
Search for a value across all (or specific) tables and text columns. Useful for finding where specific data lives in the database.
| Name | Required | Description | Default |
|---|---|---|---|
| tables | No | Specific tables to search (omit for all tables) | |
| connection | No | Connection alias (default: 'default') | |
| searchTerm | Yes | The value to search for | |
| caseSensitive | No | Case-sensitive search (default: false) | |
| maxResultsPerTable | No | Max results per table (default: 5) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It says nothing about whether this is a read-only operation, whether it scans full tables (performance implications), default result limits beyond what the schema states, or connection requirements. The schema supplies parameter defaults, but overall behavioral context is thin.
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, front-loaded with the action and scope, then the intent. Efficient with little waste, though the second sentence is somewhat redundant with the first.
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 read-oriented search tool with no annotations and no output schema, the description is minimal. It omits return format (does it return matching rows, counts, locations?), performance expectations, and any caveats about scanning all tables. Parameter-side completeness is fine thanks to the 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?
Schema description coverage is 100%, so all five parameters are documented in the schema itself, including defaults for caseSensitive and maxResultsPerTable. The description adds no syntax or format detail beyond that, so baseline 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?
States a clear verb (search) and resource scope (across tables and text columns), and the second sentence clarifies the intent: locating where data lives. It is distinguishable from siblings like run_query and list_tables, though it doesn't explicitly name 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?
Implies usage via 'finding where specific data lives,' giving a use case, but offers no explicit when-to-use vs. run_query, no exclusions, and no stated limitations (e.g., performance, read-only). Adequate but with a clear gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
suggest_indexesB
Analyze a table's columns and existing indexes, then suggest potentially missing indexes based on column patterns (foreign keys, common query patterns).
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name to analyze | |
| connection | No | Connection alias (default: 'default') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does disclose the analysis method (column patterns, foreign keys, query patterns), which implies a read-only advisory operation, but it never states that the database is not modified, what permissions are needed, or how results are returned.
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 front-loads the action ('Analyze a table's columns and existing indexes') before the outcome. Every clause earns its place with no filler.
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 read-only analysis tool with no annotations and no output schema, the description covers what it does but leaves the response shape (e.g., a list of suggested indexes with rationale) and the non-mutating guarantee unspecified. Adequate but with clear gaps.
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 coverage is 100% and both parameters ('table', 'connection') are documented in the schema, so the description adds no parameter-level detail beyond what is already structured. Baseline 3 is appropriate here.
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+resource ('suggest... indexes' on a table) and enumerates the analysis basis (columns, existing indexes, foreign keys, common query patterns). An agent can distinguish this advisory tool from describe_table/get_schema, though no sibling is explicitly named.
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?
There is no when-to-use guidance, no prerequisites, and no routing away from related tools like describe_table or get_table_stats. The usage context can only be inferred from the purpose statement.
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.
13 tool updates
v1.1.0- First observed
connect_database - First observed
describe_table - First observed
disconnect_database - First observed
explain_query - First observed
export_data - First observed
generate_erd - First observed
get_schema - First observed
get_table_stats - First observed
list_connections - First observed
list_tables - First observed
run_query - First observed
search_data - First observed
suggest_indexes
TDQS
Scored across 13 tools
The set is mostly distinct: connection management, schema listing/description, querying, explaining, searching, stats, index suggestions, ERD, and export each have separate roles. Minor overlap exists between get_schema and list_tables/describe_table as aggregate vs granular schema tools, and export_data's relationship to run_query results is slightly unclear.
All 13 tools use snake_case and follow a predictable verb_noun or verb_resource pattern (e.g., list_tables, describe_table, run_query). No casing or style inconsistencies are present.
13 tools is well-scoped for a database exploration server, covering connections, schema, queries, and analysis without excessive surface area. Each tool appears to earn its place.
The surface covers connection lifecycle, schema discovery, query execution, explain plans, search, stats, index advice, ERD generation, and export. Minor gaps may exist (e.g., no explicit list_databases or transaction control), but agents can work around them via run_query and existing tools.
Maintenance
Related MCP Connectors
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
- OleanderOAuthdev.oleander
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
- busabaseOAuthcom.busabase
Database for your AI agent. Turn its output into data, docs, skills, and apps you can actually use.
Query PostgreSQL databases in plain English β LLM-generated, safety-validated SQL.
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
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with and manage multiple database types (PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, Redis) through natural language, supporting query analysis, schema management, data analysis, backup/restore, and security analysis.7 npm2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to query databases using natural language, with automatic schema discovery and SQL compilation.483 npm3,165Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with PostgreSQL databases through natural language queries, schema inspection, and safe SQL execution.7 npm1-