Microsoft-SQL-Server-MCP-Server
by NicolasPirello
Overview
Connect AI assistants to Microsoft SQL Server databases for natural language queries and data inspection.
Installation
docker compose up mcp_serverEnvironment Variables
- MSSQL_SERVER
- MSSQL_DATABASE
- MSSQL_USER
- MSSQL_PASSWORD
- MSSQL_PORT
- MSSQL_ENCRYPT
- MSSQL_TRUST_SERVER_CERTIFICATE
- MSSQL_WINDOWS_AUTH
- MSSQL_DRIVER
- PYTHONPATH
Security Notes
The `call_tool` function directly executes arbitrary SQL queries provided by the AI assistant, including DML and DDL operations (e.g., INSERT, UPDATE, DELETE, CREATE, DROP). This contradicts the README's claim of being 'Solo Lectura (Seguro)' and presents a critical security risk. While `read_resource` validates table names, the `execute_sql` tool has no built-in restrictions on query type. The `docker-compose.yml` uses 'sa' as the default database user, which goes against the security best practices outlined in `SECURITY.md` (recommending minimal permissions and avoiding admin accounts). Without extremely strict database user permissions, this server can be used to execute destructive commands.
Similar Servers
PowerBI-Desktop-MCP
Enables AI assistants to programmatically interact with Power BI Desktop models for data exploration, analysis, and modification.
DBchat
Transforms a database into an intelligent conversational partner, enabling natural language queries, instant answers, and data visualizations via MCP clients.
azure-cosmos-mcp-server-samples
Enables AI assistants (LLMs like Claude, Continue.dev) to interact with and query Azure Cosmos DB databases using natural language.
nlp2sql
Converting natural language queries to optimized SQL for enterprise databases using multiple AI providers.