Read-only MCP servers for SQL Server and PostgreSQL
mssql-mcp-go and postgres-mcp-go are Model Context Protocol servers written in Go. They expose database metadata and analysis to AI assistants without giving those assistants a way to change data.
Read-only by design
Both servers validate every query before it runs. INSERT, UPDATE, DELETE, DROP, and other mutating statements are rejected, and stored procedures are analysed rather than executed. That constraint is the product, not a setting: an assistant answering a question about a schema should not be able to truncate a table by accident.
The same toolset, two dialects
Each server exposes more than 70 tools grouped by what they help you do: schema discovery, data profiling, performance analysis, security auditing, migration assessment, and monitoring. The names and groups are consistent across both servers, but the SQL dialect is not. A T-SQL snippet does not transfer to PostgreSQL, and the documentation keeps the two reference pages separate for that reason.
mssql-mcp-go adds SQL Server specific features such as Always Encrypted column decryption with local PFX certificates. postgres-mcp-go uses POSTGRES_* variables and PostgreSQL-specific options such as ssl_mode and search_path.
Connecting a client
The default transport is stdio, so an MCP client launches the binary instead of connecting to a port. The servers are available from Homebrew, as release binaries for Linux, macOS, and Windows, and as multi-arch container images.
Start with the mssql-mcp-go documentation or the postgres-mcp-go documentation. Both projects are MIT licensed.