MsSqlMCP MCP Server

MCP to query SQL Server database schema, such as tables, columns, and relationships

Local serverstdio

What is the MsSqlMCP MCP Server?

MCP to query SQL Server database schema, such as tables, columns, and relationships

The short version

  • Read-only access — All queries are validated to prevent data modification (INSERT, UPDATE, DELETE, DROP, EXEC, etc. are blocked)
  • Schema discovery — Tables, columns, relationships, and stored procedures
  • SQL execution — Safe SELECT queries only
  • Dual transport — Supports both stdio and HTTP/SSE protocols
  • Windows Service — Can run as a Windows Service for production deployments
  • MCP Protocol — Compatible with VS Code Copilot, Claude Desktop, and other MCP clients

What it needs from you

  • .NET 10 (or .NET 9 with minor adjustments) - SQL Server

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Configuration

  • .NET 10 (or .NET 9 with minor adjustments) - SQL Server

Example prompts to try

  • “Use MsSqlMCP to GetTables.”
  • “Use MsSqlMCP to GetColumns.”
  • “Use MsSqlMCP to GetRelationships.”

Frequently asked questions

The `ExecuteSql` tool only allows SELECT queries. Blocked statements include INSERT, UPDATE, DELETE, MERGE, TRUNCATE, CREATE, ALTER, DROP, GRANT, REVOKE, DENY, EXEC, EXECUTE, SP_EXECUTESQL, XP_, BACKUP, RESTORE, BULK, OPENROWSET, OPENQUERY, and OPENDATASOURCE.