Skip to main content
Glama

MSSQL MCP Server

by Nirmal123K
.env.example3.7 kB
# MSSQL MCP Server Environment Configuration # Copy this file to .env and update with your actual values # ============================================================================= # DATABASE CONNECTION SETTINGS # ============================================================================= # SQL Server hostname or IP address # Examples: # - Local SQL Server: localhost # - Named instance: localhost\SQLEXPRESS # - Remote server: myserver.company.com # - Azure SQL: myserver.database.windows.net SERVER_NAME=localhost # Target database name DATABASE_NAME=MyDatabase # ============================================================================= # AUTHENTICATION SETTINGS # ============================================================================= # SQL Server Authentication (for local SQL Server) # If these are provided, SQL Server authentication will be used # If omitted, Azure AD authentication will be attempted SQL_USER=sa SQL_PASSWORD=YourStrongPassword123! # ============================================================================= # CONNECTION OPTIONS # ============================================================================= # Trust server certificate (useful for development with self-signed certs) # Set to "true" for local development, "false" for production TRUST_SERVER_CERTIFICATE=true # Enable encryption (recommended for production) # Azure SQL Database always uses encryption ENCRYPT=true # Connection timeout in seconds CONNECTION_TIMEOUT=30 # ============================================================================= # SECURITY SETTINGS # ============================================================================= # Read-only mode (restricts to SELECT, DESCRIBE, LIST operations only) # Set to "true" for production environments where write access isn't needed READONLY=false # ============================================================================= # DEVELOPMENT SETTINGS # ============================================================================= # Enable debug logging DEBUG=mcp:* # Node.js environment NODE_ENV=development # ============================================================================= # EXAMPLE CONFIGURATIONS # ============================================================================= # Example 1: Local SQL Server Development # SERVER_NAME=localhost # DATABASE_NAME=TestDB # SQL_USER=sa # SQL_PASSWORD=DevPassword123! # TRUST_SERVER_CERTIFICATE=true # READONLY=false # Example 2: Local SQL Server Express # SERVER_NAME=localhost\SQLEXPRESS # DATABASE_NAME=MyAppDB # SQL_USER=myuser # SQL_PASSWORD=mypassword # TRUST_SERVER_CERTIFICATE=true # READONLY=false # Example 3: Azure SQL Database (Production) # SERVER_NAME=mycompany.database.windows.net # DATABASE_NAME=ProductionDB # READONLY=true # CONNECTION_TIMEOUT=60 # (No SQL_USER/SQL_PASSWORD - uses Azure AD authentication) # Example 4: Docker SQL Server # SERVER_NAME=localhost,1433 # DATABASE_NAME=DockerDB # SQL_USER=sa # SQL_PASSWORD=DockerPassword123! # TRUST_SERVER_CERTIFICATE=true # READONLY=false # ============================================================================= # SECURITY NOTES # ============================================================================= # 1. Never commit .env files with real credentials to version control # 2. Use strong passwords for SQL Server authentication # 3. Enable encryption for production environments # 4. Use Azure AD authentication when possible for Azure SQL Database # 5. Set READONLY=true for production environments when write access isn't needed # 6. Regularly rotate passwords and access keys # 7. Use Azure Key Vault or similar for production credential management

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Nirmal123K/mssql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server