Skip to main content
Glama
esasiyun17

MSSQL-MCP

by esasiyun17

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_FILENoPath for the JSON-lines audit log
MAX_ROWSNoRow cap; results are truncated and flagged1000
MSSQL_HOSTYesServer IP or hostname
MSSQL_PORTNoTCP port1433
MSSQL_USERYesSQL auth user name (must be read-only)
MSSQL_ENCRYPTNoTLS encryptiontrue
ALLOWED_TABLESNoComma-separated table allowlist, e.g. dbo.Customers,dbo.Orders
MSSQL_DATABASEYesDatabase name
MSSQL_PASSWORDYesPassword (never logged)
MSSQL_TRUST_CERTNoAccept self-signed certificatesfalse
QUERY_TIMEOUT_MSNoPer-query timeout (ms)30000

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
}

Tools

Functions exposed to the LLM to take actions

NameDescription
verify_connectionA

Verify the database connection and report the read-only verification result: which checks ran (server roles, database roles, effective permissions), which passed, and any write privileges that were detected. Use this to diagnose why the server refuses to expose query tools.

list_tablesA

List all tables in the database as schema.table with approximate row counts (taken from sys.partitions metadata — no COUNT(*) is executed). If a table allowlist is configured, only allowed tables are returned.

describe_tableA

Describe a table: columns (name, type, nullability, identity), primary key, foreign keys and indexes, read from INFORMATION_SCHEMA / sys catalog views. Accepts "Table" or "schema.Table". Subject to the table allowlist if configured.

sample_rowsA

Return the first N rows of a table (default 5, maximum 50) to inspect its content. Accepts "Table" or "schema.Table". Subject to the table allowlist if configured.

run_queryA

Execute a single read-only SELECT statement (WITH/CTE supported) against the database. Every query is validated first: exactly one statement, SELECT-only, no write/exec keywords, optional table allowlist. Results are truncated at the configured MAX_ROWS (reported via the "truncated" flag) and a query timeout applies. Rejected queries name the exact rule that was violated.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a unique aspect: connection verification, table listing, schema description, row sampling, and arbitrary SELECT queries. The boundaries are clear, with no overlapping purposes that could cause misselection.

Naming Consistency5/5

All five tools use a consistent snake_case verb_noun pattern (verify_connection, list_tables, describe_table, sample_rows, run_query). The naming is predictable and readable.

Tool Count5/5

Five tools is well-scoped for a read-only MSSQL query interface. It covers connection diagnostics, metadata discovery, data sampling, and custom queries without bloat.

Completeness4/5

The surface covers the core read-only workflow: verify, list, describe, sample, and query. Minor gaps exist, such as no explicit tools for listing schemas, views, or stored procedures, though run_query can retrieve such metadata.

Maintenance

ActivityStale
ResponsivenessNo issues