mssql-mcp-server
Verified Safeby ConnorBritain
Overview
Provides an enterprise-grade Model Context Protocol server for Microsoft SQL Server, enabling schema discovery, data operations, profiling, and administration with strong governance controls.
Installation
npx @connorbritain/mssql-mcp-server@latestEnvironment Variables
- SERVER_NAME
- DATABASE_NAME
- SQL_AUTH_MODE
- SQL_USERNAME
- SQL_PASSWORD
- SQL_DOMAIN
- SQL_PORT
- TRUST_SERVER_CERTIFICATE
- CONNECTION_TIMEOUT
- READONLY
- MAX_ROWS_DEFAULT
- REQUIRE_MUTATION_CONFIRMATION
- ENVIRONMENTS_CONFIG_PATH
- SCRIPTS_PATH
- AUDIT_LOG_PATH
- AUDIT_LOGGING
- AUDIT_REDACT_SENSITIVE
- PROFILE_SAMPLE_SIZE_DEFAULT
- PROFILE_SAMPLE_RETURN_LIMIT
- SEARCH_SCHEMA_DEFAULT_LIMIT
Security Notes
The server implements extensive security measures including strict input validation, parameterized queries for all data modification and script execution, and comprehensive SQL injection prevention in 'read_data' (blocking dangerous keywords/patterns, multi-statement queries, obfuscation attempts). Mandatory preview/confirmation steps are required for data mutations ('update_data', 'delete_data') with configurable row limits. Secrets are managed via environment variables and placeholders, with explicit instructions against hardcoding. Centralized policy enforcement (allowed/denied tools, read-only modes, approval requirements, schema/database access control) and robust audit logging with sensitive data redaction further enhance security. No use of 'eval' or similar dangerous functions was found. Error handling avoids exposing internal system details unnecessarily.
Similar Servers
DBchat
Transforms a database into an intelligent conversational partner, enabling natural language queries, instant answers, and data visualizations via MCP clients.
mcp-kql-server
An AI-powered MCP server that facilitates KQL query execution against Azure Data Explorer through natural language conversion, intelligent schema discovery, and RAG-enhanced context.
mcp-mysql-server
Provides an MCP-compliant interface for AI models to securely interact with a MySQL database for CRUD operations, schema inspection, and performance analysis.
jewei-mssql-mcp-server
Provides a Micro-Agent Protocol (MCP) server for querying Microsoft SQL Server databases and retrieving table structures.