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
mcp-kql-server
An AI-powered Model Context Protocol (MCP) server for executing Kusto Query Language (KQL) queries against Azure Data Explorer, including natural language to KQL (NL2KQL) conversion, intelligent schema discovery, caching, and data visualization.
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.
MsSqlMCP
Provides an MCP Server for SQL Server database schema inspection and safe, read-only query execution to AI clients.
mcp-server-generator
Generate Model Context Protocol (MCP) servers from database datasources for integration with AI agents, using a visual canvas interface for tool creation and management.