mcp-mssqlSAFE
Read-only-by-default MCP server for one or many SQL Servers: schema discovery, SELECT-only queries, execution-plan analysis, opt-in writes.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://github.com/alyiox/mcp-mssql/actions/workflows/ci.yml) [](https://www.nuget.org/packages/Alyio.McpMssql) [](LICENSE)
A read-only-by-default Model Context Protocol (MCP) server for Microsoft SQL Server that provides schema discovery, select-only queries, execution-plan analysis, opt-in writes, and profile-based access to multiple servers from a single toolset deployment.
Requirements: .NET 8.0 or later runtime (the tool targets net8.0 and net10.0), SQL Server, and a connection string.
Quick start
Set MCPMSSQL_CONNECTION_STRING and run the server in one of these ways:
# Option 1: Run from NuGet package (e.g. with MCP Inspector) export MCPMSSQL_CONNECTION_STRING="Server=127.0.0.1;User ID=sa;Password=;Encrypt=True;TrustServerCertificate=True;" npx -y @modelcontextprotocol/inspector@latest dotnet dnx Alyio.McpMssql --prerelease
# Option 2: Install and run as a global tool dotnet tool install --global Alyio.McpMssql --prerelease export MCPMSSQL_CONNECTION_STRING="Server=127.0.0.1;User ID=sa;Password=;Encrypt=True;TrustServerCertificate=True;" npx -y @modelcontextprotocol/inspector@latest mcp-mssql
# Option 3: Run from source (clone repo, then) export MCPMSSQL_CONNECTION_STRING="Server=127.0.0.1;User ID=sa;Password=;Encrypt=True;TrustServerCertificate=True;" npx -y @modelcontextprotocol/inspector@latest dotnet run --project src/Alyio.McpMssql -f net10.0
The Inspector connects in the legacy protocol era by default, where [lo
69426f614857OBSERVED · 2026-10-10Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (5)
.exclusion.dic
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18 unixodbc-dev
Gates applied: no_behavioural_pass.
69426f614857full audit observations/trust-audit/mcp-server/alyiox__mcp-mssql.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-10 | 69426f614857 | SAFE | B | 89 | first audit |
Questions
What is the mcp-mssql MCP server?
Read-only-by-default MCP server for one or many SQL Servers: schema discovery, SELECT-only queries, execution-plan analysis, opt-in writes.
Is mcp-mssql safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does mcp-mssql need?
It reads MCPMSSQL_CONNECTION_STRING from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does mcp-mssql run?
It speaks stdio, so it runs as a local process your client starts.
How current is this page?
The grade is for one exact copy of the source (69426f614857), read on 2026-10-10. The repository is watched and re-audited when it changes.