SQL Server Express MCP Server
@hanweg
MCP server for interacting with SQLExpress
Overview
What is SQL Server Express MCP Server?
An MCP server for interacting with Microsoft SQL Server Express. It supports both Windows and SQL Server authentication and is intended for use with AI assistants like Claude Desktop.
How to use SQL Server Express MCP Server?
Clone the repository, create and activate a Python virtual environment using uv, install dependencies, then configure claude_desktop_config.json with the appropriate --server, --auth, and optional --username/--password flags. For Windows authentication use --auth windows --trusted-connection yes; for SQL authentication use --auth sql and supply credentials.
Key features of SQL Server Express MCP Server
- Execute SELECT, INSERT, UPDATE, DELETE queries
- Create new tables
- List and describe tables
- Restrict access to allowed databases
- Supports Windows and SQL Server authentication
Use cases of SQL Server Express MCP Server
- Querying SQL Server databases through an AI assistant
- Managing table schemas without direct database tools
- Securely integrating SQL Server with MCP-compatible applications
FAQ from SQL Server Express MCP Server
What authentication methods are supported?
The server supports Windows Authentication (--auth windows) and SQL Server Authentication (--auth sql). SQL authentication requires a username and password.
What are the prerequisites?
Python 3.10 or higher, Microsoft ODBC Driver 18 for SQL Server, and a SQL Server instance with appropriate permissions.
How do I restrict which databases can be accessed?
Use the --allowed-databases flag and provide a comma-separated list of database names (e.g., database1,database2).
Can I run custom queries other than SELECT?
Yes. The write_query tool executes INSERT, UPDATE, and DELETE queries, and the create_table tool creates new tables.
Does the server support certificate trust?
Yes, use the --trust-server-certificate yes flag to trust the server certificate without validation.