# mssql_mcp_server

> 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

## Overview

- **Category:** Database
- **Language:** Python
- **Stars:** 56
- **Forks:** 4
- **Owner:** JexinSam
- **GitHub:** https://github.com/JexinSam/mssql_mcp_server
- **Created:** 2025-01-30T07:49:04+00:00
- **Updated:** 2025-03-28T11:14:48+00:00
- **Source:** https://model-context-protocol.com/servers/mssql-secure-database-interaction-mcp-server

## Setup

## Setup

1.  Install the package: `pip install mssql-mcp-server`
2.  Configure database access by setting environment variables: `MSSQL_DRIVER`, `MSSQL_HOST`, `MSSQL_USER`, `MSSQL_PASSWORD`, and `MSSQL_DATABASE`.
3.  For Claude Desktop integration, add the provided configuration to `claude_desktop_config.json`.
4.  To run as a standalone server, install dependencies with `pip install -r requirements.txt` and run the server with `python -m mssql_mcp_server`.
5.  For development, clone the repository, set up a virtual environment, install development dependencies with `pip install -r requirements-dev.txt`, and run tests with `pytest`.

## Tools

## Available Tools

1. Secure MSSQL Database Access (through environment variables)
2. Controlled Query Execution (with error handling)
3. Table Listing & Data Retrieval
4. Comprehensive Logging (for monitoring queries and operations)
