Microsoft SQL Server (MSSQL)
About
A server for secure interaction with Microsoft SQL Server databases using environment variables for configuration.
Details
- Author
- richardhan
- Repository
- RichardHan/mssql_mcp_server
- GitHub stars
- 65
- License
- MIT License
- Categories
- Database, Productivity, Design, Developer Tools, AI, Frontend, API, Security
Jump to
- π 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
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Microsoft SQL Server (MSSQL)Command (node, npx, python, etc.)uvxArguments-
Argument 1
microsoft_sql_server_mcp
Environment-
MSSQL_USER
your_username -
MSSQL_SERVER
localhost -
MSSQL_DATABASE
your_database -
MSSQL_PASSWORD
your_password
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
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"
}
}
}
}
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
MSSQL_SERVER=localhost
MSSQL_DATABASE=your_database
MSSQL_WINDOWS_AUTH=true # Use Windows credentials
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"microsoft sql server (mssql)": {
"env": {
"MSSQL_USER": "your_username",
"MSSQL_SERVER": "localhost",
"MSSQL_DATABASE": "your_database",
"MSSQL_PASSWORD": "your_password"
},
"args": [
"microsoft_sql_server_mcp"
],
"command": "uvx"
}
}
}
Linux
{
"env": {
"MSSQL_USER": "your_username",
"MSSQL_SERVER": "localhost",
"MSSQL_DATABASE": "your_database",
"MSSQL_PASSWORD": "your_password"
},
"args": [
"microsoft_sql_server_mcp"
],
"command": "uvx"
}
Macos
{
"env": {
"MSSQL_USER": "your_username",
"MSSQL_SERVER": "localhost",
"MSSQL_DATABASE": "your_database",
"MSSQL_PASSWORD": "your_password"
},
"args": [
"microsoft_sql_server_mcp"
],
"command": "uvx"
}
Windows
{
"env": {
"MSSQL_USER": "your_username",
"MSSQL_SERVER": "localhost",
"MSSQL_DATABASE": "your_database",
"MSSQL_PASSWORD": "your_password"
},
"args": [
"microsoft_sql_server_mcp"
],
"command": "uvx"
}
Microsoft SQL Server MCP Server
<a href="https://glama.ai/mcp/servers/29cpe19k30">
</a>
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
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




