mcp-db-explorer
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_TYPE | No | Database engine type (sqlite, postgres, postgresql). Alternative environment variable: MCP_DB_TYPE. | |
| MCP_DB_TYPE | No | Alternative environment variable for database engine type. | |
| ALLOW_WRITES | No | Enable write operations (DML/DDL queries). Default is false. | |
| DATABASE_URL | No | Database connection string. Alternative environment variable: MCP_DB_CONNECTION_STRING. | |
| ALLOWED_DATABASE_DIR | No | Restricts SQLite database paths to be inside this directory. | |
| MCP_DB_CONNECTION_STRING | No | Alternative environment variable for database connection string. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| connect_databaseA | Connect to a SQLite or PostgreSQL database. For SQLite, connection_string can be a file path (e.g. 'dev.db') or ':memory:'. For Postgres, connection_string must be a valid PostgreSQL connection URI. Resolves relative paths for SQLite databases against the current working directory. |
| list_tablesA | List all table names and their descriptions in the connected database. |
| describe_tableA | Retrieve table columns, data types, primary key status, foreign keys, indexes, and a sample of 5 rows. |
| run_queryA | Execute a SQL query against the database. Checked for safety. Read-only SELECT by default. |
| explain_query_planB | Run EXPLAIN on a SQL query to inspect the database execution path. |
| get_table_statsA | Profile a table to compute row count, null rates, cardinality, and numeric ranges (min/max/average). |
| generate_erdB | Generate a Mermaid.js Entity Relationship Diagram (ERD) based on tables and foreign keys. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| analyze-schema | Help analyze the current database schema, suggest insights, and propose analytical questions. |
| suggest-sql | Translate a natural language question into a safe and optimized SQL query based on the schema. |
| optimize-query | Analyze a SQL query and its EXPLAIN query plan to suggest optimizations and missing indexes. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/arman1o1/mcp-db-explorer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server