Skip to main content

Microsoft SQL Server MCP Server

PyPI License: MIT

Microsoft SQL Server MCP server

A Model Context Protocol (MCP) server for secure SQL Server database access through Claude Desktop.

Features

  • 🔍 List database tables
  • 📊 Execute SQL queries (SELECT, INSERT, UPDATE, DELETE)
  • 🔐 Multiple authentication methods (SQL, Windows, Azure AD)
  • 🏢 LocalDB and Azure SQL support
  • 🔌 Custom port configuration

Quick Start

Install with Claude Desktop

Add to your claude_desktop_config.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"
      }
    }
  }
}

Configuration

Basic SQL Authentication

MSSQL_SERVER=localhost          # Required
MSSQL_DATABASE=your_database    # Required
MSSQL_USER=your_username        # Required for SQL auth
MSSQL_PASSWORD=your_password    # Required for SQL auth

Windows Authentication

MSSQL_SERVER=localhost
MSSQL_DATABASE=your_database
MSSQL_WINDOWS_AUTH=true         # Use Windows credentials

Azure SQL Database

MSSQL_SERVER=your-server.database.windows.net
MSSQL_DATABASE=your_database
MSSQL_USER=your_username
MSSQL_PASSWORD=your_password
# Encryption is automatic for Azure

Optional Settings

MSSQL_PORT=1433                 # Custom port (default: 1433)
MSSQL_ENCRYPT=true              # Force encryption

Alternative Installation Methods

Using pip

pip install microsoft_sql_server_mcp

Then in claude_desktop_config.json:

{
  "mcpServers": {
    "mssql": {
      "command": "python",
      "args": ["-m", "mssql_mcp_server"],
      "env": { ... }
    }
  }
}

Development

git clone https://github.com/RichardHan/mssql_mcp_server.git
cd mssql_mcp_server
pip install -e .

Security

  • Create a dedicated SQL user with minimal permissions
  • Never use admin/sa accounts
  • Use Windows Authentication when possible
  • Enable encryption for sensitive data

License

MIT

Metadata

Release files for microsoft_sql_server_mcp_haibt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for microsoft_sql_server_mcp_haibt 0.1.0
File Size Uploaded Provenance
microsoft_sql_server_mcp_haibt-0.1.0.tar.gz 34.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for microsoft_sql_server_mcp_haibt 0.1.0
File Interpreter ABI Platform
microsoft_sql_server_mcp_haibt-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.6 kB

Release files / microsoft_sql_server_mcp_haibt-0.1.0.tar.gz

Download URL microsoft_sql_server_mcp_haibt-0.1.0.tar.gz
Size 34.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a6cea883fcb555260d9c1024754f3f23474379d703ad40c4c54a83411ccb67ae
BLAKE2b-256 checksum
How to use checksums
e7184150cf499b04e7cc52ae277f37a9cbe02622462f242f8d52f9b00e4b767e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / microsoft_sql_server_mcp_haibt-0.1.0-py3-none-any.whl

Download URL microsoft_sql_server_mcp_haibt-0.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ee9a39b2dfbcbde701451e7844d00f4331cc6ca3b77c2ff5e9842916a9637e7
BLAKE2b-256 checksum
How to use checksums
d850599c613a46b3573db0f1acdb8edf956c26e07b083f9d0d25b8f37585a12c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for microsoft_sql_server_mcp_haibt 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page