mssql-mcp

The MSSQL MCP Server enables database interaction and business intelligence by running SQL queries, analyzing data, and generating business insight memos, adapting SQLite modifications for MSSQL. The MSSQL MCP Server

29
1

MSSQL MCP Server

English | 中文

Overview

The MSSQL MCP Server provides database interaction and business intelligence capabilities, enabling users to execute SQL queries, analyze business data, and automatically generate business insight memos. It is designed to work with MSSQL databases, adapting SQLite modifications from the official website.

Components

The server offers several key components: read_query (executes SELECT queries), write_query (executes INSERT, UPDATE, or DELETE queries), create_table (creates new tables), list_tables (lists all tables), describe-table (shows table schema), and append_insight (adds insights to a memo).

Demo

The server can handle databases with non-standardized column names, relying on AI to match them. It also features self-correction for SQL execution errors.

Operating environment

  • Python 3.x
  • Packages
    • pyodbc>=4.0.39
    • pydantic>=2.0.0
    • mcp>=0.1.0
  • ODBC Driver 17 for SQL Server

Usage

The guide provides instructions for installing required packages, configuring the config.json file with database connection details (driver, server IP, database name, username, password), and integrating the server with Claude Desktop, Windsurf, Cursor, and MCP Inspector.

Project Structure

mssql-mcp
├── .git
├── .gitignore
├── LICENSE
├── README.md
├── README_en.md
├── README_zh.md
├── imgs
│   ├── cursor_config.png
│   ├── table.png
│   └── demo.gif
├── requirements.txt
└── src
    ├── __init__.py
    └── server.py

License

MIT License

Repository

DA
daobataotie

daobataotie/mssql-mcp

Created

March 13, 2025

Updated

March 28, 2025

Language

Python

Category

Database