Skip to main content
Glama
AdrianCY

Microsoft SQL Server MCP

by AdrianCY

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MSSQL_PORTNoTCP port; omit when using MSSQL_INSTANCE_NAME1433
MSSQL_USERYesLogin user (SQL auth, NTLM, Azure AD password); not used for azure-active-directory-access-token or service-principal-only flows
MSSQL_DOMAINNoDomain login; required for MSSQL_AUTH_TYPE=ntlm
MSSQL_SERVERYesHostname or IP of SQL Server
MSSQL_ENCRYPTNoTLS encrypt: true, false, or stricttrue
MSSQL_USE_UTCNooptions.useUTC when settrue
MSSQL_APP_NAMENooptions.appName (server tracing)
MSSQL_DATABASEYesInitial database
MSSQL_PASSWORDYesLogin password (may be empty for some setups)
MSSQL_POOL_MAXNoPool max connections10
MSSQL_POOL_MINNoPool min connections0
MSSQL_AUTH_TYPENontlm, azure-active-directory-password, azure-active-directory-access-token, azure-active-directory-service-principal-secret, or unset/default for SQL login
MSSQL_TDS_VERSIONNo7_1, 7_2, 7_3_A, 7_3_B, or 7_4
MSSQL_TLS_CA_FILENoPath to CA PEM
MSSQL_ALLOW_WRITESNoIf false/unset, blocks common write/DDL/exec patterns in mssql_query (heuristic only)false
MSSQL_TLS_KEY_FILENoOptional client private key PEM
MSSQL_INSTANCE_NAMENoNamed instance; do not rely on MSSQL_PORT with this set
MSSQL_TLS_CERT_FILENoOptional client cert PEM (mutual TLS)
MSSQL_AZURE_CLIENT_IDNoAzure AD app (client) ID where required
MSSQL_AZURE_TENANT_IDNoTenant ID (optional for password auth, defaults common; required for service principal)
MSSQL_TLS_SERVER_NAMENoHostname for TLS validation when it differs from MSSQL_SERVER
MSSQL_QUERY_TIMEOUT_MSNoRequest timeout in ms for the driver. 0 -> unset
MSSQL_READ_ONLY_INTENTNoRead-only routing for AG secondariesfalse
MSSQL_AZURE_ACCESS_TOKENNoPre-obtained token for access-token auth
MSSQL_TLS_KEY_PASSPHRASENoPassphrase for encrypted client key
MSSQL_AZURE_CLIENT_SECRETNoService principal secret
MSSQL_POOL_IDLE_TIMEOUT_MSNopool.idleTimeoutMillis30000
MSSQL_CONNECTION_TIMEOUT_MSNoPool connectionTimeout (ms). 0 -> unset
MSSQL_MULTI_SUBNET_FAILOVERNoAvailability-group style failover hintfalse
MSSQL_TRUST_SERVER_CERTIFICATENoTrust self-signed / skip cert validation (dev only)false
MSSQL_CONNECTION_RETRY_INTERVAL_MSNoTedious connectionRetryInterval; 0 -> unset
MSSQL_MAX_RETRIES_ON_TRANSIENT_ERRORSNoTedious maxRetriesOnTransientErrors; 0 -> unset

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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