Back to Home
shaharwiener icon

mcp-sql-server

Verified Safe

by shaharwiener

Overview

Provides AI assistants with safe, read-optimized access to SQL Server databases.

Installation

Run Command
docker run -d --name mcp-sql-server -p 9303:9303 --env-file .env.local -e MCP_TRANSPORT=sse -e MCP_HOST=0.0.0.0 -e DB_CONN_MASTER='Driver={ODBC Driver 18 for SQL Server};Server=host.docker.internal;Database=master;Uid=sa;Pwd=YourStrong!Passw0rd;TrustServerCertificate=yes;LoginTimeout=30;' -e DB_CONN_LOCALDB='Driver={ODBC Driver 18 for SQL Server};Server=host.docker.internal;Database=LocalDB;Uid=sa;Pwd=YourStrong!Passw0rd;TrustServerCertificate=yes;LoginTimeout=30;' mcp-sql-server:latest

Environment Variables

  • DB_CONN_<NAME>
  • DB_NAME
  • DB_CONNECTION_STRING

Security Notes

The server has a strong security posture for its intended use case (internal VPN deployment). It strictly enforces read-only access, includes comprehensive input validation to prevent SQL injection and dangerous commands (xp_cmdshell, OPENROWSET), and uses robust audit logging with PII sanitization. Dangerous write operations (e.g., `execute_stored_procedure`) are explicitly disabled by default. Credentials for production are managed via AWS SSM. Known limitations like no application-level authentication, rate limiting, or fine-grained access control are clearly documented and deemed acceptable for internal VPN use, but make it unsuitable for external exposure without significant modification.

Similar Servers

Stats

Interest Score34
Security Score9
Cost ClassHigh
Avg Tokens2500
Stars1
Forks0
Last Update2025-11-24

Tags

SQL ServerDatabase ConnectorAI ToolsRead-onlyMCP