Windows Authentication (SSPI)
Windows integrated authentication (SSPI) allows connecting without specifying a username and password, using the current Windows user’s credentials.
Requirements
Section titled “Requirements”- SQL Server configured to accept Windows Authentication
- The Windows user must have database access
- Only works in Windows environments
Configuration
Section titled “Configuration”MSSQL_AUTH=integratedMSSQL_SERVER=your-serverMSSQL_DATABASE=YourDatabaseThere is no need to set MSSQL_USER or MSSQL_PASSWORD.
Generated connection string
Section titled “Generated connection string”server=your-server;port=1433;database=YourDatabase;integrated security=SSPI;encrypt=false;trustservercertificate=trueThe values of
encryptandtrustservercertificatedepend onDEVELOPER_MODEandMSSQL_ENCRYPT.
Claude Desktop
Section titled “Claude Desktop”Modern server (SQL Server 2016+)
Section titled “Modern server (SQL Server 2016+)”{ "mssql-windows": { "command": "mcp-go-mssql.exe", "env": { "MSSQL_SERVER": "your-server", "MSSQL_DATABASE": "YourDatabase", "MSSQL_AUTH": "integrated", "DEVELOPER_MODE": "false", "MSSQL_READ_ONLY": "true" } }}Legacy server (SQL Server 2008/2012)
Section titled “Legacy server (SQL Server 2008/2012)”SQL Server 2008/2012 does not support TLS 1.2, which is the minimum required by the Go driver. Encryption must be disabled.
{ "mssql-legacy": { "command": "mcp-go-mssql.exe", "env": { "MSSQL_SERVER": "legacy-server", "MSSQL_DATABASE": "LegacyDB", "MSSQL_AUTH": "integrated", "DEVELOPER_MODE": "true", "MSSQL_ENCRYPT": "false" } }}
MSSQL_ENCRYPT=falseonly works withDEVELOPER_MODE=true. In production, encryption is always enforced.
Troubleshooting
Section titled “Troubleshooting”- Login failed: Verify that the Windows user has a login in SQL Server
- SSPI handshake failed: Verify that SQL Server accepts Windows Authentication in its configuration
- Cannot generate SSPI context: May indicate DNS or Kerberos issues in the domain
- TLS handshake failed: SQL Server 2008/2012 doesn’t support TLS 1.2. Set
MSSQL_ENCRYPT=falsewithDEVELOPER_MODE=true - Connection timeout: Verify the port is correctly configured (
MSSQL_PORT, default 1433)