A Model Context Protocol (MCP) server that enables secure interaction with Microsoft SQL Server databases.
Project description
Microsoft SQL Server MCP Server (Ishaan's Version)
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 mssql_mcp_server_ishaan
Then in claude_desktop_config.json:
{
"mcpServers": {
"mssql": {
"command": "python",
"args": ["-m", "mssql_mcp_server_ishaan"],
"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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mssql_mcp_server_ishaan-0.1.1.tar.gz.
File metadata
- Download URL: mssql_mcp_server_ishaan-0.1.1.tar.gz
- Upload date:
- Size: 35.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
071327aa9858d8d16b7b116495efa33380e9e3b5621e2438b5b3639960d74aba
|
|
| MD5 |
4f1f55a8c9ffab61f22fa8adf7463e98
|
|
| BLAKE2b-256 |
a264a87d85694642b2e83e55f6c9019e23de44ec0efc18f9ae2d7776ebebfe29
|
File details
Details for the file mssql_mcp_server_ishaan-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mssql_mcp_server_ishaan-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15b9d241838ceb28687c4ab86dc5caa2f27ec0ad201b57e1421489e9d3c67063
|
|
| MD5 |
e517fe8fa6570906a37b50a0702fa582
|
|
| BLAKE2b-256 |
ba25a772e0bbd42331ecb9e1c0efc5ba47d697b44ff29d03a359c763cfa1f034
|