MSSQL

A Model Context Protocol (MCP) server facilitating secure interactions with MSSQL databases.
  • python

54

GitHub Stars

python

Language

4 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jexinsam-mssql_mcp_server": {
      "command": "python",
      "args": [
        "-m",
        "mssql_mcp_server"
      ],
      "env": {
        "MSSQL_HOST": "localhost",
        "MSSQL_USER": "your_username",
        "MSSQL_DRIVER": "mssql_driver",
        "MSSQL_DATABASE": "your_database",
        "MSSQL_PASSWORD": "your_password",
        "Trusted_Connection": "no",
        "TrustServerCertificate": "yes"
      }
    }
  }
}

You can securely interact with a Microsoft SQL Server database through a dedicated MCP server. It exposes safe, structured operations like listing tables, reading data, and executing SQL queries with strict permission checks and comprehensive logging so you can explore data without risking exposure or misuse.

How to use

Use an MCP client to connect to the MSSQL MCP Server and perform the supported actions. You can list available tables to understand the schema, read contents of chosen tables, and execute SQL queries with controlled access. All operations are logged to help you monitor activity and enforce security policies.

How to install

Prerequisites: Ensure you have Python and pip installed on your system.

Install the MSSQL MCP Server package.

pip install mssql-mcp-server

Configure database access by setting environment variables for the MSSQL connection.

MSSQL_DRIVER=mssql_driver
MSSQL_HOST=localhost
MSSQL_USER=your_username
MSSQL_PASSWORD=your_password
MSSQL_DATABASE=your_database
# optional
TrustServerCertificate=yes
Trusted_Connection=no

Run the MCP server locally.

python -m mssql_mcp_server

Additional notes

If you plan to integrate with Claude Desktop, you can configure the client to launch the MSSQL MCP Server using a dedicated command sequence that runs the MCP server from a specified directory and passes the necessary environment variables.

Available tools

listTables

List available tables in the connected MSSQL database to understand the schema.

readTable

Read and return contents of a specified table for inspection or data retrieval.

executeQuery

Execute a SQL query with restricted permissions and safe error handling, returning results or errors as appropriate.

logging

Comprehensive logging of queries and operations for monitoring and auditing.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational