db-access-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AWS_REGION | No | Default AWS region. | |
| VAULT_ADDR | No | Address of the Vault server (used by implicit default client). | |
| AWS_PROFILE | No | Default AWS profile for AWS Secrets Manager and SSM. | |
| VAULT_TOKEN | No | Vault token (used by implicit default client). | |
| VAULT_NAMESPACE | No | Vault namespace (used by implicit default client). | |
| DB_ACCESS_MCP_CONFIG | No | Path to a single config file (disables conf.d scanning). | |
| DB_ACCESS_MCP_WORKDIR | No | Working directory for config, state, and exports. | ~/.db_acess_mcp |
| DB_ACCESS_MCP_EXPORTDIR | No | Directory for query_to_file exports. | ~/db_access_mcp/exports |
| DB_ACCESS_MCP_LOG_LEVEL | No | Logging level. | info |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| dialect_listA | List the database dialects this server supports. Returns each dialect name (usable as the "type" field of a connection in the config), its default port and the execution-plan format produced by query_plan. |
| connection_listA | List configured database connections (postgres, mysql, redshift). Returns key, type, description, read_only flag, host/port/database and metadata. Credentials are never included. Use the returned key with the query, query_plan and up_tunnel tools. |
| connection_findA | Find configured database connections by parameters: host, port, database, type, read_only and/or metadata key-value pairs. All provided filters are combined with AND. Username/password filters are ignored. Returns the same sanitized shape as connection_list. |
| connection_testA | Test a configured connection end-to-end: resolves secrets, opens the tunnel if configured, connects and runs a one-row server-info query. Returns ok=true with server version, user, database and latency — or ok=false with the failure code and hint (an unreachable database is a valid test result, not a tool error). |
| queryA | Execute a SQL query on a configured connection (use connection_list to discover keys). Results are truncated to max_rows (default from config, typically 1000) with truncated=true set; add LIMIT for large tables. Connections marked read_only reject writes at the session level. Multi-statement scripts are passed to the driver as-is (for mysql they require multipleStatements enabled in the connection options). |
| query_to_fileA | Execute a SQL query and write the full result to a file (csv or jsonl) instead of returning rows — use this for large exports that must not go through the model context. Relative file_path resolves under the export dir (default /tmp/db-access-mcp/exports); absolute or ~-prefixed paths must fall under the export dir or a configured allow_export_paths root. Parent directories are created. Existing files are not overwritten unless overwrite=true. postgres/mysql stream rows (no row limit by default); redshift/mssql buffer in memory and are capped at 100000 rows. |
| query_planA | Get the execution plan (EXPLAIN) for a SQL query without running it. postgres/mysql return a JSON plan; redshift returns a text plan (Redshift supports neither FORMAT JSON nor EXPLAIN ANALYZE, and its cost numbers are relative — do not compare them to postgres costs). |
| up_tunnelA | Open (or reuse) the tunnel configured for a connection WITHOUT connecting to the database. Returns the local host/port to connect through and a tunnel_id for down_tunnel. The tunnel is closed by down_tunnel, on idle timeout or when this MCP instance exits. Pass local_port to bind an exact local port; this fails if the tunnel is already open on a different port or the port is taken. |
| down_tunnelA | Close a tunnel previously opened with up_tunnel, by its tunnel_id. By default only the up_tunnel pin is released: if live connection pools still use the tunnel it stays open and their keys are returned in remaining_holders. With force=true the holder pools are drained and the tunnel is closed unconditionally (the next query recreates them). |
| tunnel_listA | List the tunnels currently open in THIS MCP instance, with a live health probe each. tunnel_id is accepted by down_tunnel; "connections" are the pools holding the tunnel, "pins" are up_tunnel holds. Configured-but-not-open tunnels are visible via connection_list (the tunnel field). |
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Rheopyrin/db-access-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server