The Microsoft SQL Server MCP Server provides a secure interface to interact with SQL Server databases. With this server, you can:
- Execute SQL queries against the configured database with proper error handling
- List available SQL Server tables through appropriate system queries
- Read table contents via SELECT statements
- Secure database access through environment variables
- Track operations with comprehensive logging
- Benefit from automatic installation of required system dependencies
All operations are subject to the database user's permissions.
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
:
Configuration
Basic SQL Authentication
Windows Authentication
Azure SQL Database
Optional Settings
Alternative Installation Methods
Using pip
Then in claude_desktop_config.json
:
Development
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
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
- Features
- Installation
- Configuration
- Usage
- Development
- Security Considerations
- Security Best Practices
- License
- Contributing
Related Resources
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.Last updated -44PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.Last updated -7TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables executing SQL queries and managing connections with Microsoft SQL Server databases.Last updated -1545TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI assistants (Cursor, Windsurf, Claude Code) to interact with Microsoft SQL Server databases by providing connectivity through environment-configurable connections.Last updated -8282TypeScriptMIT License