A read-only MCP server for Microsoft SQL Server that exposes database metadata discovery, parameterized SELECT queries, and query plan analysis. It supports profile-based configuration and enforces no DML/DDL operations.
From the registry: Read-only MCP for Microsoft SQL Server: metadata discovery, parameterized SELECT, plans.
$ dotnet dnx Alyio.McpMssql --prerelease --yeshttps://www.nuget.org/packages/Alyio.McpMssqlPlease install the `mcp-mssql` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **.NET 10 SDK** — Install the .NET 10.0 SDK and ensure the `dotnet` command is available on your PATH.
- **SQL Server access** — Have access to a Microsoft SQL Server instance and a valid connection string for it.
- **Install the MCP server package on demand via dotnet dnx** — The simplest portable run path uses `dotnet dnx` to execute the NuGet package directly. Pre-release builds require the `--prerelease` flag. Run: `dotnet dnx Alyio.McpMssql --prerelease --yes` (https://www.nuget.org/packages/Alyio.McpMssql)
Canonical MCP server config (stdio transport):
- command: `dotnet`
- args: ["dnx","Alyio.McpMssql","--prerelease","--yes"]
- required environment variables:
- `MCPMSSQL_CONNECTION_STRING`: SQL Server connection string for the default profile. Required unless you configure profiles through the user-scoped appsettings.json or equivalent .NET host configuration. (example: `Server=<your-sql-server>;User ID=<your-user>;Password=<your-password>;Encrypt=True;TrustServerCertificate=True;`)
- optional environment variables:
- `MCPMSSQL_DESCRIPTION`: Optional description for the default profile for tooling/AI discovery. (example: `<your-profile-description>`)
- `MCPMSSQL_QUERY_MAX_ROWS`: Optional max rows per interactive query. Default is 500; hard ceiling is 1000. (example: `500`)
- `MCPMSSQL_QUERY_COMMAND_TIMEOUT_SECONDS`: Optional timeout in seconds for interactive queries. Default is 30. (example: `60`)
- `MCPMSSQL_QUERY_SNAPSHOT_MAX_ROWS`: Optional max rows for snapshot queries. Default is 10000; hard ceiling is 50000. (example: `10000`)
- `MCPMSSQL_QUERY_SNAPSHOT_COMMAND_TIMEOUT_SECONDS`: Optional timeout in seconds for snapshot queries. Default is 120. (example: `120`)
- `MCPMSSQL_ANALYZE_COMMAND_TIMEOUT_SECONDS`: Optional timeout in seconds for query analysis. Default is 300. (example: `300`)
Note: Supports profile-based configuration. For multiple connections, the README recommends using a user-scoped appsettings.json instead of flat environment variables. The env block can be omitted if configuration is already provided through appsettings.json or other .NET host configuration sources.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.MCPMSSQL_CONNECTION_STRINGrequiredConnection string for the SQL Server database.AI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev.