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
Похожие серверы
AITable
Provides read and write access to AITable.ai, a collaborative database and spreadsheet platform.
SchemaCrawler
Connect to any relational database, and be able to get valid SQL, and ask questions like what does a certain column prefix mean.
DART MCP Server
Access corporate disclosure information, financial data, and reports from the Korean electronic disclosure system (DART) API.
ODBC Server via PyODBC
An MCP server for connecting to databases like Virtuoso using ODBC drivers via pyodbc.
GraphDB
Provides read-only access to an Ontotext GraphDB repository.
Certinia MCP Server by CData
A read-only MCP server that allows LLMs to query live Certinia data. Powered by CData.
ArangoDB
A server for interacting with ArangoDB, a native multi-model database system.
DBHub
Universal database MCP server supporting mainstream databases.
AIND Metadata
Access and interact with Allen Institute for Neural Dynamics (AIND) metadata directly within your IDE.
Amela MCP Memory Tool
A local, high-performance memory server for AI agents, built with SQLite, vector embeddings, and a knowledge graph. Packaged for npm and Docker.