Skip to main content
Glama
stucchi

db-mcp-server

by stucchi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_URLNoMongoDB connection URL (e.g., mongodb://...). Required for MongoDB.
DB_HOSTNoDatabase host (MySQL/PostgreSQL).localhost
DB_MODENoDatabase access mode.read-only
DB_PATHNoPath to SQLite database file. Required for SQLite.
DB_PORTNoDatabase port (MySQL/PostgreSQL).3306 for MySQL, 5432 for PostgreSQL
DB_TYPENoDatabase type. Must be 'mysql', 'postgresql', 'mongodb', or 'sqlite'.
DB_USERNoDatabase user (MySQL/PostgreSQL).root for MySQL, postgres for PostgreSQL
SSH_KEYNoPath to SSH private key (e.g., ~/.ssh/id_rsa).
SSH_HOSTNoSSH bastion host. Activates SSH tunnel (not supported for MongoDB).
SSH_PORTNoSSH port.22
SSH_USERNoSSH username. Defaults to current OS user.
DB_DATABASENoDatabase name.
DB_PASSWORDNoDatabase password (required for MySQL and PostgreSQL).
SSH_PASSWORDNoSSH password (used if no key provided).

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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