A Model Context Protocol (MCP) server that enables secure interaction with Microsoft SQL Server databases.
Project description
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": ["yulin-mssql-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 yulin-mssql-mcp
Then in claude_desktop_config.json:
{
"mcpServers": {
"mssql": {
"command": "yulin-mssql-mcp",
"args": [],
"env": { ... }
}
}
}
Development
git clone https://github.com/yulin0629/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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yulin_mssql_mcp-0.1.1.tar.gz
(36.7 kB
view details)
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 yulin_mssql_mcp-0.1.1.tar.gz.
File metadata
- Download URL: yulin_mssql_mcp-0.1.1.tar.gz
- Upload date:
- Size: 36.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1838500e107fc1f1f31251e83683b5c01c27a08e4618fcb48889d0a76f7fb9cd
|
|
| MD5 |
b8b729bb9e49676ee9068e5efd5140e5
|
|
| BLAKE2b-256 |
71a036d3e6195f5f43c3b14e8ae1832645d277fc22198d646567f08867cee6bb
|
File details
Details for the file yulin_mssql_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: yulin_mssql_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66c4c41db2bc0a49912a2501fb47d3104735ef8ba8a11e3e77dae2385b844a58
|
|
| MD5 |
f904b2ebc6a9cf2d30794d749294875b
|
|
| BLAKE2b-256 |
a68ddbf66b5abd03e6857774cf4af0078067b9fa1add6a61b97c47f087a2d984
|