Microsoft SQL Server MCP Server

Read-only-by-default SQL Server: schema, parameterized SELECT, execution plans; writes opt-in.

Local serverstdio

What is the Microsoft SQL Server MCP Server?

Microsoft SQL Server is an MCP integration. Read-only-by-default SQL Server: schema, parameterized SELECT, execution plans; writes opt-in.

Packages and local setup

The published nuget package is Alyio.McpMssql, version 1.6.1. Its declared MCP transport is stdio.

The package declares MCPMSSQL_CONNECTION_STRING: Default profile SQL Server connection string (often contains secrets). Optional if profiles are only in user appsettings.; MCPMSSQL_DESCRIPTION: Optional human-readable description for the default profile.; MCPMSSQL_QUERY_MAX_ROWS: Max rows per interactive query (default 500; ceiling 1000).; MCPMSSQL_QUERY_COMMAND_TIMEOUT_SECONDS: Interactive query command timeout in seconds (default 30).; MCPMSSQL_QUERY_SNAPSHOT_MAX_ROWS: Max rows for snapshot queries (default 10000; ceiling 50000).; MCPMSSQL_QUERY_SNAPSHOT_COMMAND_TIMEOUT_SECONDS: Snapshot query timeout in seconds (default 120).; MCPMSSQL_ANALYZE_COMMAND_TIMEOUT_SECONDS: Execution plan analysis timeout in seconds (default 300; ceiling 600).; MCPMSSQL_ALLOW_WRITE: 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: Write command timeout in seconds (default 60; ceiling 600).; DOTNET_ENVIRONMENT: Set to Development to load dotnet user-secrets (local dev)..

Before connecting

Check the maintainer’s instructions for account access, authentication and the supported client configuration. Once connected, inspect the tools your client receives and try a small task that matches the server’s stated purpose. The registry description does not include a verified, complete tool list.

Project and source

View the publisher’s registry entry · Project repository · Project website. This profile uses version 1.6.1 from the registry. Registration identifies the publisher namespace; it does not establish that this is a first-party integration for every service it connects.

Browse related databases MCP servers for tools that cover the same kind of work.

Configuration

VariableDescriptionRequired
MCPMSSQL_CONNECTION_STRINGDefault profile SQL Server connection string (often contains secrets). Optional if profiles are only in user appsettings.Optional
MCPMSSQL_DESCRIPTIONOptional human-readable description for the default profile.Optional
MCPMSSQL_QUERY_MAX_ROWSMax rows per interactive query (default 500; ceiling 1000).Optional
MCPMSSQL_QUERY_COMMAND_TIMEOUT_SECONDSInteractive query command timeout in seconds (default 30).Optional
MCPMSSQL_QUERY_SNAPSHOT_MAX_ROWSMax rows for snapshot queries (default 10000; ceiling 50000).Optional
MCPMSSQL_QUERY_SNAPSHOT_COMMAND_TIMEOUT_SECONDSSnapshot query timeout in seconds (default 120).Optional
MCPMSSQL_ANALYZE_COMMAND_TIMEOUT_SECONDSExecution plan analysis timeout in seconds (default 300; ceiling 600).Optional
MCPMSSQL_ALLOW_WRITEEnable 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.Optional
MCPMSSQL_WRITE_COMMAND_TIMEOUT_SECONDSWrite command timeout in seconds (default 60; ceiling 600).Optional
DOTNET_ENVIRONMENTSet to Development to load dotnet user-secrets (local dev).Optional