mssql_mcp_server
This project is a Model Context Protocol (MCP) server that facilitates secure interactions with Microsoft SQL Server databases. It provides functionality for listing tables, reading data, and executing SQL queries, with a focus on safety and structured database exploration.
Overview
A Model Context Protocol (MCP) server for secure interaction with Microsoft SQL Server databases. It provides features such as listing SQL Server tables, reading table contents, executing SQL queries with error handling, secure access through environment variables, comprehensive logging, and automatic dependency installation.
Features
- List available tables
- Read table contents
- Execute SQL queries
- Secure access with environment variables
- Logging
- Automatic dependency installation
Installation
Install via MCP:
Configuration
Set environment variables including MSSQL_SERVER, MSSQL_USER, MSSQL_PASSWORD, and MSSQL_DATABASE.
Usage
The server can be used with Claude Desktop or as a standalone server.
Security Considerations
- Do not commit environment variables
- Use minimal permissions
- Query whitelisting
- Monitor database operations