ListConfigurationsLABSCO SUMMARY
Making the environment part of the project config is what stops the production accident.
The failure mode with database access is not a malicious query, it is the right query against the wrong environment. Naming the connection, the schemas and the write permission together — and switching them as one unit — means pointing at production is a deliberate act rather than a leftover setting. Automatic rollback on a failed write is the other half: a half-applied change is worse than a rejected one. If you connect a database at all, this is the shape to want.
What it is
A configurable server for Microsoft SQL Server whose central idea is the project: each one names its connection, its schemas and its permissions, and you switch between them.
What you get
- Multiple database connections, switched by project
- Schema-specific access, so a project sees only the schemas it names
- Read, write and delete permissions configured separately per project
- Environment-based setup, so development, staging and production differ by configuration
- Transaction management, with automatic rollback when a write fails
Requirements
The .NET runtime; built and run as a local executable. MIT licensed.
Setup effort
Build from source — git clone https://github.com/0xhubed/mcp-ms-sql-server.git
USE CASES
Keeping production read-only
Permissions belong to the project, not the session.
Working across several databases
Switch projects rather than reconfiguring.
Limiting the blast radius
Schema-specific access per project.
16 tools
Listed in project docs. Your client may show a different list.
SwitchConfigurationGetCurrentConfigurationTestConnectionExecuteQueryGetSchemaInfoGetTableInfoInsertRecordsUpdateRecordsDeleteRecordsBuildQueryAnalyzeQueryPerformanceGetDatabasePerformanceStatsDiscoverDataAnalyzeTableRelationshipsProfileDataQualityBEFORE YOU INSTALL
What to know first
Tools you get
16 tools named in the project's documentation.
Requires
- .NET 9.0 or later
- DB_PASSWORD in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
# Clone the repository
git clone https://github.com/0xhubed/mcp-ms-sql-server.git
cd mcp-ms-sql-server
# Build the project
dotnet build -c ReleaseMCP Clients
Claude Desktop
{
"mcpServers": {
"sql-server": {
"type": "stdio",
"command": "<YOUR_PATH_TO_MCP_MS_SQL_SERVER>",
"env": {
"MCP_CONFIG_NAME": "my-project"
}
}
}
}Point command at the executable that dotnet build -c Release writes to McpMsSqlServer/bin/Release/net9.0/ inside your mcp-ms-sql-server clone: McpMsSqlServer.exe on Windows (the README's own example is C:\Git\mcp-ms-sql-server\McpMsSqlServer\bin\Release\net9.0\McpMsSqlServer.exe), McpMsSqlServer on macOS and Linux.
The configuration on this page does not set DB_PASSWORD; the project's instructions set it with an export line. An app opened from its icon or dock does not see variables exported in a terminal, so to supply DB_PASSWORD, use the block's "env" section.