Mssql MCP Server
Microsoft SQL Server queries and execution-plan analysis for AI agents.
Data last scanned today · Reviewed today
Overview
This MCP server provides a specialized bridge between AI assistants and Microsoft SQL Server. It facilitates schema discovery and parameter-based data retrieval while offering a read-only architecture by default to prioritize database safety.
Our verdict
With a security score of 30/100, this server is classified as high-risk. The score is impacted by the fact that it is a community-maintained project rather than an official vendor release and has not undergone an editorial security review. Users should exercise caution, especially given that authentication methods and read-only mode implementations have not been verified; it is recommended primarily for isolated development or non-sensitive environments.
- Supports detailed execution-plan analysis for query tuning
- Requires zero direct dependencies for operation
- Enforces a secure SELECT-only default configuration
- Provides multi-profile support via appsettings.json
- High-risk security score due to lack of official maintenance
- Authentication mechanisms remain unreviewed by third parties
- Limited bus factor with only one primary contributor
Tools
| Tool | Description | Risk |
|---|---|---|
| list_profiles | List configured connection profiles. Call first when picking a non-default profile. | low |
| get_server_properties | Get server properties and execution limits (timeouts, row caps, guardrails). | low |
| list_objects | List catalog metadata. kind=catalog: databases; schema: schemas; relation: tables/views; routine: procedures/functions. | low |
| get_object | Get metadata for one relation or routine. Use list_objects to resolve names. Returns empty detail payloads if includes is null. | low |
| run_query | Execute read-only T-SQL SELECT; only SELECT allowed (no DML/DDL). | low |
| analyze_query | Analyze execution plan for a read-only SELECT. | low |
| run_command | Execute write T-SQL (DDL/DML). Rejected unless the target profile sets AllowWrite=true (off by default). | high |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| ChatGPT | ||||
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf |
Frequently asked questions
›What software do I need to run this server?
You need the .NET 8.0 runtime or later, a SQL Server instance, and a valid connection string.
›Is the server read-only by default?
Yes, query tools are restricted to SELECT statements only. You must explicitly set AllowWrite to true in a profile to enable the run_command tool for DML or DDL operations.
›How can I connect to multiple SQL Server instances at once?
You can define multiple profiles within a user-scoped appsettings.json file located in your home directory.
›Does this tool support Azure SQL authentication?
Yes, because the server uses Microsoft.Data.SqlClient, you can configure Microsoft Entra (Azure AD) authentication by specifying the appropriate Authentication mode in your connection string.
›Are there limits on how many rows can be returned in a query?
Yes, interactive queries have a default limit of 500 rows with a hard ceiling of 1000, while snapshot queries default to 10,000 rows with a hard ceiling of 50,000.
›Can the server help diagnose slow performance?
Yes, the analyze_query tool provides execution-plan analysis, including details on cost, cardinality estimates, operator info, and potential index suggestions.
Badge
Maintain this server? Add the live badge to your README.