database-explorer-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_EXPLORER_MAX_ROWS | No | Default row limit for queries | 100 |
| DB_EXPLORER_READONLY | No | Block destructive queries by default | true |
| DB_EXPLORER_TIMEOUT_MS | No | Query timeout in milliseconds | 30000 |
| DB_EXPLORER_MAX_ROW_LIMIT | No | Maximum allowed row limit | 1000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connect_databaseB | Connect to a database (PostgreSQL, MySQL, SQLite, or MongoDB). Returns the connection alias for use in subsequent queries. |
| disconnect_databaseC | Disconnect from a database by its alias. |
| list_connectionsB | List all active database connections. |
| list_tablesB | List all tables, views, or collections in the connected database. |
| describe_tableC | Get detailed schema info for a specific table/collection, including columns, types, constraints, and indexes. |
| get_schemaB | Get the complete database schema — all tables, columns, indexes, and relationships as structured JSON. |
| 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. |
| explain_queryA | Get the execution plan for a query without running it. Useful for optimizing slow queries. |
| get_table_statsB | Get statistics for database tables — row counts, sizes, index counts, and last analysis time. |
| suggest_indexesB | Analyze a table's columns and existing indexes, then suggest potentially missing indexes based on column patterns (foreign keys, common query patterns). |
| export_dataC | Export query results as CSV or JSON format. Useful for getting data out of the database in a portable format. |
| 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. |
| search_dataB | Search for a value across all (or specific) tables and text columns. Useful for finding where specific data lives in the database. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| explore_database | Explore and understand a database — structure, tables, relationships, and data distribution |
| optimize_performance | Analyze database performance — find missing indexes, slow query patterns, and optimization opportunities |
| write_query | Get help writing a SQL/MongoDB query for a specific task |
| generate_report | Generate a data report from the database on a specific topic |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| connections | List of active database connections |
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.