MSSQL is an MCP server that connects LLM clients directly to Microsoft SQL Server databases for query execution and business intelligence analysis. Designed for database administrators, data analysts, and software developers, it enables AI assistants to inspect schemas, execute read queries, run data manipulation commands, and manage stored procedures. Built using the FastMCP Python SDK, the server supports the MCP 2025-06-18 specification, offering features like structured content outputs, multi-database routing, and dynamic resource templates that serve table layouts without wasting context tokens on repeated schema dumps. It enforces static query validation to prevent dangerous statements, allows per-connection read-only enforcement, and includes optional write confirmations via elicitation on supported platforms. With built-in tools for listing views, inspecting indexes, running batch procedures, and recording business notes into an active memo resource, it provides a controlled environment for database operations across local, staging, and production SQL Server instances.
Category: Data & Analytics
Tags: database, microsoft, mssql, SQL, sql server
git clone https://github.com/daobataotie/mssql-mcp, change to the directory, and run pip install -r requirements.txt or install as a package with pip install .. 3. Create a config.json file defining your database connection parameters, setting keys such as driver, server, database, username, and password. 4. Register the server in your MCP client configuration (such as claude_desktop_config.json) under mcpServers using command python with the path to server.py in args, or run mssql-mcp directly if installed as a package.Part of MCP Servers
You can install it from source by cloning the GitHub repository and running pip install -r requirements.txt, or by installing the package directly with pip install . using Python 3.10 or newer. You also need ODBC Driver 17 or 18 for SQL Server installed on your operating system alongside a configured config.json file.
It provides tools to execute SELECT queries, run write operations like INSERT and UPDATE, create tables, list databases and views, fetch detailed schema information, and execute stored procedures with multiple result sets. It also supports resource templates for on-demand table schemas and an insight memo resource for tracking business notes.
It works with mainstream standard input/output MCP clients including Claude Desktop, Cursor, Windsurf, and Cline, as well as the official Model Context Protocol Inspector. For features requiring user elicitation prompts on write actions, clients must support the MCP elicitation specification, while other clients execute queries directly unless configured in read-only mode.
Yes, MSSQL MCP Server is open source and licensed under the MIT License. The complete source code, test suites, and documentation are publicly available on GitHub.