MCP Server for MS SQL Server integration with Claude Desktop, Cursor, Windsurf and VS Code
Strong foundation with clear naming conventions (verb_noun pattern), comprehensive parameter schemas with enums and descriptions, and good security practices (environment-based credentials, parameterized queries). Tool descriptions are detailed and include risk warnings. However, output schemas are not explicitly documented in the source, and error handling lacks recovery guidance. Deprecated tool aliases (mssql_execute_query, mssql_get_schema, etc.) add unnecessary cognitive load. Average tool description length ~180 chars (within baseline 194), but some descriptions exceed 1024 chars with verbose examples.
Connects to MS SQL Server using environment variables (DB_SERVER, DB_DATABASE, DB_USER, DB_PASSWORD, DB_PORT, DB_ENCRYPT, DB_TRUST_SERVER_CERTIFICATE). No credentials accepted as parameters — all connection settings come from the server environment only. Idempotent: calling again reconnects.
Returns the current connection status, server address, database name, and connection pool metrics. Read-only. Safe to call at any time.
Deprecated alias for mssql_describe_table_columns.
Returns column definitions for a table: name, data type, length, nullability, default, and ordinal position. Read-only. Uses parameterized queries to prevent injection.
Closes the current database connection and releases the connection pool. Safe to call even if not connected. Idempotent.
Deprecated alias for mssql_execute_stored_procedure.
Deprecated tool aliases (mssql_execute_query, mssql_get_schema, mssql_describe_table, mssql_get_table_data, mssql_execute_procedure) create ambiguity and force LLMs to choose between canonical and legacy names. This violates the single-canonical-name principle and wastes reasoning cycles.
Output schemas are not explicitly documented in tool definitions. LLMs cannot plan downstream calls or extract fields without knowing the response structure. E.g., mssql_read_table_rows returns rows but the field names and types are not declared.
Error handling lacks recovery guidance. Tools return errors but do not tell LLMs what to do next (retry, ask user, or fail). E.g., connection failures should suggest 'Check DB_SERVER and DB_PORT environment variables.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2026-07-28+ | v2 |
Deprecated alias for mssql_run_sql_query. Use mssql_run_sql_query instead. ⚠️ This tool can read AND modify data.
Executes a stored procedure by name. ⚠️ May modify data — use only when an action is intended. Schema and procedure names are validated as safe identifiers. Pass all value parameters via 'parameters'.
Deprecated alias for mssql_list_schema_objects. Use mssql_list_schema_objects instead.
Deprecated alias for mssql_read_table_rows. Use mssql_read_table_rows instead. ⚠️ whereClause must use @paramName placeholders for all values.
Lists all databases visible on the connected SQL Server instance with state and recovery information. Read-only. Supports pagination.
Lists tables, views, stored procedures, or functions in the connected database. Read-only. Supports filtering by schema name and pagination. Example: objectType='tables', schemaName='dbo', limit=20
Returns rows from a table with optional column projection, WHERE filtering, ORDER BY, and pagination. Read-only. Table and schema names are validated as safe identifiers. WHERE clause values MUST be passed via 'parameters' using @paramName placeholders. Pagination: limit (1-200, default 20) and offset. Example: tableName='Orders', schemaName='dbo', columns=['OrderId','Total'], limit=50
Executes an arbitrary SQL statement against the connected database. ⚠️ WARNING: This tool can read AND modify data (INSERT, UPDATE, DELETE, DDL). Always prefer parameterized inputs via the 'parameters' field — never embed user-supplied values directly in the query string. Example: query='SELECT * FROM dbo.Users WHERE Id = @id', parameters={id: 42}
No dry-run or confirmation step for destructive operations (DELETE, UPDATE, DROP). Agents can accidentally destroy data. mssql_run_sql_query and mssql_execute_stored_procedure should support a 'dry_run' parameter or require explicit confirmation.
Tool descriptions include verbose examples (e.g., mssql_read_table_rows description exceeds 1024 chars). Examples like 'tableName=Orders' risk LLMs reusing literal values. Replace with formal constraints (enums, patterns) and move examples to separate documentation.