Microsoft SQL Server
A server for secure interaction with Microsoft SQL Server databases using environment variables for configuration.
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
Related Servers
RewindDB
Interface with the Rewind.ai SQLite database to access audio transcripts and screen OCR data.
DeepMemory
DeepMemory MCP is a small Model Context Protocol (MCP) server that provides long-term memory storage for conversational agents.
QuickBooks Online by CData
A read-only MCP server for querying live QuickBooks Online data. Requires a separate CData JDBC Driver for QuickBooks Online.
SQL-Transpiler MCP Tool
Transpile SQL queries between different dialects using the sqlglot library.
Enhanced Medication Information MCP Server
Provides real-time access to FDA drug data, including shortages, labeling, and recalls, via the openFDA API.
Oracle Database
Access and query an Oracle database using the cx_Oracle driver.
MCP Database Server
An MCP server that enables LLMs to interact with databases like MongoDB using natural language.
Coresignal
Access comprehensive B2B data on companies, employees, and job postings for your LLMs and AI workflows.
MS SQL MCP Server
A bridge for AI assistants to directly query and explore Microsoft SQL Server databases.
Supabase Memory Service
A memory service using Supabase PostgreSQL with pgvector for semantic search and knowledge graph storage.