mssql-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MSSQL_LOG | No | Set to true to enable logging to mssql-mcp/mcp.log. | false |
| MSSQL_PORT | No | The TCP port for SQL Server. | 1433 |
| MSSQL_USER | Yes | The SQL Server authentication login name. | |
| MSSQL_SERVER | Yes | The SQL Server hostname, FQDN, or IP address. For named instances, use HOST\INSTANCE. | |
| MSSQL_ENCRYPT | No | Encrypt connection. Keep true for remote server. | true |
| MSSQL_LOG_MAX | No | Maximum characters per log entry before truncation. | 20000 |
| MSSQL_DATABASE | Yes | The default database to connect to. | |
| MSSQL_LOG_FILE | No | Custom path for log file. | |
| MSSQL_PASSWORD | Yes | The password for the login. | |
| MSSQL_RATE_MAX | No | Maximum requests per window. 0 disables. | 0 |
| MSSQL_READONLY | No | If true, only SELECT and WITH are allowed. | true |
| MSSQL_MAX_CONCURRENT | No | Maximum concurrent queries. 0 disables. | 0 |
| MSSQL_RATE_WINDOW_MS | No | Window in milliseconds for rate limiting. | 1000 |
| MSSQL_TRUST_SERVER_CERT | No | Set to true only when server uses self-signed certificate. | 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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| queryA | Execute a single SELECT query against SQL Server and return rows as JSON. Read-only: only SELECT / WITH statements are permitted. Rate limit: 30 requests per 60s, 4 concurrent; exceeding it returns an error with a retry time, so pace your calls. |
| analyze_queryA | Execute a SELECT under SET STATISTICS XML/IO/TIME and return structured performance data: per-operator estimated vs actual rows, logical/physical reads, statement timing, missing-index suggestions, and plan warnings. Use this to explain why a query is slow. Rate limit: 30 requests per 60s, 4 concurrent; exceeding it returns an error with a retry time, so pace your calls. |
| list_tablesA | List tables and views in the current database (INFORMATION_SCHEMA). |
| describe_tableA | Return columns, types, nullability and defaults for a table. |
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 4 tools
Each tool has a clearly distinct purpose: query returns result rows, analyze_query returns performance metrics, list_tables enumerates tables/views, and describe_table returns column details. There is no overlap or ambiguity.
Three tools follow the verb_noun pattern (analyze_query, list_tables, describe_table), while 'query' is a bare noun/verb, breaking the pattern slightly. All names use lowercase with underscores, so this minor deviation is acceptable.
With only four tools, the server is well-scoped for a read-only SQL Server MCP. This count is squarely within the ideal 3-15 range and each tool earns its place.
The toolset covers data querying, query performance analysis, table enumeration, and schema inspection, which is solid for a read-only database server. Minor gaps like listing databases or schemas are not essential for the core workflow.