Microsoft SQL Server MCP
by AdrianCY
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MSSQL_PORT | No | TCP port; omit when using MSSQL_INSTANCE_NAME | 1433 |
| MSSQL_USER | Yes | Login user (SQL auth, NTLM, Azure AD password); not used for azure-active-directory-access-token or service-principal-only flows | |
| MSSQL_DOMAIN | No | Domain login; required for MSSQL_AUTH_TYPE=ntlm | |
| MSSQL_SERVER | Yes | Hostname or IP of SQL Server | |
| MSSQL_ENCRYPT | No | TLS encrypt: true, false, or strict | true |
| MSSQL_USE_UTC | No | options.useUTC when set | true |
| MSSQL_APP_NAME | No | options.appName (server tracing) | |
| MSSQL_DATABASE | Yes | Initial database | |
| MSSQL_PASSWORD | Yes | Login password (may be empty for some setups) | |
| MSSQL_POOL_MAX | No | Pool max connections | 10 |
| MSSQL_POOL_MIN | No | Pool min connections | 0 |
| MSSQL_AUTH_TYPE | No | ntlm, azure-active-directory-password, azure-active-directory-access-token, azure-active-directory-service-principal-secret, or unset/default for SQL login | |
| MSSQL_TDS_VERSION | No | 7_1, 7_2, 7_3_A, 7_3_B, or 7_4 | |
| MSSQL_TLS_CA_FILE | No | Path to CA PEM | |
| MSSQL_ALLOW_WRITES | No | If false/unset, blocks common write/DDL/exec patterns in mssql_query (heuristic only) | false |
| MSSQL_TLS_KEY_FILE | No | Optional client private key PEM | |
| MSSQL_INSTANCE_NAME | No | Named instance; do not rely on MSSQL_PORT with this set | |
| MSSQL_TLS_CERT_FILE | No | Optional client cert PEM (mutual TLS) | |
| MSSQL_AZURE_CLIENT_ID | No | Azure AD app (client) ID where required | |
| MSSQL_AZURE_TENANT_ID | No | Tenant ID (optional for password auth, defaults common; required for service principal) | |
| MSSQL_TLS_SERVER_NAME | No | Hostname for TLS validation when it differs from MSSQL_SERVER | |
| MSSQL_QUERY_TIMEOUT_MS | No | Request timeout in ms for the driver. 0 -> unset | |
| MSSQL_READ_ONLY_INTENT | No | Read-only routing for AG secondaries | false |
| MSSQL_AZURE_ACCESS_TOKEN | No | Pre-obtained token for access-token auth | |
| MSSQL_TLS_KEY_PASSPHRASE | No | Passphrase for encrypted client key | |
| MSSQL_AZURE_CLIENT_SECRET | No | Service principal secret | |
| MSSQL_POOL_IDLE_TIMEOUT_MS | No | pool.idleTimeoutMillis | 30000 |
| MSSQL_CONNECTION_TIMEOUT_MS | No | Pool connectionTimeout (ms). 0 -> unset | |
| MSSQL_MULTI_SUBNET_FAILOVER | No | Availability-group style failover hint | false |
| MSSQL_TRUST_SERVER_CERTIFICATE | No | Trust self-signed / skip cert validation (dev only) | false |
| MSSQL_CONNECTION_RETRY_INTERVAL_MS | No | Tedious connectionRetryInterval; 0 -> unset | |
| MSSQL_MAX_RETRIES_ON_TRANSIENT_ERRORS | No | Tedious maxRetriesOnTransientErrors; 0 -> unset |
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
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/AdrianCY/mssql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server