mcp-go-mssql
Verified Safeby scopweb
Overview
Provides secure Microsoft SQL Server connectivity for AI assistants via the Model Context Protocol (MCP) or a CLI tool, supporting robust security and granular access controls.
Installation
go run main.goEnvironment Variables
- MSSQL_SERVER
- MSSQL_DATABASE
- MSSQL_USER
- MSSQL_PASSWORD
- MSSQL_PORT
- MSSQL_AUTH
- MSSQL_ENCRYPT
- MSSQL_CONNECTION_STRING
- MSSQL_READ_ONLY
- MSSQL_WHITELIST_TABLES
- MSSQL_MAX_QUERY_SIZE
- DEVELOPER_MODE
Security Notes
The project demonstrates an excellent security posture. It explicitly protects against SQL injection using prepared statements, prevents command injection with a dangerous keyword blacklist, and mitigates authentication bypass via mandatory TLS encryption and strong credential handling. Sensitive data is sanitized in logs, and `DEVELOPER_MODE` ensures generic errors in production to prevent information leakage. A key feature is the granular table permissions (whitelist) that validates all tables in modification queries, enhancing AI safety. Comprehensive security testing with `govulncheck` and `gosec` confirms no known vulnerabilities in dependencies or the codebase. No 'eval'-like functions or obfuscation are present, and race conditions are actively tested for.
Similar Servers
toolhive-registry-server
The central metadata hub for enterprise Model Context Protocol (MCP) server governance and discovery, implementing the official MCP Registry API specification.
mcp_cosmosdb_go
Provides an MCP server for interacting with Azure Cosmos DB databases, containers, and items, primarily intended as a learning and experimental tool for AI tooling.
jewei-mssql-mcp-server
Provides a Micro-Agent Protocol (MCP) server for querying Microsoft SQL Server databases and retrieving table structures.
MsSqlMCP
Provides an MCP Server for SQL Server database schema inspection and safe, read-only query execution to AI clients.