# =============================================================================
# MS SQL Server MCP Server Configuration
# =============================================================================
# Copy this file to .env and configure your settings
# =============================================================================
# DATABASE CONNECTION (Required)
# =============================================================================
# SQL Server hostname or IP address
MSSQL_HOST=localhost
# SQL Server port (default: 1433)
MSSQL_PORT=1433
# Database username
MSSQL_USER=sa
# Database password
MSSQL_PASSWORD=your_password_here
# Database name to connect to
MSSQL_DATABASE=master
# =============================================================================
# CONNECTION SETTINGS (Optional)
# =============================================================================
# Connection timeout in seconds (default: 30)
MSSQL_TIMEOUT=30
# Query execution timeout in seconds (default: 60)
MSSQL_QUERY_TIMEOUT=60
# =============================================================================
# SAFETY CONTROLS (Optional)
# =============================================================================
# Enable read-only mode - blocks all INSERT, UPDATE, DELETE operations
# Set to "true" to enable (default: false)
MSSQL_READ_ONLY=false
# Maximum rows returned by queries (default: 1000)
MSSQL_MAX_ROWS=1000
# Comma-separated list of blocked SQL commands (case-insensitive)
# Default: DROP,TRUNCATE,ALTER,CREATE,GRANT,REVOKE,DENY,BACKUP,RESTORE,KILL,SHUTDOWN,RECONFIGURE
MSSQL_BLOCKED_COMMANDS=DROP,TRUNCATE,ALTER,CREATE,GRANT,REVOKE,DENY,BACKUP,RESTORE,KILL,SHUTDOWN,RECONFIGURE
# Restrict operations to specific schemas (comma-separated)
# Leave empty to allow all schemas
MSSQL_ALLOWED_SCHEMAS=
# Block access to specific databases (comma-separated, case-insensitive)
# These databases will be hidden from list_databases and cannot be switched to
# Example: MSSQL_BLOCKED_DATABASES=production,sensitive_data
MSSQL_BLOCKED_DATABASES=
# =============================================================================
# SERVER SETTINGS (Optional - for HTTP mode)
# =============================================================================
# HTTP server host (default: 127.0.0.1)
# MSSQL_HTTP_HOST=127.0.0.1
# HTTP server port (default: 8080)
# MSSQL_HTTP_PORT=8080
# =============================================================================
# AUDIT LOGGING (Optional)
# =============================================================================
# Enable audit logging (default: false)
MSSQL_AUDIT_ENABLED=false
# Audit log file path (default: mssql_mcp_audit.log)
MSSQL_AUDIT_LOG_FILE=mssql_mcp_audit.log