db-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DB_URL | No | MongoDB connection URL (e.g., mongodb://...). Required for MongoDB. | |
| DB_HOST | No | Database host (MySQL/PostgreSQL). | localhost |
| DB_MODE | No | Database access mode. | read-only |
| DB_PATH | No | Path to SQLite database file. Required for SQLite. | |
| DB_PORT | No | Database port (MySQL/PostgreSQL). | 3306 for MySQL, 5432 for PostgreSQL |
| DB_TYPE | No | Database type. Must be 'mysql', 'postgresql', 'mongodb', or 'sqlite'. | |
| DB_USER | No | Database user (MySQL/PostgreSQL). | root for MySQL, postgres for PostgreSQL |
| SSH_KEY | No | Path to SSH private key (e.g., ~/.ssh/id_rsa). | |
| SSH_HOST | No | SSH bastion host. Activates SSH tunnel (not supported for MongoDB). | |
| SSH_PORT | No | SSH port. | 22 |
| SSH_USER | No | SSH username. Defaults to current OS user. | |
| DB_DATABASE | No | Database name. | |
| DB_PASSWORD | No | Database password (required for MySQL and PostgreSQL). | |
| SSH_PASSWORD | No | SSH password (used if no key provided). |
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 |
|---|---|
| queryA | Execute a read-only query on the SQLite database. Only SELECT, SHOW, DESCRIBE, EXPLAIN, WITH are allowed on read-only databases. |
| executeB | Execute a write query on the SQLite database. Only works if the database is configured with mode='read-write'. |
| describeA | Describe the structure of a SQLite table (PRAGMA table_info). |
| list_tablesA | List all tables in the SQLite database. |
| statusA | Show connection info: type, host, database, mode, status. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
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/stucchi/db-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server