The MSSQL MCP Server enables secure interaction with MSSQL databases for AI assistants by listing tables, reading data, and executing controlled SQL queries. It ensures safer database exploration with permission
MSSQL MCP Server is a Model Context Protocol (MCP) server designed for secure interaction with Microsoft SQL Server (MSSQL) databases. It empowers AI assistants to list tables, read data, and execute SQL queries under controlled conditions, enhancing database exploration with strict permission enforcement and comprehensive logging.
pip install mssql-mcp-server
Configure database access using environment variables: MSSQL_DRIVER
, MSSQL_HOST
, MSSQL_USER
, MSSQL_PASSWORD
, and MSSQL_DATABASE
.
Integrate with Claude Desktop using a configuration file or run as a standalone server using python -m mssql_mcp_server
after installing dependencies from requirements.txt
.
Clone the repository, set up a virtual environment, install development dependencies from requirements-dev.txt
, and run tests with pytest
.
Adhere to security best practices, including using a dedicated MSSQL user with minimal privileges, enabling logging, and regularly reviewing permissions. Refer to the MSSQL Security Configuration Guide for detailed instructions.
Licensed under the MIT License.
Contribute by forking the repository, creating a feature branch, and submitting a Pull Request.
JexinSam/mssql_mcp_server
January 30, 2025
March 28, 2025
Python