MSSQL-MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_FILE | No | Path for the JSON-lines audit log | |
| MAX_ROWS | No | Row cap; results are truncated and flagged | 1000 |
| MSSQL_HOST | Yes | Server IP or hostname | |
| MSSQL_PORT | No | TCP port | 1433 |
| MSSQL_USER | Yes | SQL auth user name (must be read-only) | |
| MSSQL_ENCRYPT | No | TLS encryption | true |
| ALLOWED_TABLES | No | Comma-separated table allowlist, e.g. dbo.Customers,dbo.Orders | |
| MSSQL_DATABASE | Yes | Database name | |
| MSSQL_PASSWORD | Yes | Password (never logged) | |
| MSSQL_TRUST_CERT | No | Accept self-signed certificates | false |
| QUERY_TIMEOUT_MS | No | Per-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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
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.
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.
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.
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.