Skip to main content
Glama
SQL Query MCP Server

SQL Query MCP Server

by Tolosa527

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_HOSTYesDatabase host. Use host.docker.internal for Docker to access the host machine.
DB_NAMEYesDatabase name.
DB_PORTYesDatabase port. Defaults vary by database: MSSQL 1433, MySQL 3306, PostgreSQL 5432.
DB_TYPEYesDatabase type. Options: mssql, mysql, postgres.
DB_USERYesDatabase username.
DB_ENCRYPTNoSet to true for Azure SQL.false
DB_PASSWORDYesDatabase password.

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
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_select_queryB

Execute a SELECT query on the database. Only SELECT queries are allowed for security. Returns the query results with rows and column information.

get_database_schemaB

Get the complete database schema including all tables and columns with their data types

list_tablesA

List all tables in the database

get_table_relationshipsA

Get foreign key relationships between tables. Shows which columns reference other tables, useful for understanding how to join tables and create complex queries.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation4/5

Each tool has a distinct action: running queries, fetching full schema, listing table names, and fetching foreign-key relationships. There is mild redundancy since list_tables and get_table_relationships return subsets of what get_database_schema already covers, but the descriptions make the intended use of each clear.

Naming Consistency5/5

All four tools follow a clean verb_noun pattern (execute_select_query, get_database_schema, list_tables, get_table_relationships) with consistent snake_case and imperative verbs.

Tool Count4/5

Four tools is on the thin side but appropriate for a deliberately narrow, read-only query server where each tool covers a distinct introspection or execution need. Slight overlap suggests one could be trimmed, but nothing is bloated.

Completeness4/5

The core read-only workflow — discover tables, inspect schema and joins, then run SELECTs — is fully covered with no dead ends. Minor gaps like explain_query, sample-row previews, or column search exist but are workarounds via execute_select_query.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues