mssql-readonly-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_ROWS | No | Maximum number of rows returned. Defaults to 100. | 100 |
| MSSQL_HOST | Yes | SQL Server host. | |
| MSSQL_PORT | No | SQL Server port. Defaults to 1433. | |
| MSSQL_USER | Yes | SQL Server login/user for the read-only connection. | |
| AUDIT_LOG_PATH | Yes | Path to the JSON-lines audit log. | |
| MSSQL_DATABASE | Yes | Database name, for example HrDemo. | |
| MSSQL_PASSWORD | Yes | Password for the SQL Server login. | |
| QUERY_TIMEOUT_MS | No | Query timeout in milliseconds. Defaults to 10000. | 10000 |
| MSSQL_TRUST_SERVER_CERTIFICATE | No | Set to false unless the server uses a self-signed certificate. |
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 |
|---|---|
| list_tablesA | List the tables and views this login can read. |
| describe_tableA | Columns of one table: type, nullability, primary/foreign keys and what each foreign key points to. |
| run_queryA | Run one read-only T-SQL SELECT (CTEs allowed). Anything else is rejected. Results are capped at the server row limit; "truncated": true means there were more rows, so aggregate or filter instead of paging. |
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 3 tools
Each tool occupies a clearly distinct step of a read-only SQL workflow: discover tables, inspect a table's schema, then query. There is no overlap in purpose and the descriptions make the boundaries explicit (describe_table is for structure, run_query only for SELECTs).
All three names follow the same verb_noun snake_case pattern (list_tables, describe_table, run_query). The verbs are precise and consistently chosen for the operation type.
Three tools is exactly right for a narrow read-only database surface; each earns its place and nothing extraneous is included. The minimal surface also reinforces the read-only safety goal.
The core discovery-and-query loop is fully covered, but there is no way to enumerate schemas/databases or see indexes, views' definitions, or row estimates, which can matter on larger MSSQL instances. Agents can work around most of this via run_query against system catalogs, so gaps are minor.