MSSQL-MCP

MSSQL-MCP

MSSQL MCP that refer to the official website's SQLite MCP for modifications to adapt to MSSQL

38
Stars
9
Forks
0
Releases

Overview

MSSQL MCP Server provides database interaction and business intelligence capabilities for Microsoft SQL Server. It enables executing SQL queries against a MSSQL database and performing data analysis, while automatically generating business insight memos. Built as a derivative of the official SQLite MCP with modifications to adapt to MSSQL, it exposes a set of operations through the MCP interface: read_query for SELECTs, write_query for INSERT/UPDATE/DELETE, create_table for schema changes, list_tables to enumerate database objects, describe-table to retrieve table schemas, and append_insight to store new memos tied to the insights. The server runs on Python 3.x and relies on pyodbc for ODBC connectivity, pydantic for data validation, and the MCP framework itself. It uses the ODBC Driver 17 for SQL Server. Configuration is provided via a JSON file with database connection details and a server descriptor, and it is designed to be launched with common MCP tooling such as Claude Desktop, Windsurf, or the MCP Inspector. The README emphasizes flexibility in table schemas (column names are not standardized and AI can map them) and notes self-correcting behavior for SQL execution errors in the demo.

Details

Owner
daobataotie
Language
Python
License
MIT License
Updated
2025-12-07

Features

Read Query

Execute SELECT queries to read data from the database

Write Query

Execute INSERT, UPDATE, or DELETE queries

Create Table

Create new tables in the database

List Tables

Get a list of all tables in the database

Describe Table

View schema information for a specific table

Append Insight

Add new business insights to the memo resource

Audience

Data analystsExecute SQL queries, analyze data, and generate business insight memos from MSSQL data.
BI developersIntegrate MSSQL data queries and memo generation into BI workflows.

Tags

MSSQLMCPSQL ServerdatabaseSQLread_querywrite_querycreate_tablelist_tablesdescribe-tableappend_insightbusiness_intelligencememoODBCPythonpyodbc