Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MSSQL_HOSTNoSQL Server hostname
MSSQL_PORTNoSQL Server port (default: 1433)
MSSQL_USERNoSQL auth username
MSSQL_DATABASENoDefault database
MSSQL_PASSWORDNoSQL auth password
MSSQL_MCP_CONFIGNoPath to YAML config file

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_serversB

List all configured SQL Server connections and their details (host, database, auth type, security mode)

list_databasesB

List all accessible databases on the SQL Server instance

list_schemasA

List all schemas in the current database

list_tablesA

List all tables in a database, optionally filtered by schema

list_viewsA

List all views in a database, optionally filtered by schema

describe_tableA

Get detailed column information for a table or view (columns, types, defaults, nullability, identity, computed)

get_foreign_keysB

Get foreign key relationships for a table

get_indexesB

Get index information for a table

get_constraintsB

Get constraints (PK, unique, check, default) for a table

get_triggersC

Get triggers defined on a table

execute_queryA

Execute a read-only SQL query (SELECT). Automatically applies row limits from configuration.

execute_mutationA

Execute a data modification query (INSERT, UPDATE, DELETE, MERGE). Requires readwrite or admin security mode.

list_proceduresB

List all stored procedures in a database, optionally filtered by schema

describe_procedureB

Get parameter information and source code for a stored procedure

execute_procedureB

Execute a stored procedure with parameters. Requires readwrite or admin security mode.

get_query_planA

Get the estimated execution plan for a SQL query (without executing it)

get_active_queriesA

Show currently running queries on the server (from sys.dm_exec_requests)

get_table_statsB

Get table statistics: row count, total size, index size, and fragmentation

get_index_usageA

Get index usage statistics: seeks, scans, lookups, and updates (from sys.dm_db_index_usage_stats)

get_missing_indexesB

Get missing index suggestions from SQL Server DMVs (sys.dm_db_missing_index_details)

get_server_infoB

Get SQL Server instance information: version, edition, OS, memory, CPU

get_database_infoA

Get detailed database information: size, files, status, recovery model

compare_schemasB

Compare schemas between two databases — shows tables, columns, and indexes that differ (useful for dev vs prod comparison)

generate_codeA

Generate TypeScript interface, C# class, or CREATE TABLE script from a table's schema

generate_insert_scriptsB

Generate INSERT statements from existing table data (for migration/seeding)

generate_er_diagramB

Generate a Mermaid ER diagram from database foreign key relationships

sample_tableB

Get a random sample of rows from a table (useful for understanding data patterns)

export_queryB

Execute a SELECT query and return results as CSV or JSON format

get_wait_statsB

Get top server wait statistics — identifies performance bottlenecks (CPU, I/O, locks, etc.)

get_deadlocksB

Get recent deadlock events from the system_health Extended Events session

get_blocking_chainsB

Show current blocking chains — which sessions are blocking others

get_long_transactionsB

Show long-running open transactions that may be holding locks

get_space_usageB

Get detailed disk space usage by table in a database

rebuild_indexB

Rebuild or reorganize a fragmented index. Requires admin security mode.

get_backup_historyB

Get recent backup history for a database from msdb

get_query_store_statsA

Get top resource-consuming queries from Query Store (SQL Server 2016+). Query Store must be enabled on the database.

generate_test_dataB

Generate INSERT statements with realistic fake/test data based on table schema

health_checkB

Check SQL Server connection health and basic responsiveness

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/gunvertugberk/mcp-sqlserver'

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