mssql_mcp_server

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

16
4

MSSQL MCP Server

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.

Features

  • Secure MSSQL Database Access via environment variables.
  • Controlled Query Execution with robust error handling.
  • Table Listing & Data Retrieval capabilities.
  • Comprehensive Logging for monitoring database interactions.

Installation

pip install mssql-mcp-server

Configuration

Configure database access using environment variables: MSSQL_DRIVER, MSSQL_HOST, MSSQL_USER, MSSQL_PASSWORD, and MSSQL_DATABASE.

Usage

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.

Development

Clone the repository, set up a virtual environment, install development dependencies from requirements-dev.txt, and run tests with pytest.

Security Considerations

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.

License

Licensed under the MIT License.

Contributing

Contribute by forking the repository, creating a feature branch, and submitting a Pull Request.

Repository

JE
JexinSam

JexinSam/mssql_mcp_server

Created

January 30, 2025

Updated

March 28, 2025

Language

Python

Category

Database