MSSQL

Provides MSSQL database interaction, SQL execution, and business insight memo generation for MCP clients.
  • python

38

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "daobataotie-mssql-mcp": {
      "command": "python",
      "args": [
        "~/server.py"
      ]
    }
  }
}

MSSQL MCP Server enables you to run SQL queries, analyze business data, and automatically generate business insight memos against a SQL Server database. It provides a programmable interface for common data operations and BI-oriented insights, making it useful for data teams and BI workflows.

How to use

You interact with MSSQL MCP Server through an MCP client that supports stdio-based servers. The server exposes operations to read data, write data, manage schemas, and append business insights to memos. You can connect to a remote SQL Server, run SELECT queries to read data, perform INSERT/UPDATE/DELETE operations, create and inspect tables, and extend your memo with new insights. Use the client to issue these actions and retrieve results for dashboards, reports, or automated memos.

Typical usage patterns include configuring a local or remote MSSQL MCP instance, starting the server process from your MCP client, and then issuing commands such as reading data from a table, writing new rows, listing or describing tables, and appending insights to a memo resource. The server is designed to handle varying schemas and will attempt to align with your database structure during operations.

How to install

Prerequisites: Python 3.x is required to run the MSSQL MCP Server. Ensure you have Python installed and a working SQL Server ODBC driver.

Install Python dependencies listed in the project requirements.

Install the MSSQL MCP Server dependencies from the provided requirements file.

Run the server using the command provided in the installation snippet below. The server script is located in the src directory and is named server.py.

Configuration and environment

Configuration is done via a JSON config that specifies the database connection and server metadata.

{
  "database": {
    "driver": "ODBC Driver 17 for SQL Server",
    "server": "server ip",
    "database": "db name",
    "username": "username",
    "password": "password",
    "trusted_connection": false
  },
  "server": {
    "name": "mssql-manager",
    "version": "0.1.0"
  }
}

Project structure and components

Key components exposed by the server include read_query for SELECTs, write_query for INSERT/UPDATE/DELETE, create_table to create new tables, list_tables to enumerate tables, describe-table to view schema details, and append_insight to add new business insights to memos.

The server is designed to run on Python 3.x with the following dependencies installed: pyodbc, pydantic, and mcp, along with the ODBC Driver 17 for SQL Server.

Example client configurations

Two common ways to run the MSSQL MCP Server from MCP clients are through stdio-based commands or a CLI-based inspector utility.

For local stdio-based usage, you typically run Python with the server script, for example: python src/server.py

If you are using an inspector tool from the MCP ecosystem, you might invoke a command that includes the inspector alongside launching the server script, for example: npx -y @modelcontextprotocol/inspector python C:\mssql-mcp\src\server.py

Notes on the demo and environment

A sample database schema is shown in the demo. Column names may vary; the system will align with the actual schema during operations. Ensure the ODBC driver is available (ODBC Driver 17 for SQL Server) and that network access to the SQL Server is permitted.

Project structure references

The project includes a Python source file at src/server.py and a config.json example to guide setup.

Available tools

read_query

Execute SELECT queries to read data from the database.

write_query

Execute INSERT, UPDATE, or DELETE queries to modify data.

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.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational