Skip to main content
Glama
sql-server-mcp

sql-server-mcp

by ahaugerud

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_MAX_ROWSNoMax rows returned per tool call (default: 25)25
MCP_SQL_PASSWORDNoSQL login password. Must be set together with `MCP_SQL_USERNAME`
MCP_SQL_USERNAMENoSQL login username. If set, the server uses username + password authentication instead of Entra ID (and `MCP_AZURE_TENANT_ID` is not needed)
MCP_SQL_LEGACY_TLSNoSet to `true` for old SQL Server hosts (e.g. SQL Server 2012) that reset the connection during the TLS handshake (`TCP Provider: Error code 0x2746`). Lowers OpenSSL's security level to 0 for this process (and its child processes), so it requires SQL login and is best avoided elsewhere. Default: `false`false
MCP_AZURE_TENANT_IDNoThe Entra ID tenant ID — pins auth to this directory even if your machine has other `az login` sessions active
MCP_SQL_SERVER_NAMEYesSQL Server / Fabric SQL endpoint hostname, e.g. `xyz-xyz.datawarehouse.fabric.microsoft.com`
MCP_SQL_DATABASE_NAMEYesDefault database to connect to
MCP_SQL_TRUST_SERVER_CERTIFICATENoSet to `true` to skip server certificate validation (needed for servers with self-signed or otherwise untrusted certificates, e.g. older on-prem SQL Server). Default: `false`false

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": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
queryA

Execute a single read-only SELECT statement. Returns at most 25 rows. Table references must be fully qualified as database.schema.table - there is no mutable 'active database'.

list_databasesA

List all user databases with status and metadata. Returns at most 25 rows.

search_schemaB

Search table or column metadata across databases via INFORMATION_SCHEMA. Omit databases to search every database on the server. Returns at most 25 rows.

export_queryA

Execute a single read-only SELECT statement and write the full, uncapped result to a local Parquet or CSV file instead of returning it. Use this instead of query for large results or when the output will be processed by other local tools.

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

Disambiguation5/5

Each tool has a clearly distinct purpose: `query` for capped inline SELECTs, `export_query` for uncapped file output, `list_databases` for database enumeration, and `search_schema` for metadata lookup. The `query` vs `export_query` overlap is explicitly resolved by the description telling agents to prefer `export_query` for large results.

Naming Consistency4/5

Three tools follow a clear verb_noun pattern (`list_databases`, `search_schema`, `export_query`), while `query` is a bare verb/noun that slightly breaks the pattern. The deviation is minor and still readable in context.

Tool Count5/5

Four tools is well-scoped for a read-only SQL server interface, with each tool covering a distinct essential workflow: querying, exporting, listing databases, and searching schema metadata. Nothing feels redundant or missing at the count level.

Completeness4/5

The surface covers core read-only workflows well, including capped queries, large exports, database listing, and schema discovery via INFORMATION_SCHEMA. Minor gaps exist around dedicated table listing or describe-table convenience tools, but `search_schema` provides a workable path for those needs.

Maintenance

ActivityMaintained
ResponsivenessOutdated data