Skip to main content
Glama
vicagbasi

MSSQL MCP Server

by vicagbasi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
connectionsNoJSON string containing named connection strings
MSSQL_DOMAINNoLegacy: Windows domain for NTLM authentication
MSSQL_PASSWORDNoLegacy: Windows password for NTLM authentication
MSSQL_USERNAMENoLegacy: Windows username for NTLM authentication
WINDOWS_DOMAINNoWindows domain name for NTLM authentication
WINDOWS_PASSWORDNoWindows domain password for NTLM authentication
WINDOWS_USERNAMENoWindows domain username for NTLM authentication
MSSQL_CONNECTIONSNoLegacy JSON string for named connections
windows_credentialsNoJSON string containing { username, password, domain }
MSSQL_CONNECTION_STRINGNoDefault connection string (optional if CONNECTION_* used)
MSSQL_WINDOWS_CREDENTIALSNoLegacy JSON string for windows credentials

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_connectionsA

List all available named database connections configured in the server

test_connectionB

Test the database connection and return basic server information

list_databasesB

List all databases available on the SQL Server instance

list_tablesA

List all tables in the connected database

describe_tableA

Get detailed schema information for a specific table including columns, data types, and constraints

sample_dataA

Retrieve sample data from a table (top 10 rows by default)

execute_queryA

Execute a custom SQL SELECT query with automatic limit (top 20 rows). Disabled unless MSSQL_ENABLE_EXECUTE_QUERY=true.

get_relationshipsB

Get foreign key relationships between tables in the database

list_stored_proceduresB

List all stored procedures, functions, and their basic information

describe_stored_procedureC

Get detailed information about a specific stored procedure including parameters and definition

list_viewsB

List all views in the database with their basic information

describe_viewC

Get detailed information about a specific view including its definition and dependencies

list_triggersC

List all triggers in the database with their associated tables

describe_triggerB

Get detailed information about a specific trigger including its definition and events

list_functionsA

List all user-defined functions (scalar, table-valued, etc.)

list_indexesC

List all indexes on tables with usage statistics and detailed information

analyze_table_statsB

Get table row counts, size information, and last update statistics

find_missing_indexesC

Identify potentially missing indexes based on query execution patterns

analyze_index_usageA

Show detailed index usage statistics to identify unused or underutilized indexes

analyze_database_sizeB

Get comprehensive database size information including data and log file sizes

list_constraintsC

List all constraints (check, unique, foreign key, etc.) across tables in the database

analyze_check_constraintsC

Extract and analyze business rules from check constraints

list_user_defined_typesA

List all user-defined data types and their definitions

find_computed_columnsC

List computed columns and their formulas to understand derived business logic

list_default_constraintsA

List all default value constraints and their definitions

analyze_data_distributionC

Get data distribution patterns for columns to understand data quality and patterns

find_lookup_tablesB

Identify reference/lookup tables automatically based on table patterns

analyze_null_patternsB

Find columns with high null percentages and analyze null patterns

detect_audit_columnsC

Identify common audit trail patterns (created/modified dates, user tracking)

get_stored_procedure_definitionB

Get the complete SQL query/definition of a stored procedure - this is the actual source code

get_multiple_stored_procedure_definitionsB

Get complete SQL definitions for multiple stored procedures at once

get_all_stored_procedure_definitionsA

Get complete SQL definitions for all stored procedures in a schema

search_stored_procedures_by_contentB

Search for stored procedures containing specific text or patterns in their SQL definition

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/vicagbasi/mssql-mcp'

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