Skip to main content
Glama
az-coder-123

SQL Server MCP

by az-coder-123

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DB_HOSTNoSQL Server hostname or IPlocalhost
DB_NAMENoDefault databasemaster
DB_PORTNoSQL Server port1433
DB_USERYesSQL Server login username
DB_ENCRYPTNoEnable TLS encryptiontrue
DB_PASSWORDYesSQL Server login password
MCP_HTTP_PORTNoHTTP server port (when MCP_TRANSPORT=http)3000
MCP_TRANSPORTNoTransport mode: stdio or httpstdio
QUERY_ROW_LIMITNoMax rows returned per query (auto-injected)100
QUERY_TIMEOUT_MSNoQuery timeout in milliseconds30000
PAYLOAD_MAX_BYTESNoMax response payload size (1MB)1048576
DB_TRUST_SERVER_CERTNoTrust self-signed certificatesfalse
SCHEMA_CACHE_TTL_SECONDSNoHow long schema metadata is cached3600

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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_databasesA

List all user-accessible databases on SQL Server instance

list_schemasA

List all schemas in database with table and view counts

list_tablesC

List all tables and views in a database schema

describe_tableA

Get column details (name, type, PK, description) for a table

get_table_relationshipsA

Get foreign key relationships for a table (helps with JOINs)

search_tablesB

Search for tables/columns/descriptions matching a keyword

execute_read_queryA

Execute a read-only SQL SELECT query (automatically validated and row-limited)

get_table_statisticsC

Get table statistics including row count, size, and timestamps

get_table_indexesB

Get all indexes for a table with column details

analyze_tableC

Analyze table data to get distribution statistics for each column

list_stored_proceduresA

List all stored procedures and functions with parameters

export_table_dataB

Export table data to JSON or CSV format

get_view_definitionA

Get the SQL definition of a view along with referenced tables

list_constraintsA

List all constraints (PK, FK, Unique, Check) for a table or all tables

get_server_infoA

Get SQL Server information including version, edition, and status

get_procedure_definitionA

Get the full SQL definition of a stored procedure or function

list_usersA

List all database users and their roles

get_user_permissionsC

Get detailed permissions for a specific user

get_column_distributionC

Get detailed distribution statistics for a specific column

get_table_dependenciesB

Get full dependency map for a table (what it depends on and what depends on it)

get_column_usageA

Get detailed usage information for a specific column (views, procedures, foreign keys, indexes)

validate_data_integrityB

Validate data integrity for a table (FK violations, duplicates, null violations)

get_data_profileB

Get comprehensive data profile for a table including quality metrics

generate_schema_documentationB

Generate comprehensive schema documentation with tables, views, columns, and relationships

create_entity_relationship_diagramA

Create entity relationship diagram in Mermaid, PlantUML, or DOT format

generate_api_documentationB

Generate REST API documentation from database schema with inferred endpoints and schemas

create_migration_scriptsB

Generate migration scripts for schema changes with up/down migrations

compare_schemasA

Compare two schemas to identify differences in tables, views, and procedures

clear_cacheA

Clear the schema metadata cache to force fresh data from the database

backup_databaseB

Backup a SQL Server database to a .bak file with optional compression

restore_databaseB

Restore a SQL Server database from a .bak file

get_backup_file_listB

Get the list of data and log files contained in a backup file

get_backup_headerA

Get backup metadata and header information from a .bak file

list_backupsA

List recent backup history from msdb, optionally filtered by database name

create_databaseA

Create a new SQL Server database with specified options

get_database_summaryB

Get comprehensive summary of a database including statistics, size, schemas, and last backup

list_tables_allA

List all tables across all databases or in a specific database

search_across_databasesB

Search for tables, columns, or procedures across all databases by keyword

suggest_index_optimizationsB

Analyze and suggest index improvements including missing, unused, and fragmented indexes

analyze_query_performanceB

Analyze query performance using execution statistics DMVs to find slow queries and bottlenecks

detect_circular_dependenciesA

Detect circular dependencies in foreign key relationships

analyze_normalization_levelB

Analyze normalization level of tables using heuristic approach (1NF, 2NF, 3NF detection)

analyze_schema_change_impactB

Analyze impact of schema changes by finding all dependent objects

find_unused_stored_proceduresA

Find stored procedures that are not executed recently or never executed

list_triggersB

List all triggers in the database with details and dependencies

audit_user_permissionsC

Audit user permissions for security analysis and compliance

check_database_connectionsA

Check active connections to a database (useful before restore)

disconnect_database_usersA

Disconnect all users from a database by setting access mode (useful before restore)

kill_database_sessionsB

Kill specific sessions connected to a database

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/az-coder-123/sql-server-mcp'

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