Skip to content

Authentication Modes

MCP-Go-MSSQL supports multiple authentication methods to adapt to different environments.

The default method. Uses SQL Server username and password.

Ventana de terminal
MSSQL_AUTH=sql
MSSQL_USER=app_user
MSSQL_PASSWORD=your_password

Uses the current Windows user’s credentials. No username or password required in configuration.

Ventana de terminal
MSSQL_AUTH=integrated

See Windows Authentication (SSPI) for configuration details.

For Azure SQL databases.

Ventana de terminal
MSSQL_AUTH=azure
MSSQL_USER=user@tenant.onmicrosoft.com
MSSQL_PASSWORD=your_password

When you need full control over connection parameters:

Ventana de terminal
MSSQL_CONNECTION_STRING="server=myserver;database=mydb;user id=myuser;password=mypass;encrypt=true"

This variable overrides all other connection variables.

  1. MSSQL_CONNECTION_STRING (if defined, used directly)
  2. MSSQL_AUTH=integrated (SSPI, ignores user/password)
  3. MSSQL_AUTH=azure (Azure AD)
  4. MSSQL_AUTH=sql or undefined (SQL Server auth by default)