sql-server-mcp
Verified Safeby jpcanter
Overview
Manages and interacts with Microsoft SQL Server databases through a Model Context Protocol (MCP) server, offering tools for database object discovery, schema inspection, safe write operations, and a full stored procedure lifecycle management with versioning.
Installation
npm startEnvironment Variables
- DB_SERVER
- DB_DATABASE
- DB_USER
- DB_PASSWORD
- DB_TRUST_SERVER_CERTIFICATE
- ENABLE_WRITE_OPERATIONS
- ENABLE_SP_MODIFICATIONS
- DRAFT_SCHEMA
Security Notes
The server implements robust security measures including: comprehensive SQL validation to block dangerous keywords (e.g., DROP DATABASE, xp_cmdshell) and suspicious patterns (e.g., SQL injection attempts); enforcement of parameterized queries; configurable maximum rows affected limits for write operations; explicit transaction management with timeouts and auto-rollback; separate read-only and read-write connection pools; and comprehensive audit logging for all operations. While string manipulation is used for stored procedure (SP) schema/name rewriting during draft management, it's applied after validation and is highly specific, mitigating broader injection risks. The test environment uses a hardcoded SA password, but the production server correctly relies on environment variables.
Similar Servers
mssqlMCP
The SQL Server MCP (Model Context Protocol) Server enables AI assistants like GitHub Copilot within Visual Studio Code to interact with SQL Server databases, allowing for SQL query execution, detailed database metadata retrieval, and management of connections and security.
jewei-mssql-mcp-server
Provides a Micro-Agent Protocol (MCP) server for querying Microsoft SQL Server databases and retrieving table structures.
DatabaseMcpServer
Provides a robust and secure database access layer for AI assistants, supporting 19 types of databases with single-instance multi-database dynamic switching and over 50 tools for data and schema management.
MsSqlMCP
Provides an MCP Server for SQL Server database schema inspection and safe, read-only query execution to AI clients.