Skip to main content
Glama
vinycoolguy2015

Database Assistant MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MODELNoLLM model IDbedrock.claude-sonnet-4-6
DB_HOSTYesDatabase hostname or RDS endpoint
DB_NAMEYesDatabase name
DB_PORTNoDatabase port5432
DB_TYPENopostgresql or mysqlpostgresql
DB_USERYesDatabase user (use a read-only user)
MAX_ROWSNoMaximum rows returned per query1000
DB_PASSWORDYesDatabase password
QUERY_TIMEOUTNoMax query execution time (seconds)10
CSV_EXPORT_DIRNoDirectory for CSV exports/tmp/db_exports
OPENAI_API_KEYNoLLM API key (for generate_sql)
ALLOWED_SCHEMASNoComma-separated schema allowlist
OPENAI_BASE_URLNoLLM API endpoint (for generate_sql)

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

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

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List all available databases on the connected server.

list_schemasA

List all schemas in the connected database. For PostgreSQL returns schema names, for MySQL returns databases.

list_tablesA

List all tables in a schema with their types (BASE TABLE or VIEW) and approximate row counts.

describe_tableA

Get detailed table information: columns (name, type, nullable, default), constraints (PK, FK, unique), and indexes.

describe_relationshipsA

Show foreign key relationships for a table: both outgoing (this table references others) and incoming (others reference this table).

sample_dataA

Get a quick preview of data in a table. Returns the first N rows to help understand data format and contents.

validate_sqlA

Check if a SQL query is safe to execute. Validates that it is read-only, single-statement, and contains no dangerous operations. Use before run_sql to preview validation.

run_sqlA

Execute a read-only SQL query. The query is validated for safety before execution. Supports pagination (100 rows per page). Returns columns, rows, row count, and execution time.

explain_queryA

Run EXPLAIN ANALYZE on a SQL query to show the execution plan. Helps understand performance characteristics like index usage, sequential scans, and estimated costs.

generate_sqlA

Generate a SQL query from a natural language question. Uses the database schema as context and an LLM to produce a valid SELECT query. The generated query is validated for safety.

export_csvA

Execute a SQL query and export results as a CSV file. The query is validated for safety. Returns the file path of the generated CSV.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 11 tools

Disambiguation5/5

Each tool has a clearly distinct purpose covering schema browsing, querying, validation, and export. There is no overlap or ambiguity between tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case, making them predictable and easy to navigate.

Tool Count5/5

11 tools provide comprehensive coverage for database exploration and safe querying without being excessive or sparse.

Completeness4/5

Covers essential CRUD-like operations for a read-only assistant, but lacks a direct row count tool and alternative export formats like JSON.

Maintenance

ActivityStale
ResponsivenessNo issues