Skip to main content
Glama
mssql-readonly-mcp

mssql-readonly-mcp

by riyama46

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MAX_ROWSNoMaximum number of rows returned. Defaults to 100.100
MSSQL_HOSTYesSQL Server host.
MSSQL_PORTNoSQL Server port. Defaults to 1433.
MSSQL_USERYesSQL Server login/user for the read-only connection.
AUDIT_LOG_PATHYesPath to the JSON-lines audit log.
MSSQL_DATABASEYesDatabase name, for example HrDemo.
MSSQL_PASSWORDYesPassword for the SQL Server login.
QUERY_TIMEOUT_MSNoQuery timeout in milliseconds. Defaults to 10000.10000
MSSQL_TRUST_SERVER_CERTIFICATENoSet 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

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).

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues