Microsoft SQL Server is an MCP server that provides Model Context Protocol-compatible interfaces for connecting Claude Desktop and other MCP clients to Microsoft SQL Server instances. Developed by Richard Han, it allows developers, database administrators, and data analysts to inspect schemas and run queries directly through natural language interactions. The server connects to local SQL Server databases, LocalDB instances, and cloud-hosted Azure SQL Databases using standard connection details configured through environment variables. By exposing standard database operations through MCP tools, users can list available database tables and run data manipulation and definition commands such as SELECT, INSERT, UPDATE, and DELETE. It supports multiple authentication mechanisms, including standard SQL Server authentication, Windows authentication credentials, and Azure Active Directory. Users can also configure custom database ports and force connection encryption to maintain security standards across different networking environments. Security best practices are encouraged through dedicated, least-privilege SQL users, ensuring client environments can interact with enterprise database infrastructure safely.
Category: Databases & Data Stores
Tags: database, mssql, SQL, sql server
claude_desktop_config.json. 2. Add the mssql server configuration under the mcpServers block: json { "mcpServers": { "mssql": { "command": "uvx", "args": ["microsoft_sql_server_mcp"], "env": { "MSSQL_SERVER": "localhost", "MSSQL_DATABASE": "your_database", "MSSQL_USER": "your_username", "MSSQL_PASSWORD": "your_password" } } } } 3. Adjust the environment variables to fit your environment. For Windows authentication, omit the user/password and add "MSSQL_WINDOWS_AUTH": "true". You can also configure MSSQL_PORT or set "MSSQL_ENCRYPT": "true". 4. Alternatively, install via pip using pip install microsoft_sql_server_mcp and specify "command": "python" with "args": ["-m", "mssql_mcp_server"] in your configuration. 5. Save the file and restart Claude Desktop.Part of MCP Servers
You can run it directly in Claude Desktop using uvx by adding microsoft_sql_server_mcp to your claude_desktop_config.json file. Alternatively, install the package via pip with pip install microsoft_sql_server_mcp and run it using the python module command.
The server enables LLM clients to inspect database structures and execute SQL statements including SELECT, INSERT, UPDATE, and DELETE. It supports custom ports, encrypted connections, and targets both local SQL Server instances and remote Azure SQL Databases.
It supports standard SQL user authentication using usernames and passwords, Windows Authentication using local credentials, and Azure Active Directory authentication for Azure SQL Database setups.
Yes, it is open source software released under the MIT license. You can inspect, modify, or contribute to its source code on its GitHub repository.