MSSQL MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MSSQL_HOST | Yes | SQL Server hostname (required). | |
| MSSQL_PORT | No | SQL Server port. Default: 1433. | |
| MSSQL_USER | No | Username for SQL Authentication. Leave empty for Windows Authentication. | |
| MSSQL_ENCRYPT | No | Whether to encrypt the connection. Default: false. | |
| MSSQL_DATABASE | No | Database name. Default: master. | |
| MSSQL_PASSWORD | No | Password for SQL Authentication. Leave empty for Windows Authentication. | |
| MSSQL_REQUEST_TIMEOUT | No | Request timeout in milliseconds. Default: 30000. | |
| MSSQL_CONNECTION_TIMEOUT | No | Connection timeout in milliseconds. Default: 30000. | |
| MSSQL_TRUST_SERVER_CERTIFICATE | No | Whether to trust the server certificate. Default: true. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| test_connectionB | Test the connection to SQL Server and verify authentication |
| list_databasesB | List all databases on the SQL Server instance with their status and size |
| get_server_infoA | Get SQL Server instance information including version, edition, and configuration |
| execute_queryB | Execute a read-only SQL query. Only SELECT statements are allowed for safety. |
| get_expensive_queriesB | Get the most resource-intensive queries from the query store or plan cache |
| get_running_queriesB | Get currently executing queries with their status and resource usage |
| get_blockingC | Get current blocking chains showing blocked and blocking sessions |
| get_wait_statsB | Get aggregated wait statistics to identify performance bottlenecks |
| get_cpu_usageB | Get CPU usage history for SQL Server from ring buffer |
| get_index_usageB | Get index usage statistics to identify unused or missing indexes |
| get_database_statesB | Get the health status of all databases including any that are offline, recovering, or suspect |
| get_disk_spaceB | Get disk space usage for all database files including data and log files |
| get_memory_usageB | Get SQL Server memory usage including buffer pool, plan cache, and other memory clerks |
| get_log_spaceC | Get transaction log space usage for all databases |
| get_backup_statusC | Get last backup information for all databases |
| list_jobsB | List all SQL Server Agent jobs with their status and schedule |
| get_running_jobsB | Get currently executing SQL Server Agent jobs |
| get_failed_jobsC | Get jobs that failed in their last execution or recent history |
| get_job_historyC | Get execution history for a specific job |
| get_ag_statusC | Get Always On Availability Group status and health |
| get_replica_statesC | Get detailed state information for all availability group replicas |
| get_cluster_statusB | Get Windows Server Failover Cluster status for the SQL Server instance |
| get_tablesB | List all tables in a database with row counts, sizes, and metadata |
| get_columnsC | Get column definitions for a specific table |
| get_stored_proceduresC | List stored procedures with optional code view |
| get_functionsB | List user-defined functions with optional code view |
| get_viewsC | List views with optional definition |
| get_foreign_keysB | Get foreign key relationships between tables |
| get_indexesC | Get index information for tables |
| get_connected_usersC | Get currently connected users and sessions |
| get_triggersC | List triggers in a database |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 31 tools
Most tools target a clearly distinct resource+action (jobs vs queries vs indexes vs disk vs memory), but a few boundaries blur: list_databases already reports status/size while get_database_states reports health, and get_failed_jobs overlaps with get_job_history since failed jobs are derived from history. get_running_queries vs get_expensive_queries also needs the descriptions to separate current-execution from historical-cost.
Nearly everything follows a clean get_/list_ snake_case pattern with descriptive qualifiers (get_wait_stats, get_backup_status). The only minor deviation is list_ vs get_ for collection tools (list_databases and list_jobs use list_, while get_tables, get_views, get_indexes are also collections), plus two singletons (test_connection, execute_query).
31 tools is heavy for a single server and exceeds the comfortable range, but they group into coherent families (schema, Agent jobs, Always On/cluster, performance, storage/backup) rather than being ad hoc. Trimming overlapping diagnostics would tighten the surface considerably.
The read-only diagnostics domain is covered broadly: connectivity, instance/server info, schema, jobs, availability groups, live performance, blocking, waits, and storage/backup all have entries. Minor gaps remain (no partitions/statistics or parameter discovery for procedures, no error-log or deadlock-graph tool), but core DBA triage workflows are reachable.