M

MCP Mssql

by alyiox · io.github.alyiox/mcp-mssql

A read-only-by-default Model Context Protocol (MCP) server for Microsoft SQL Server with schema discovery, SELECT-only queries, execution-plan analysis, and opt-in writes per profile. Profile-based configuration serves multiple databases and servers from one toolset deployment.

nuget Local · stdio GlamaOfficial MCP Registry High confidence

Install

No install method is published for this server: no package and no remote endpoint. Check its source repository or registry listing for setup instructions.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
MCPMSSQL_CONNECTION_STRING secret Yes Required connection string for SQL Server (e.g., Server=127.0.0.1;User ID=sa;Password=<YourStrong@Passw0rd>;Encrypt=True;TrustServerCertificate=True;)
MCPMSSQL_DESCRIPTION No Optional description for the default profile (tooling/AI discovery)
MCPMSSQL_QUERY_MAX_ROWS No Optional max rows per interactive query (default 500; hard ceiling 1000)
MCPMSSQL_QUERY_COMMAND_TIMEOUT_SECONDS No Optional query timeout in seconds (default 30)
MCPMSSQL_QUERY_SNAPSHOT_MAX_ROWS No Optional max rows for snapshot queries (default 10000; hard ceiling 50000)
MCPMSSQL_QUERY_SNAPSHOT_COMMAND_TIMEOUT_SECONDS No Optional snapshot query timeout in seconds (default 120)
MCPMSSQL_ANALYZE_COMMAND_TIMEOUT_SECONDS No Optional analyze timeout in seconds (default 300)
MCPMSSQL_ALLOW_WRITE No Enable write commands (DDL/DML) via run_command on the default profile (default false). With no write-enabled profile the tool is not advertised at all. Soft guard only — prefer a db_datareader login for a hard read-only guarantee.
MCPMSSQL_WRITE_COMMAND_TIMEOUT_SECONDS No Write command timeout in seconds (default 60; ceiling 600).
DOTNET_ENVIRONMENT No Set to Development to load dotnet user-secrets (local dev).

Similar servers