mcp-sqlserver
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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 | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_serversA | List all configured SQL Server connections and their details (host, database, auth type, security mode) |
| list_databasesA | 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_keysC | Get foreign key relationships for a table |
| get_indexesC | Get index information for a table |
| get_constraintsB | Get constraints (PK, unique, check, default) for a table |
| get_triggersB | Get triggers defined on a table |
| execute_queryB | Execute a read-only SQL query (SELECT). Automatically applies row limits from configuration. |
| list_proceduresA | List all stored procedures in a database, optionally filtered by schema |
| describe_procedureA | Get parameter information and source code for a stored procedure |
| get_query_planA | Get the estimated execution plan for a SQL query (without executing it) |
| get_active_queriesB | 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_usageC | Get index usage statistics: seeks, scans, lookups, and updates (from sys.dm_db_index_usage_stats) |
| get_missing_indexesC | Get missing index suggestions from SQL Server DMVs (sys.dm_db_missing_index_details) |
| get_server_infoA | Get SQL Server instance information: version, edition, OS, memory, CPU |
| get_database_infoC | 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_codeB | Generate TypeScript interface, C# class, or CREATE TABLE script from a table's schema |
| generate_insert_scriptsA | Generate INSERT statements from existing table data (for migration/seeding) |
| generate_er_diagramB | Generate a Mermaid ER diagram from database foreign key relationships |
| sample_tableA | 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_deadlocksA | 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_usageC | Get detailed disk space usage by table in a database |
| 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_checkC | Check SQL Server connection health and basic responsiveness |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Debanjan29/readonly-mssql-mcp-db'
If you have feedback or need assistance with the MCP directory API, please join our Discord server