Skip to main content
Glama
Andrian17

mssql-mcp-server

by Andrian17

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MSSQL_MCP_AUDIT_FILENoPath to append JSON audit events.
MSSQL_MCP_TOOLS_CONFIGNoPath to a JSON configuration file with an enabledTools allow-list.
MSSQL_CONNECTION_STRINGNoServer-level connection string (ADO or mssql:// URL). Required if not provided via the --connection-string CLI option.
MSSQL_MCP_AUDIT_ALLOWEDNoIf 'true', allowed audit events are written to stderr. Environment variable only, no CLI flag.false
MSSQL_MCP_SECURITY_MODENoSecurity mode: readonly, write, admin, or unsafe.readonly
MSSQL_MCP_WORKSPACE_DIRNoDirectory to sandbox export/import paths. If set, resolved paths must stay inside it.
MSSQL_MCP_DEFAULT_SCHEMANoDefault schema fallback for every schema parameter.dbo
MSSQL_MCP_MAX_FILE_BYTESNoExport/import size cap in bytes.104857600
MSSQL_MCP_ALLOW_DESTRUCTIVENoPermit drop/delete/truncate/revoke/disable/reset operations. Set to 'true' to enable.false
MSSQL_MCP_ALLOW_TOOL_CONNECTION_STRINGNoPermit connectionString / sourceConnectionString / targetConnectionString tool arguments. Set to 'true' to enable.false

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
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
mssql_execute_queryA

Execute SELECT queries and data retrieval operations - operation="select/count/exists" with query and optional parameters. Examples: operation="select", query="SELECT * FROM Users WHERE CreatedAt > @p1", parameters=["2024-01-01"]

mssql_execute_mutationB

Execute data modification operations (INSERT/UPDATE/DELETE/UPSERT) - operation="insert/update/delete/upsert" with table and data. Examples: operation="insert", table="Users", data={"Name":"John","Email":"john@example.com"}

mssql_execute_sqlA

Execute arbitrary T-SQL - sql="ANY_VALID_TSQL" with optional parameters, GO batch separators and transaction support. Examples: sql="CREATE INDEX ...", sql="WITH cte AS (...) SELECT ...", transactional=true

mssql_manage_schemaA

Manage SQL Server schema - get schema info, create/alter tables, manage enum-style CHECK constraints. Examples: operation="get_info" for table lists, operation="create_table" with tableName and columns, operation="get_enums" to list IN-list CHECK constraints, operation="create_enum" with enumName, tableName, columnName and values

mssql_manage_indexesB

Manage SQL Server indexes - get, create, drop, rebuild/reorganize, and analyze usage with a single tool. Examples: operation="get" to list indexes, operation="create" with indexName, tableName, columns, operation="analyze_usage" for performance analysis

mssql_manage_constraintsA

Manage SQL Server constraints - get, create foreign keys, drop foreign keys, create constraints, drop constraints. Examples: operation="get" to list constraints, operation="create_fk" with constraintName, tableName, columnNames, referencedTable, referencedColumns

mssql_manage_functionsA

Manage SQL Server functions and stored procedures - get, create, or drop with a single tool. Examples: operation="get" to list, operation="create" with functionName="fn_total", parameters="@price DECIMAL(10,2), @tax DECIMAL(5,2)", returnType="DECIMAL(10,2)", functionBody="RETURN @price + (@price * @tax)"

mssql_manage_triggersA

Manage SQL Server DML triggers - get, create, drop, and enable/disable triggers. Examples: operation="get" to list triggers, operation="create" with triggerName, tableName and triggerBody (or functionName to EXEC a procedure), operation="set_state" with triggerName, tableName, enable

mssql_manage_rlsB

Manage SQL Server Row-Level Security - security policies with generated predicate functions. Examples: operation="create_policy" with tableName, policyName, predicateColumns=["TenantId"], using="@TenantId = CAST(SESSION_CONTEXT(N'TenantId') AS int)"

mssql_manage_usersA

Manage SQL Server logins, database users and permissions - create, drop, alter users, grant/revoke permissions. Examples: operation="create" with username="app_user", password="...", operation="grant" with username, permissions, target, targetType

mssql_manage_commentsA

Manage SQL Server object descriptions (MS_Description extended properties) - get, set, remove comments on tables, columns, functions, and other objects. Examples: operation="get" with objectType="table", objectName="Users", operation="set" with comment text, operation="bulk_get" for discovery

mssql_manage_queryB

Manage SQL Server query analysis and performance - operation="explain" for execution plans, operation="get_slow_queries" for slow query analysis (Query Store or plan cache), operation="get_stats" for query statistics, operation="reset_stats" for clearing statistics

mssql_analyze_databaseC

Analyze SQL Server database configuration and performance

mssql_debug_databaseC

Debug common SQL Server issues

mssql_monitor_databaseC

Get real-time monitoring information for a SQL Server database

mssql_export_table_dataB

Export table data to JSON or CSV format

mssql_import_table_dataC

Import data from JSON or CSV file into a table

mssql_copy_between_databasesC

Copy data between two SQL Server databases

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.3/5.0

Scored across 18 tools

Disambiguation3/5

Most tools target distinct resources (indexes, constraints, triggers, users), but there is overlap among execute_query, execute_mutation, and execute_sql, and between analyze_database, monitor_database, debug_database, and manage_query for performance/diagnostic work. Descriptions help somewhat, but an agent could still pick the wrong tool for custom T-SQL or monitoring.

Naming Consistency5/5

All tools follow the mssql_<verb>_<object> snake_case pattern with predictable verbs like execute, manage, analyze, export, import, and copy. The naming is highly consistent and easy to navigate.

Tool Count4/5

18 tools is slightly above the typical 3-15 well-scoped range, but the broad SQL Server administration scope justifies most entries. Each tool encapsulates a meaningful subdomain, so the count is reasonable if a bit heavy.

Completeness4/5

The surface covers data operations, schema, indexes, constraints, functions/procedures, triggers, RLS, users, comments, query performance, import/export, and database copying. Dedicated backup/restore and database-level lifecycle tools are missing, though arbitrary T-SQL via mssql_execute_sql provides a workaround.

Maintenance

ActivityMaintained
ResponsivenessNo issues